1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mageia-sysadm] [209] add mandriva version of youri-submit, downloaded from http://svn. mandriva.com/svn/soft/build_system/youri/submit/trunk at revision 271600
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B209%5D%20add%20mandriva%20version%20of%20youri-submit%2C%0A%20downloaded%20from%20http%3A//svn.%0A%20mandriva.com/svn/soft/build_system/youri/submit/trunk%20at%20revision%20271600&In-Reply-To=%3C20110105131906.65E664193F%40valstar.mageia.org%3E">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="001511.html">
<LINK REL="Next" HREF="001513.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mageia-sysadm] [209] add mandriva version of youri-submit, downloaded from http://svn. mandriva.com/svn/soft/build_system/youri/submit/trunk at revision 271600</H1>
<B>root at mageia.org</B>
<A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B209%5D%20add%20mandriva%20version%20of%20youri-submit%2C%0A%20downloaded%20from%20http%3A//svn.%0A%20mandriva.com/svn/soft/build_system/youri/submit/trunk%20at%20revision%20271600&In-Reply-To=%3C20110105131906.65E664193F%40valstar.mageia.org%3E"
TITLE="[Mageia-sysadm] [209] add mandriva version of youri-submit, downloaded from http://svn. mandriva.com/svn/soft/build_system/youri/submit/trunk at revision 271600">root at mageia.org
</A><BR>
<I>Wed Jan 5 14:19:06 CET 2011</I>
<P><UL>
<LI>Previous message: <A HREF="001511.html">[Mageia-sysadm] [653] - do not try to do ssl when we cannot, this confuse epoll
</A></li>
<LI>Next message: <A HREF="001513.html">[Mageia-sysadm] [210] add mandriva version of youri-core, downloaded from http://svn. mandriva.com/svn/soft/build_system/youri/core/trunk/ at revision 271600
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#1512">[ date ]</a>
<a href="thread.html#1512">[ thread ]</a>
<a href="subject.html#1512">[ subject ]</a>
<a href="author.html#1512">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Revision: 209
Author: boklm
Date: 2011-01-05 14:19:06 +0100 (Wed, 05 Jan 2011)
Log Message:
-----------
add mandriva version of youri-submit, downloaded from <A HREF="http://svn.mandriva.com/svn/soft/build_system/youri/submit/trunk">http://svn.mandriva.com/svn/soft/build_system/youri/submit/trunk</A> at revision 271600
Added Paths:
-----------
build_system/mdv-youri-submit/
build_system/mdv-youri-submit/branches/
build_system/mdv-youri-submit/tags/
build_system/mdv-youri-submit/trunk/
build_system/mdv-youri-submit/trunk/ChangeLog
build_system/mdv-youri-submit/trunk/MANIFEST.SKIP
build_system/mdv-youri-submit/trunk/Makefile.PL
build_system/mdv-youri-submit/trunk/README
build_system/mdv-youri-submit/trunk/TODO
build_system/mdv-youri-submit/trunk/bin/
build_system/mdv-youri-submit/trunk/bin/youri-check.in
build_system/mdv-youri-submit/trunk/bin/youri-submit
build_system/mdv-youri-submit/trunk/bin/youri-submit-proxy.in
build_system/mdv-youri-submit/trunk/bin/youri-submit-restricted.in
build_system/mdv-youri-submit/trunk/bin/youri-submit.in
build_system/mdv-youri-submit/trunk/etc/
build_system/mdv-youri-submit/trunk/etc/bash_completion.d/
build_system/mdv-youri-submit/trunk/etc/bash_completion.d/youri-submit
build_system/mdv-youri-submit/trunk/etc/submit.conf
build_system/mdv-youri-submit/trunk/lib/
build_system/mdv-youri-submit/trunk/lib/Youri/
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Archive.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Bugzilla.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/CVS.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Clean.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/DkmsModuleInfo.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Install.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Link.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Mail.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Markrelease.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/RSS.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Rpminfo.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Send.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sendcache.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sign.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Unpack.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/UpdateMdvDb.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/ACL.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/History.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Host.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Precedence.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Queue_recency.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Recency.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Rpmlint.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/SVN.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Section.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Source.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Tag.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Type.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Version.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Plugin.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/CleanRpmsrate.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Gendistrib.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Genhdlist2.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre/
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre/Rsync.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Archive.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Clean.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Install.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Mail.pm
build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject.pm
build_system/mdv-youri-submit/trunk/t/
build_system/mdv-youri-submit/trunk/t/00distribution.t
Added: build_system/mdv-youri-submit/trunk/ChangeLog
===================================================================
--- build_system/mdv-youri-submit/trunk/ChangeLog (rev 0)
+++ build_system/mdv-youri-submit/trunk/ChangeLog 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,606 @@
+2008-02-19 07:50 pixel
+
+ * lib/Youri/Submit/Action/Unpack.pm: fix "grep_files" handling
+
+2008-02-12 09:42 blino
+
+ * lib/Youri/Submit/Check/Rpmlint.pm: do not make rpmlint errors
+ fatal anymore (asked by fcrozat)
+
+2008-02-08 17:49 blino
+
+ * lib/Youri/Submit/Check/Rpmlint.pm: remove results occurences and
+ update doc
+
+2008-02-08 17:48 blino
+
+ * lib/Youri/Submit/Check/Rpmlint.pm: make all rpmlint errors fatal
+
+2008-02-08 17:44 blino
+
+ * lib/Youri/Submit/Check/Rpmlint.pm: removed unneeded parentheses
+
+2008-02-08 17:44 blino
+
+ * lib/Youri/Submit/Check/Rpmlint.pm: make clear
+ repository/target/define are unused
+
+2008-02-08 17:43 blino
+
+ * lib/Youri/Submit/Check/Rpmlint.pm: use scalar for fd
+
+2008-01-31 16:35 pixel
+
+ * lib/Youri/Submit/Action/Link.pm: also call ->set_arch_changed
+ when linking a noarch file to another arch
+ (this still doesn't explain media/media_info/MD5SUM not being
+ remade, but it
+ can help...)
+
+2007-12-21 14:37 blino
+
+ * bin/youri-submit.in: merge youri-submit into youri-submit.in
+
+2007-12-19 13:43 blino
+
+ * lib/Youri/Submit/Action/Archive.pm: only log main/updates
+ modifications, not contrib/updates or non-free/updates which are
+ legal
+
+2007-12-19 13:37 blino
+
+ * lib/Youri/Submit/Action/Archive.pm: add spuk's debug code for bug
+ 34999
+
+2007-12-17 19:45 blino
+
+ * bin/youri-submit: add an "allow_omitting_packages" global option,
+ to be able to run youri even if no packages are specified on the
+ command line (useful if packages are fetched in pre action)
+
+2007-12-17 19:34 blino
+
+ * bin/youri-submit: improve error messages for pres/posts actions
+ (patch from raoh's copy, probably from warly)
+
+2007-12-17 19:33 blino
+
+ * bin/youri-submit: fix typo about posts actions (patch from raoh's
+ copy, probably from warly)
+
+2007-12-13 15:01 pixel
+
+ * lib/Youri/Submit/Check/Version.pm: - empty {authorized_users}
+ doesn't imply every one is allowed to bypass freeze check!
+ - {authorized_users} should be checked more strictly
+
+2007-12-07 18:26 spuk
+
+ * lib/Youri/Submit/Action/Sendcache.pm: - make Sendcache send debug
+ packages only if explicitly told to, to save space
+
+2007-11-30 19:29 spuk
+
+ * lib/Youri/Submit/Action/UpdateMdvDb.pm: Youri action to update
+ the Mandriva maintainers database.
+
+2007-10-04 20:07 blino
+
+ * lib/Youri/Submit/Check/Host.pm: make host reject message more
+ explicit by print arch (useful when VMware-player for x86_64
+ actually uses i386 as rpm arch...)
+
+2007-09-26 11:21 blino
+
+ * lib/Youri/Submit/Action/Install.pm: improve log message
+
+2007-09-26 11:19 blino
+
+ * lib/Youri/Submit/Action/Install.pm: fix installed filename (oops)
+
+2007-09-26 09:58 blino
+
+ * lib/Youri/Submit/Action/Install.pm: throw exception on failure,
+ not to delete files that can be copied because of lack of space
+ (upstream commit 1398)
+
+2007-09-25 10:49 pixel
+
+ * lib/Youri/Submit/Action/Unpack.pm: allow to unpack only some
+ files (for release-notes.txt in mandriva-release-common)
+
+2007-09-22 13:11 blino
+
+ * lib/Youri/Submit/Check/Version.pm: allow authorized users to
+ upload everything even during full freeze
+
+2007-08-31 12:51 pixel
+
+ * lib/Youri/Submit/Check/Rpmlint.pm: handle new rpmlint format
+ (not useful at the moment since we still use old rpmlint, but may
+ be useful in
+ the future)
+
+2007-08-31 10:03 blino
+
+ * lib/Youri/Submit/Action/DkmsModuleInfo.pm: adapt to new
+ SOURCEPACKAGE value in prebuilt dkms kernel
+
+2007-08-29 13:21 blino
+
+ * lib/Youri/Submit/Action/DkmsModuleInfo.pm: initial
+ Youri::Submit::Action::DkmsModuleInfo module
+
+2007-08-07 12:50 pixel
+
+ * lib/Youri/Submit/Action/Link.pm: we need the same workaround as
+ done in Action::Install
+
+2007-07-16 09:27 blino
+
+ * lib/Youri/Submit/Post/Genhdlist2.pm: remove unused variable
+
+2007-07-08 02:44 spuk
+
+ * lib/Youri/Submit/Check/Recency.pm: - check for newer/current
+ revisions in default section when submitted to another section
+ (bug #30635)
+
+2007-07-02 09:17 pixel
+
+ * lib/Youri/Submit/Action/CVS.pm: drop mdv specific stuff (mdv
+ doesn't use this action anymore)
+
+2007-06-28 07:40 pixel
+
+ * lib/Youri/Submit/Action/Link.pm: do update hdlist for every arch
+ after linking noarch packages (#31638)
+
+2007-06-28 07:37 pixel
+
+ * lib/Youri/Submit/Action/Install.pm: simplify ($arch is not used
+ by ->set_install_dir_changed)
+
+2007-06-23 13:54 pixel
+
+ * lib/Youri/Submit/Action/Mail.pm, lib/Youri/Submit/Reject/Mail.pm:
+ keep raw changelogs to avoid changing the format (backport)
+
+2007-06-23 08:10 spuk
+
+ * lib/Youri/Submit/Check/Recency.pm: - check for newer and same
+ existing revisions in a single pass
+ - use proper get_revisions() instead of get_install_file() hack,
+ as the
+ latter will use the current file name, and thus will fail to
+ check for an
+ existing package revision when submitting, because submitted
+ SRPMs have a
+ different name ("@rev:foobar-...") than what goes into the
+ repository
+
+2007-06-22 13:51 pixel
+
+ * lib/Youri/Submit/Post/CleanRpmsrate.pm: ensure we don't do
+ anything if nothing changed
+
+2007-06-22 13:41 pixel
+
+ * lib/Youri/Submit/Post/Genhdlist2.pm: more atomic generation of
+ MD5SUM
+
+2007-06-22 13:35 pixel
+
+ * lib/Youri/Submit/Post/Genhdlist2.pm: - need to redo global
+ MD5SUM. This MD5SUM is mostly obsolete, but is still needed up to
+ 2007.1
+ (and needed even on cooker for existing urpmi.cfg)
+ - don't use --blind. hopefully not needed
+
+2007-06-22 06:45 pixel
+
+ * lib/Youri/Submit/Post/Genhdlist2.pm: call genhdlist2 with (new)
+ option --allow-empty-media
+
+2007-06-21 10:13 blino
+
+ * lib/Youri/Submit/Post/CleanRpmsrate.pm: uniquify arch list
+
+2007-06-21 08:16 pixel
+
+ * lib/Youri/Submit/Action/Install.pm,
+ lib/Youri/Submit/Post/Genhdlist2.pm: new action Genhdlist2
+
+2007-06-14 18:23 mrl
+
+ * lib/Youri/Submit/Action/Sendcache.pm: - As this action is unique,
+ avoid too much flexibility and simplify the code.
+ - Use . for hidding temporary files instead of .new suffix.
+
+2007-06-13 18:36 mrl
+
+ * lib/Youri/Submit/Action/Sendcache.pm: - Adapted for working with
+ iurt cache.
+
+2007-06-13 01:48 spuk
+
+ * lib/Youri/Submit/Action/Link.pm: no such 'cd' function, 'chdir'
+ it is...
+
+2007-05-08 06:22 spuk
+
+ * lib/Youri/Submit/Reject/Mail.pm: fixing the Big SVN Breakage:
+ reverting last commit, restoring state as of latest working
+ checkout in ken
+
+2007-05-08 06:06 spuk
+
+ * lib/Youri/Submit/Post/Gendistrib.pm: fixing the Big SVN Breakage:
+ restoring state as of working checkout in ken
+
+2007-05-08 06:00 spuk
+
+ * lib/Youri/Submit/Action/Scp.pm: fixing the Big SVN Breakage:
+ Scp.pm was changed into Send.pm
+
+2007-05-05 06:16 spuk
+
+ * lib/Youri/Submit/Check/Section.pm: Check if package submission
+ was for the correct section.
+
+2007-03-24 11:36 spuk
+
+ * lib/Youri/Submit/Action/Archive.pm: - moved hack for verbosity to
+ start of code, with a remark
+ - removed double $path from debug string
+
+2007-03-15 12:36 mrl
+
+ * lib/Youri/Submit/Check/Version.pm: - Fixed version_freeze mode:
+ do not allow any upload with a different version
+ from what is already present on the repository.
+ - Added an ACL control for maintainers allowed to bypass this
+ restriction as option
+ authorized_users.
+
+2007-03-15 12:32 mrl
+
+ * lib/Youri/Submit/Check/Version.pm: - Improved indentation.
+ - Added some comments regarding possible bugs in freeze modes.
+
+2005-05-24 14:40 Sawyer
+
+ * lib/Youri/Submit/Reject/Mail.pm: LOST
+
+2007-03-10 07:49 spuk
+
+ * lib/Youri/Submit/Action/Archive.pm: The extra '/' was causing the
+ string to not be matched by the regexp below
+ for getting $rep_section and $rep_main_section, in the end making
+ the SRPMs
+ of all other subsections be removed when a newer package was
+ uploaded for any
+ subsection. (#28719)
+
+2007-02-26 10:56 blino
+
+ * lib/Youri/Submit/Post/CleanRpmsrate.pm: initial
+ Post::CleanRpmsrate module
+
+2007-02-14 12:10 blino
+
+ * lib/Youri/Submit/Check/Rpmlint.pm: match rpmlint errors that have
+ no value (such as non-xdg-migrated-menu, the only one we
+ currently use...)
+
+2007-02-09 22:11 blino
+
+ * bin/youri-submit: get -> get_arg
+
+2007-02-09 22:09 blino
+
+ * bin/youri-submit: merge changes from ken/kenobi
+
+2007-02-09 22:09 blino
+
+ * bin/youri-submit: create youri-submit from youri-submit.in
+
+2007-02-09 19:39 blino
+
+ * lib/Youri/Submit/Check/ACL.pm: add section in acl error message
+
+2007-02-09 19:34 blino
+
+ * lib/Youri/Submit/Reject/Mail.pm: do not use packager adress as
+ from, it may be invalid (non-free packages) or not subscribed to
+ maintainers
+
+2007-02-09 18:51 blino
+
+ * lib/Youri/Submit/Reject/Mail.pm: fix changelog in reject mail
+
+2007-02-09 18:50 blino
+
+ * lib/Youri/Submit/Reject/Mail.pm: fix reject mail
+
+2007-02-08 17:28 pixel
+
+ * lib/Youri/Submit/Action/Unpack.pm: also give directories to "cpio
+ -pdu" to ensure directories are created with same rights
+
+2007-02-08 14:09 pixel
+
+ * lib/Youri/Submit/Action/Unpack.pm: This action plugin unpack
+ package files somewhere.
+ When unpack_inside_distribution_root is set, dest_directory is
+ relative to the distribution root.
+ When the package is a noarch, the wanted files are unpacked in
+ distribution root of each archs.
+
+ eg:
+ unpack_installer_images:
+ class: Youri::Submit::Action::Unpack
+ options:
+ name: drakx-installer-images
+ source_subdir: /usr/lib*/drakx-installer-images
+ dest_directory: .
+ unpack_inside_distribution_root: 1
+
+2007-01-30 10:02 pixel
+
+ * lib/Youri/Submit/Check/ACL.pm, lib/Youri/Submit/Check/Host.pm,
+ lib/Youri/Submit/Check/Queue_recency.pm,
+ lib/Youri/Submit/Check/Rpmlint.pm, lib/Youri/Submit/Check/SVN.pm,
+ lib/Youri/Submit/Check/Source.pm, lib/Youri/Submit/Check/Type.pm,
+ lib/Youri/Submit/Check/Version.pm, lib/Youri/Submit/Pre/Rsync.pm,
+ lib/Youri/Submit/Reject/Archive.pm,
+ lib/Youri/Submit/Reject/Clean.pm,
+ lib/Youri/Submit/Reject/Install.pm,
+ lib/Youri/Submit/Reject/Mail.pm: fix $Id$ expansion
+
+2007-01-30 10:01 pixel
+
+ * lib/Youri/Submit/Plugin.pm, lib/Youri/Submit/Post.pm,
+ lib/Youri/Submit/Pre.pm, lib/Youri/Submit/Reject.pm: fix pod and
+ $Id$ expansion
+
+2007-01-30 10:00 pixel
+
+ * lib/Youri/Submit/Post.pm: fix pod
+
+2007-01-30 09:59 pixel
+
+ * lib/Youri/Submit/Action/Send.pm: fix pod
+
+2007-01-30 09:58 pixel
+
+ * lib/Youri/Submit/Action/Markrelease.pm,
+ lib/Youri/Submit/Action/Scp.pm: fix pod
+
+2007-01-30 09:49 pixel
+
+ * lib/Youri/Submit/Action/Clean.pm,
+ lib/Youri/Submit/Action/Link.pm,
+ lib/Youri/Submit/Action/Markrelease.pm,
+ lib/Youri/Submit/Action/Rpminfo.pm,
+ lib/Youri/Submit/Action/Scp.pm, lib/Youri/Submit/Action/Send.pm:
+ fix $Id$ expansion
+
+2007-01-26 11:25 blino
+
+ * lib/Youri/Submit/Check/ACL.pm: really match section in ACL
+
+2007-01-26 11:24 blino
+
+ * lib/Youri/Submit/Check/ACL.pm: fix arch ACL matching (and thus
+ allow ACLs to match again)
+
+2006-12-24 10:31 mandrake
+
+ * lib/Youri/Submit/Post.pm, lib/Youri/Submit/Pre.pm,
+ lib/Youri/Submit/Reject.pm: Removing previous pristine/
+ directory.
+
+2006-12-24 03:15 mandrake
+
+ * lib/Youri/Submit/Action.pm: %repsys markrelease
+ version: 1.0
+ release: 0.20061223.3mdv2007.1
+ revision: 101968
+
+ Copying 1.0-0.20061223.3mdv2007.1 to releases/ directory.
+
+2006-10-16 16:05 warly
+
+ * lib/Youri/Submit/Check.pm: merging dev with upstream
+
+2006-11-14 22:01 mrl
+
+ * lib/Youri/Submit/Action/Rpminfo.pm: - Renamed package name tag.
+
+2006-11-14 16:38 mrl
+
+ * lib/Youri/Submit/Action/RpmInfo.pm,
+ lib/Youri/Submit/Action/Rpminfo.pm: - Renamed, due to some
+ enforcement (cfengine?).
+
+2006-11-14 13:23 mrl
+
+ * lib/Youri/Submit/Action/RpmInfo.pm: - Added package summary to
+ .info files.
+
+2006-11-13 12:40 mrl
+
+ * lib/Youri/Submit/Action/RpmInfo.pm: - First version of web
+ interface.
+
+2006-10-31 11:40 mandrake
+
+ * lib/Youri/Submit/Action/Archive.pm: unlink file in Archive for
+ the moment (should be done in clean but the code to detect which
+ packages is obsoleted has to be moved
+
+2006-10-26 11:26 mandrake
+
+ * lib/Youri/Submit/Action/CVS.pm: we perform CVS commit
+ asynchronously
+
+2006-10-26 11:21 mandrake
+
+ * lib/Youri/Submit/Action/Install.pm: rename the rpm to remove the
+ prefix
+
+2006-10-26 11:18 mandrake
+
+ * lib/Youri/Submit/Action/Mail.pm: fix double .
+
+2006-10-26 11:16 mandrake
+
+ * lib/Youri/Submit/Post/Gendistrib.pm: add gendistrib command
+ directly into gendistrib module
+
+2006-10-26 11:14 mandrake
+
+ * lib/Youri/Submit/Pre/Rsync.pm: return correct packages table for
+ groups
+
+2006-10-26 11:10 mandrake
+
+ * lib/Youri/Submit/Reject/Install.pm: get_reject_path seems to be
+ the new name
+
+2006-10-26 11:07 mandrake
+
+ * lib/Youri/Submit/Reject/Mail.pm: $last_change is sometime empty
+
+2006-10-24 11:07 warly
+
+ * bin/youri-submit.in: exit with an error code if an error occured
+ in one group; s/Upload/Submit/; use new structure name from
+ upstream
+
+2006-10-23 11:48 warly
+
+ * lib/Youri/Submit/Check/ACL.pm,
+ lib/Youri/Submit/Check/Queue_recency.pm,
+ lib/Youri/Submit/Check/Rpmlint.pm, lib/Youri/Submit/Check/SVN.pm,
+ lib/Youri/Submit/Check/Source.pm,
+ lib/Youri/Submit/Check/Version.pm: must return an empty value
+
+2006-10-18 12:46 warly
+
+ * lib/Youri/Submit/Check/Rpmlint.pm: remove debug code
+
+2006-10-17 16:10 warly
+
+ * lib/Youri/Submit/Check/ACL.pm: now checks must return the error
+ message
+
+2006-10-17 16:04 warly
+
+ * lib/Youri/Submit/Check/ACL.pm, lib/Youri/Submit/Check/Host.pm,
+ lib/Youri/Submit/Check/Queue_recency.pm,
+ lib/Youri/Submit/Check/Rpmlint.pm, lib/Youri/Submit/Check/SVN.pm,
+ lib/Youri/Submit/Check/Source.pm,
+ lib/Youri/Submit/Check/Version.pm: now checks must return the
+ error message
+
+2006-10-17 15:16 warly
+
+ * lib/Youri/Submit/Action/Clean.pm,
+ lib/Youri/Submit/Action/Link.pm, lib/Youri/Submit/Check/ACL.pm,
+ lib/Youri/Submit/Check/Host.pm,
+ lib/Youri/Submit/Check/Queue_recency.pm,
+ lib/Youri/Submit/Check/SVN.pm, lib/Youri/Submit/Check/Source.pm,
+ lib/Youri/Submit/Check/Type.pm,
+ lib/Youri/Submit/Check/Version.pm, lib/Youri/Submit/Post.pm,
+ lib/Youri/Submit/Pre.pm, lib/Youri/Submit/Reject.pm:
+ s/Upload/Submit/g
+
+2006-10-17 13:53 warly
+
+ * ., ChangeLog, MANIFEST.SKIP, Makefile.PL, README, TODO,
+ bin/youri-submit-proxy.in, bin/youri-submit-restricted.in,
+ bin/youri-submit.in, etc, etc/bash_completion.d,
+ etc/bash_completion.d/youri-submit, etc/submit.conf,
+ lib/Youri/Submit/Plugin.pm, t, t/00distribution.t: merge with
+ upstream
+
+2006-10-16 16:27 warly
+
+ * lib/Youri/Submit/Post/Gendistrib.pm,
+ lib/Youri/Submit/Pre/Rsync.pm,
+ lib/Youri/Submit/Reject/Archive.pm,
+ lib/Youri/Submit/Reject/Clean.pm,
+ lib/Youri/Submit/Reject/Install.pm,
+ lib/Youri/Submit/Reject/Mail.pm: Now the module is Submit and not
+ Upload
+
+2006-10-16 16:26 warly
+
+ * lib/Youri/Submit/Check, lib/Youri/Submit/Check/History.pm,
+ lib/Youri/Submit/Check/Precedence.pm,
+ lib/Youri/Submit/Check/Recency.pm,
+ lib/Youri/Submit/Check/Rpmlint.pm, lib/Youri/Submit/Check/Tag.pm,
+ lib/Youri/Submit/Check/Type.pm: merging dev with upstream
+
+2006-10-16 16:15 warly
+
+ * lib/Youri/Submit/Post.pm, lib/Youri/Submit/Pre.pm,
+ lib/Youri/Submit/Reject.pm: now plugins are complete abstract
+ classes
+
+2006-10-16 16:08 warly
+
+ * lib/Youri/Submit/Action.pm: merging dev with upstream
+
+2006-10-16 16:05 warly
+
+ * lib/Youri/Submit/Check.pm: merging dev with upstream
+
+2006-10-16 13:03 warly
+
+ * lib/Youri/Submit/Action/Markrelease.pm,
+ lib/Youri/Submit/Action/Scp.pm, lib/Youri/Submit/Action/Send.pm:
+ Now the Module is Submit
+
+2006-10-16 12:57 warly
+
+ * lib/Youri/Submit/Action, lib/Youri/Submit/Action/Archive.pm,
+ lib/Youri/Submit/Action/Bugzilla.pm,
+ lib/Youri/Submit/Action/CVS.pm, lib/Youri/Submit/Action/Clean.pm,
+ lib/Youri/Submit/Action/Install.pm,
+ lib/Youri/Submit/Action/Link.pm, lib/Youri/Submit/Action/Mail.pm,
+ lib/Youri/Submit/Action/RSS.pm, lib/Youri/Submit/Action/Sign.pm:
+ merging dev with upstream
+
+2006-10-16 11:33 warly
+
+ * bin/youri-check.in: add new youri subsections (from upstream)
+
+2006-10-16 11:30 warly
+
+ * lib/Youri/Submit: add new youri subsections (from upstream)
+
+2006-10-16 11:30 warly
+
+ * lib/Youri: add new youri subsections (from upstream)
+
+2006-10-16 11:30 warly
+
+ * lib: add new youri subsections (from upstream)
+
+2006-10-16 11:22 warly
+
+ * bin/youri-submit.in: add new youri subsections (from upstream)
+
+2006-10-16 11:18 warly
+
+ * bin: add new youri subsections (from upstream)
+
+2006-10-16 11:18 warly
+
+ * .: add new youri subsections (from upstream)
+
+2006-04-23 Guillaume Rousse <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">guillomovitch at zarb.org</A>> 0.9
+ * initial release
Added: build_system/mdv-youri-submit/trunk/MANIFEST.SKIP
===================================================================
--- build_system/mdv-youri-submit/trunk/MANIFEST.SKIP (rev 0)
+++ build_system/mdv-youri-submit/trunk/MANIFEST.SKIP 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,11 @@
+\.tar\.gz$
+\.SKIP$
+~$
+^pm_to_blib$
+^Makefile$
+^Makefile\.old$
+^bin/youri-submit$
+^bin/youri-submit-restricted$
+^bin/youri-submit-proxy$
+.svn
+blib
Added: build_system/mdv-youri-submit/trunk/Makefile.PL
===================================================================
--- build_system/mdv-youri-submit/trunk/Makefile.PL (rev 0)
+++ build_system/mdv-youri-submit/trunk/Makefile.PL 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,97 @@
+# $Id: Makefile.PL 1723 2006-10-17 13:53:27Z warly $
+use ExtUtils::MakeMaker;
+use Config;
+
+WriteMakefile(
+ NAME => 'youri-submit',
+ VERSION => 0.9,
+ AUTHOR => 'Youri project <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">youri at zarb.org</A>>',
+ EXE_FILES => [
+ 'bin/youri-submit',
+ 'bin/youri-submit-restricted',
+ 'bin/youri-submit-proxy'
+ ],
+ PREREQ_PM => {
+ 'Youri::Config' => 0,
+ 'Youri::Utils' => 0,
+ 'Pod::Simple::HTMLBatch' => 0
+ },
+ PREFIX => '/usr/local',
+ INSTALLPRIVLIB => $Config{installprivlib},
+ INSTALLSITELIB => $Config{installsitelib},
+ INSTALLVENDORLIB => $Config{installvendorlib},
+ INSTALLMAN3DIR => $Config{installman3dir},
+ INSTALLSITEMAN3DIR => $Config{installsiteman3dir},
+ INSTALLVENDORMAN3DIR => $Config{installvendorman3dir},
+ INSTALLSCRIPT => '$(PREFIX)/bin',
+ INSTALLSITESCRIPT => '$(PREFIX)/bin',
+ INSTALLVENDORSCRIPT => '$(PREFIX)/bin',
+ INSTALLMAN1DIR => '$(PREFIX)/share/man/man1',
+ INSTALLSITEMAN1DIR => '$(PREFIX)/share/man/man1',
+ INSTALLVENDORMAN1DIR => '$(PREFIX)/share/man/man1',
+);
+
+package MY;
+
+sub post_constants {
+ my ($self) = @_;
+ my $sysconfdir = $self->{ARGS}->{SYSCONFDIR} || '$(PREFIX)/etc';
+ return <<EOF;
+SYSCONFDIR = $sysconfdir
+EOF
+}
+
+sub top_targets {
+ my ($self) = @_;
+ my $top_targets = $self->SUPER::top_targets(@_);
+ $top_targets =~ s/all :: pure_all manifypods/all :: pure_all manifypods htmlifypods/;
+ $top_targets .= <<'EOF';
+htmlifypods : $(TO_INST_PM)
+ if [ ! -d blib/html ]; then mkdir blib/html; fi
+ perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go lib blib/html
+ pod2html < bin/youri-submit > blib/html/youri-submit.html
+ pod2html < bin/youri-submit-restricted > blib/html/youri-submit-restricted.html
+ pod2html < bin/youri-submit-proxy > blib/html/youri-submit-proxy.html
+EOF
+ return $top_targets;
+}
+
+sub install {
+ my ($self) = @_;
+ my $install = $self->SUPER::install(@_);
+ $install =~ s/install :: all pure_install doc_install/install :: all pure_install doc_install config_install completion_install/;
+ $install .= <<'EOF';
+config_install :
+ install -d -m 755 $(DESTDIR)$(SYSCONFDIR)/youri
+ install -m 644 etc/submit.conf $(DESTDIR)$(SYSCONFDIR)/youri
+
+completion_install :
+ install -d -m 755 $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
+ install -m 644 etc/bash_completion.d/youri-submit $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
+EOF
+ return $install;
+}
+
+sub installbin {
+ my ($self) = @_;
+ my $installbin = $self->SUPER::installbin(@_);
+ $installbin .= <<'EOF';
+bin/youri-submit : bin/youri-submit.in Makefile
+ perl -p \
+ -e 's|\@sysconfdir\@|$(SYSCONFDIR)|;' \
+ < $< > $@
+
+bin/youri-submit-restricted : bin/youri-submit-restricted.in Makefile
+ perl -p \
+ -e 's|\@sysconfdir\@|$(SYSCONFDIR)|;' \
+ -e 's|\@bindir\@|$(PREFIX)/bin|;' \
+ < $< > $@
+
+bin/youri-submit-proxy : bin/youri-submit-proxy.in Makefile
+ perl -p \
+ -e 's|\@sysconfdir\@|$(SYSCONFDIR)|;' \
+ -e 's|\@bindir\@|$(PREFIX)/bin|;' \
+ < $< > $@
+EOF
+ return $installbin;
+}
Added: build_system/mdv-youri-submit/trunk/README
===================================================================
--- build_system/mdv-youri-submit/trunk/README (rev 0)
+++ build_system/mdv-youri-submit/trunk/README 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,45 @@
+YOURI project
+-------------
+
+YOURI stands for "Youri Offers an Upload & Repository Infrastucture". It aims
+to build tools making management of a coherent set of packages easier.
+
+Description
+-----------
+Managing a package repository involves many tasks, such as keeping packages
+tree tidy, generating packages indexes, synchronising bug report system,
+running coherency checks, checking for available updates, etc...
+
+Instead of a gazillion project-specific scripts, we aim to provide a generic package-format independant framework, so as to build coherent and robust tools.
+
+Components
+----------
+Available software in this release
+- youri-check allows to check packages
+- youri-upload allows to upload packages
+
+Installation
+------------
+To install, just use:
+perl Makefile.PL
+make
+make test
+
+All standard MakeMaker variables are usable, with the addition of SYSCONFDIR to
+specify configuration files destination.
+
+Copyright and License
+---------------------
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+Authors
+-------
+Guillaume Rousse <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">guillomovitch at zarb.org</A>>,
+Pascal Terjan <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">pterjan at zarb.org</A>>
+Damien Krotkine <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">dams at zarb.org</A>>
+Olivier Thauvin <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">nanardon at zarb.org</A>>
+Ville Skytt\xE4 <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">ville.skytta at iki.fi</A>>
+
Added: build_system/mdv-youri-submit/trunk/TODO
===================================================================
--- build_system/mdv-youri-submit/trunk/TODO (rev 0)
+++ build_system/mdv-youri-submit/trunk/TODO 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,6 @@
+1.0 Goals
+=========
+
+- svn support
+- automatic bugzilla ticket closing on upload
+- more customizable (template based ?) mail notification
Added: build_system/mdv-youri-submit/trunk/bin/youri-check.in
===================================================================
--- build_system/mdv-youri-submit/trunk/bin/youri-check.in (rev 0)
+++ build_system/mdv-youri-submit/trunk/bin/youri-check.in 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,395 @@
+#!/usr/bin/perl
+# $Id: youri-check.in 1699 2006-10-16 11:33:58Z warly $
+
+=head1 NAME
+
+youri-check - package check agent
+
+=head1 VERSION
+
+Version 1.0
+
+=head1 SYNOPSIS
+
+youri-check [options] <mode>
+
+Options:
+
+ --config <file> use file <file> as config file
+ --skip-media <media> skip media <media>
+ --skip-plugin <plugin> skip plugin <plugin>
+ --parallel parallel run
+ --verbose verbose run
+ --test test run
+ --help print this help message
+
+=head1 DESCRIPTION
+
+B<youri-check> allows to check packages in a repository.
+
+In input mode, all medias defined in configuration are passed to a list of
+input plugins, each of them storing their result in a persistent resultset. In
+output mode, this resultset is passed to a list of output plugins, each of them
+producing arbitrary effects.
+
+=head1 OPTIONS
+
+=over
+
+=item B<--config> <file>
+
+Use given file as configuration, instead of normal one.
+
+=item B<--skip-media> <media>
+
+Skip media with given identity.
+
+=item B<--skip-plugin> <plugin>
+
+Skip plugin with given identity.
+
+=item B<--parallel>
+
+Run all plugins parallelously
+
+=item B<--verbose>
+
+Produce more verbose output (can be used more than once)
+
+=item B<--test>
+
+Don't perform any modification.
+
+=item B<--help>
+
+Print a brief help message and exits.
+
+=back
+
+=head1 CONFIGURATION
+
+Configuration is read from the first file found among:
+
+=over
+
+=item * the one specified by B<--config> option on command-line
+
+=item * $HOME/.youri/check.conf
+
+=item * @sysconfdir@/youri/check.conf
+
+=back
+
+All additional configuration files specified by B<includes> directive are then
+processed. Then command line options. Any directive overrides prior definition.
+
+=over
+
+=item B<includes> I<files>
+
+Uses space-separated list I<files> as a list of additional configuration files.
+
+=item B<resolver> I<id>
+
+Declare a maintainer resolver object with identity I<id>.
+
+=item B<preferences> I<id>
+
+Declare a maintainer preferences object with identity I<id>.
+
+=item B<resultset> I<id>
+
+Declare a resultset object with identity I<id>.
+
+=item B<medias> I<ids>
+
+Declares a list of media objects with identity taken in space-separated list
+I<ids>.
+
+=item B<inputs> I<ids>
+
+Declares a list of input plugin objects with identity taken in space-separated
+list I<ids>.
+
+=item B<outputs> I<ids>
+
+Declares a list of output plugin objects with identity taken in space-separated
+list I<ids>.
+
+=back
+
+Each object declared in configuration must be fully defined later, using a
+configuration section, starting with bracketed object identity, followed by at
+least a class directive, then any number of additional object-specific
+directives.
+
+Example:
+
+ objects = foo
+
+ [foo]
+ class = Foo::Bar
+ key1 = value1
+ key2 = value2
+
+=head1 SEE ALSO
+
+Youri::Config, for configuration file format.
+
+Each used plugin man page, for available options.
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+use strict;
+use warnings;
+
+use Youri::Config;
+use Youri::Utils;
+use Pod::Usage;
+use Net::Config qw/%NetConfig/;
+use DateTime;
+
+my $config = Youri::Config->new(
+ command_spec => [
+ 'config=s',
+ 'skip-plugin=s@',
+ 'skip-media=s@',
+ 'parallel!',
+ 'help|h!',
+ 'test|t!',
+ 'verbose|v!'
+ ],
+ file_spec => [
+ 'includes=s',
+ 'resolver=s',
+ 'preferences=s',
+ 'resultset=s',
+ 'medias=s',
+ 'inputs=s',
+ 'outputs=s'
+ ],
+ directories => [ '@sysconfdir@', "$ENV{HOME}/.youri" ],
+ file_name => 'check.conf',
+ caller => $0,
+);
+
+pod2usage(
+ -verbose => 0,
+ -message => "No mode specified, aborting\n"
+) unless @ARGV;
+
+my $mode = $ARGV[0];
+
+# convenient global flags
+my $test = $config->get('test');
+my $verbose = $config->get('verbose');
+
+# libnet configuration
+my %netconfig = $config->get_section('netconfig');
+$NetConfig{$_} = $netconfig{$_} foreach keys %netconfig;
+
+# resultset creation
+my $resultset_id = $config->get('resultset');
+die "No resultset defined" unless $resultset_id;
+
+report("Creating resultset $resultset_id");
+my $resultset = create_instance(
+ 'Youri::Check::Resultset',
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ $config->get_section($resultset_id)
+);
+
+my $children;
+
+my %skip_plugins = map { $_ => 1 } @{$config->get('skip-plugin')};
+
+if ($mode eq 'input') {
+
+ # additional objects
+
+ my $resolver;
+ my $resolver_id = $config->get('resolver');
+ if ($resolver_id) {
+ report("Creating maintainer resolver $resolver_id");
+ eval {
+ $resolver = create_instance(
+ 'Youri::Check::Maintainer::Resolver',
+ test => $test,
+ verbose => $verbose > 1 ? $verbose - 2 : 0,
+ $config->get_section($resolver_id)
+ );
+ };
+ print STDERR "Failed to create maintainer resolver $resolver_id: $@\n" if $@;
+ }
+
+ my $preferences;
+ my $preferences_id = $config->get('preferences');
+ if ($preferences_id) {
+ report("Creating maintainer preferences $preferences_id");
+ eval {
+ $preferences = create_instance(
+ 'Youri::Check::Maintainer::Preferences',
+ test => $test,
+ verbose => $verbose > 1 ? $verbose - 2 : 0,
+ $config->get_section($preferences_id)
+ );
+ };
+ print STDERR "Failed to create maintainer preferences $preferences_id: $@\n" if $@;
+ }
+
+ my @medias;
+ my %skip_medias = map { $_ => 1 } @{$config->get('skip-media')};
+ foreach my $id (split(/\s+/, $config->get('medias'))) {
+ next if $skip_medias{$id};
+ report("Creating media $id");
+ eval {
+ push(
+ @medias,
+ create_instance(
+ 'Youri::Media',
+ id => $id,
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ $config->get_section($id)
+ )
+ );
+ };
+ print STDERR "Failed to create media $id: $@\n" if $@;
+ }
+
+ # prepare resultset
+ $resultset->reset();
+ $resultset->set_resolver($resolver);
+
+
+ foreach my $id (split(/\s+/, $config->get('inputs'))) {
+ next if $skip_plugins{$id};
+ report("Creating input $id");
+ my $input;
+ eval {
+ $input = create_instance(
+ 'Youri::Check::Input',
+ id => $id,
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ resolver => $resolver,
+ preferences => $preferences,
+ $config->get_section($id)
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to create input $id: $@\n";
+ } else {
+ if ($config->get('parallel')) {
+ # fork
+ my $pid = fork;
+ die "Can't fork: $!" unless defined $pid;
+ if ($pid) {
+ # parent process
+ $children++;
+ next;
+ }
+ }
+ eval {
+ $input->prepare(@medias);
+ };
+ if ($@) {
+ print STDERR "Failed to prepare input $id: $@\n";
+ } else {
+ # clone resultset in child process
+ $resultset = $config->get('parallel') ?
+ $resultset->clone() :
+ $resultset;
+
+ foreach my $media (@medias) {
+ next if $media->skip_input($id);
+ my $media_id = $media->get_id();
+ report("running input $id on media $media_id");
+ eval {
+ $input->run($media, $resultset);
+ };
+ if ($@) {
+ print STDERR "Failed to run input $id on media $media_id: $@\n";
+ }
+ }
+ }
+ if ($config->get('parallel')) {
+ # child process
+ exit;
+ }
+ }
+ }
+
+} elsif ($mode eq 'output') {
+
+ foreach my $id (split(/\s+/, $config->get('outputs'))) {
+ next if $skip_plugins{$id};
+ report("Creating output $id");
+ my $output;
+ eval {
+ $output = create_instance(
+ 'Youri::Check::Output',
+ id => $id,
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ config => $config,
+ $config->get_section($id)
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to create output $id: $@\n";
+ } else {
+ if ($config->get('parallel')) {
+ # fork
+ my $pid = fork;
+ die "Can't fork: $!" unless defined $pid;
+ if ($pid) {
+ # parent process
+ $children++;
+ next;
+ }
+ }
+
+ # clone resultset in child process
+ $resultset = $config->get('parallel') ?
+ $resultset->clone() :
+ $resultset;
+
+ report("running output $id");
+ eval {
+ $output->run($resultset);
+ };
+ if ($@) {
+ print STDERR "Failed to run output $id: $@\n";
+ }
+
+ if ($config->get('parallel')) {
+ # child process
+ exit;
+ }
+ }
+ }
+} else {
+ die "Invalid mode $mode";
+}
+
+# wait for all forked processus termination
+while ($children) {
+ wait;
+ $children--;
+}
+
+sub report {
+ my ($message) = @_;
+ print DateTime->now()->strftime('[%H:%M:%S] ')
+ if $verbose > 1;
+ print "$message\n"
+ if $verbose > 0;
+}
Property changes on: build_system/mdv-youri-submit/trunk/bin/youri-check.in
___________________________________________________________________
Added: svn:executable
+ *
Added: build_system/mdv-youri-submit/trunk/bin/youri-submit
===================================================================
--- build_system/mdv-youri-submit/trunk/bin/youri-submit (rev 0)
+++ build_system/mdv-youri-submit/trunk/bin/youri-submit 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,534 @@
+#!/usr/bin/perl
+# $Id: youri-submit 232579 2007-12-17 19:45:47Z blino $
+
+=head1 NAME
+
+youri-submit - package submission tool
+
+=head1 VERSION
+
+Version 2.0
+
+=head1 SYNOPSIS
+
+youri-submit [options] <target> <files>
+
+youri-submit --list <category> [target]
+
+youri-submit --help [category] [item]
+
+Options:
+
+ --config <file> use file <file> as config file
+ --skip-pre <pre> skip pre <pre>
+ --skip-check <check> skip check <check>
+ --skip-action <action> skip action <action>
+ --skip-post <post> skip post <post>
+ --skip-reject <reject> skip reject <reject>
+ --define <key>=<value> pass additional values
+ --clean delete package after success
+ --verbose verbose run
+ --test test run
+ --list <category> list items from given category
+ --help [category] display contextual help
+
+=head1 DESCRIPTION
+
+B<youri-submit> allows to submit packages to a repository.
+
+All packages given on command lines are passed to a list of check plugins,
+depending on given upload target. If none of them fails, all packages are
+passed to a list of action plugins, depending also on given upload target.
+
+=head1 OPTIONS
+
+=over
+
+=item B<--config> I<file>
+
+Use given file as configuration, instead of normal one.
+
+=item B<--skip-pre> I<id>
+
+Skip pre transaction plugin with given identity
+
+=item B<--skip-check> I<id>
+
+Skip check plugin with given identity.
+
+=item B<--skip-action> I<id>
+
+Skip action plugin with given identity.
+
+=item B<--skip-post> I<id>
+
+Skip post transaction plugin with given identity.
+
+=item B<--skip-reject> I<id>
+
+Skip reject action plugin with given identity.
+
+=item B<--define> <key>=<value>
+
+Define additional parameters, to be used by plugins.
+
+=item B<--clean>
+
+Delete submited packages upon successfull submission.
+
+=item B<--verbose>
+
+Produce more verbose output (can be used more than once)
+
+=item B<--test>
+
+Don't perform any modification.
+
+=item B<--list> I<category>
+
+List available items from given category and exits. Category must be either
+B<targets>, B<actions> or B<checks>. A target is needed for the two last ones.
+
+=item B<--help> I<category>
+
+Display help for given category and exits. Category must be either
+B<repository>, B<action> or B<check>. An item is needed for the two last ones.
+If no category given, display standard help.
+
+=back
+
+=head1 CONFIGURATION
+
+Configuration is read from the first file found among:
+
+=over
+
+=item * the one specified by B<--config> option on command-line
+
+=item * $HOME/.youri/submit.conf
+
+=item * /usr/local/etc/youri/submit.conf
+
+=back
+
+The configuration file should be a YAML-format files, with the following
+mandatory top-level directives:
+
+=over
+
+=item B<repository>
+
+The definition of repository plugin to be used.
+
+=item B<targets>
+
+The list of available submission targets, each one being composed from the
+following keys:
+
+=over
+
+=item B<checks>
+
+The list of check plugins to use for this target.
+
+=item B<actions>
+
+The list of action plugins to use for this target.
+
+=back
+
+=item B<checks>
+
+The list of check plugin definitions, indexed by their identity.
+
+=item B<actions>
+
+The list of action plugin definitions, indexed by their identity.
+
+=back
+
+=head1 SEE ALSO
+
+Youri::Config, for additional details about configuration file format.
+
+Each used plugin man page, for available options.
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+use strict;
+use warnings;
+
+use Youri::Config;
+use Youri::Utils;
+use Pod::Usage;
+
+my $config = Youri::Config->new(
+ args => {
+ 'skip-check' => '=s@',
+ 'skip-action' => '=s@',
+ 'define' => '=s%',
+ 'verbose' => '|v!',
+ 'clean' => '!',
+ 'test' => '|t!',
+ 'list' => '|l!',
+ 'config' => '=s',
+ 'skip-prei' => '=s@',
+ 'skip-post' => '=s@',
+ 'skip-reject' => '=s@',
+ },
+ directories => [ "$ENV{HOME}/.youri", '/usr/local/etc/youri' ],
+ file => 'submit.conf',
+);
+
+if ($config->get_arg('list')) {
+ my $category = $ARGV[0];
+ pod2usage(-verbose => 0, -message => "No category specified, aborting\n")
+ unless $category;
+ if ($category eq 'targets') {
+ print join(' ', keys %{$config->get_param('targets')});
+ } elsif ($category eq 'checks' || $category eq 'actions') {
+ my $target = $ARGV[1];
+ pod2usage(-verbose => 0, -message => "No target specified, aborting\n")
+ unless $target;
+ if ($category eq 'checks') {
+ my $checks = $config->get_param('targets')->{$target}->{checks};
+ print join(' ', @{$checks}) if $checks;
+ } else {
+ my $actions = $config->get_param('targets')->{$target}->{actions};
+ print join(' ', @{$actions}) if $actions;
+ }
+ } else {
+ pod2usage(-verbose => 0, -message => "Invalid category $category, aborting\n")
+ }
+ print "\n";
+ exit 0;
+}
+
+if ($config->get_arg('help')) {
+ my $category = $ARGV[0];
+ my ($item, $section);
+ if ($category eq 'repository') {
+ $section = $config->get_param('repository');
+ pod2usage(
+ -verbose => 0,
+ -message => "No repository defined, aborting\n"
+ ) unless $section;
+ } elsif ($category eq 'check' || $category eq 'action') {
+ $item = $ARGV[1];
+ pod2usage(
+ -verbose => 0,
+ -message => "No item specified, aborting\n"
+ ) unless $item;
+ if ($category eq 'check') {
+ $section = $config->get_param('checks')->{$item};
+ pod2usage(
+ -verbose => 0,
+ -message => "No such check $item defined, aborting\n"
+ ) unless $section;
+ } else {
+ $section = $config->get_param('actions')->{$item};
+ pod2usage(
+ -verbose => 0,
+ -message => "No such action $item defined, aborting\n"
+ ) unless $section;
+ }
+ } else {
+ pod2usage(-verbose => 0, -message => "Invalid category $category, aborting\n")
+ }
+ my $file = $section->{class} . '.pm';
+ $file =~ s/::/\//g;
+ pod2usage(
+ -verbose => 99,
+ -sections => 'NAME|DESCRIPTION',
+ -input => $file,
+ -pathlist => \@INC
+ );
+}
+
+
+pod2usage(-verbose => 0, -message => "No target specified, aborting\n")
+ unless @ARGV > 0;
+pod2usage(-verbose => 0, -message => "No packages specified, aborting\n")
+ unless @ARGV > 1 || $config->get_param('allow_omitting_packages');
+
+# convenient global flags
+my $test = $config->get_arg('test');
+my $verbose = $config->get_arg('verbose');
+
+# check target
+my $target = shift @ARGV;
+my $target_conf = $config->get_param('targets')->{$target};
+
+# create repository
+my $repository;
+my $repository_conf = $config->get_param('repository');
+die "No repository declared" unless $repository_conf;
+print "Creating repository\n" if $verbose;
+eval {
+ $repository = create_instance(
+ 'Youri::Repository',
+ $repository_conf,
+ {
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ targets => [ keys %{$config->get_param('targets')} ],
+ }
+ );
+};
+die "Failed to create repository: $@\n" if $@;
+
+# perfrom pre action
+my @errors;
+my $pre_packages = [];
+my $skip_pres = $config->get_arg('skip-pre');
+my %skip_pres = $skip_pres ? map { $_ => 1 } @{$skip_pres} : ();
+foreach my $id (@{$target_conf->{pres}}) {
+ next if $skip_pres{$id};
+ print "Creating pre $id\n" if $verbose;
+ my $pre;
+ my $pre_conf = $config->get_param('pres')->{$id};
+
+ if (!$pre_conf) {
+ print STDERR "No such pre $id, skipping\n";
+ next;
+ }
+ eval {
+ $pre = create_instance(
+ 'Youri::Submit::Pre',
+ $pre_conf,
+ {
+ id => $id,
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ }
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to create pre $id: $@\n";
+ } else {
+ print "running pre $id\n" if $verbose;
+ my @err = $pre->run(
+ $pre_packages,
+ $repository,
+ $target,
+ $config->get_arg('define')
+ );
+ push(@errors, @err) if $err[0];
+ }
+}
+
+if (@errors) {
+ print "Pre-submission errors, aborting:\n";
+ foreach my $error (@errors) {
+ print " - $error\n";
+ }
+ exit(1)
+}
+
+# create packages group
+my $group_error;
+my @packages_group;
+foreach my $group ([ map { { section => "", file => $_ } } @ARGV ], @$pre_packages) {
+ my @packages;
+ foreach my $opt (@$group) {
+ print "Preparing upload for $opt->{file} in $opt->{section}\n" if $verbose;
+ $repository->{packages}{$opt->{file}}{section} = $opt->{section};
+ push(
+ @packages,
+ create_instance(
+ 'Youri::Package',
+ {
+ class => $repository->get_package_class(),
+ },
+ {
+ file => $opt->{file},
+ %$opt
+ },
+ )
+ );
+ }
+ @packages or next;
+
+# check all packages pass all tests
+ my %errors;
+ my $skip_check = $config->get_arg('skip-check');
+ my %skip_check = $skip_check ? map { $_ => 1 } @{$skip_check} : ();
+ my @error;
+ foreach my $id (@{$target_conf->{checks}}) {
+ next if $skip_check{$id};
+ print "Creating check $id\n" if $verbose;
+ my $check;
+ my $check_conf = $config->get_param('checks')->{$id};
+
+ if (!$check_conf) {
+ print STDERR "No such check $id, skipping\n";
+ next;
+ }
+ eval {
+ $check = create_instance(
+ 'Youri::Submit::Check',
+ $check_conf,
+ {
+ id => $id,
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ }
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to create check $id: $@\n";
+ } else {
+ foreach my $package (@packages) {
+ print "running check $id on package $package\n" if $verbose;
+ my @errors = $check->run(
+ $package,
+ $repository,
+ $target,
+ $config->get_arg('define')
+ );
+ push(@{$errors{$package}}, @errors) if $errors[0];
+ }
+ }
+ }
+ if (%errors) {
+ print "Submission errors, aborting:\n";
+ foreach my $package (keys %errors) {
+ print "- $package:\n";
+ foreach my $error (@{$errors{$package}}) {
+ print " - $error\n";
+ }
+ }
+ # reject the packages
+ my $skip_rejects = $config->get_arg('skip-reject');
+ my %skip_rejects = $skip_rejects ? map { $_ => 1 } @{$skip_rejects} : ();
+ foreach my $id (@{$target_conf->{rejects}}) {
+ next if $skip_rejects{$id};
+ print "Creating reject $id\n" if $verbose;
+ my $reject;
+ my $reject_conf = $config->get_param('rejects')->{$id};
+
+ if (!$reject_conf) {
+ print STDERR "No such reject $id, skipping\n";
+ next;
+ }
+ eval {
+ $reject = create_instance(
+ 'Youri::Submit::Reject',
+ $reject_conf,
+ {
+ id => $id,
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ }
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to create reject $id: $@\n";
+ } else {
+ foreach my $package (@packages) {
+ print "running reject $id on package $package\n" if $verbose;
+ eval {
+ $reject->run($package, \%errors, $repository, $target, $config->get_arg('define'));
+ };
+ if ($@) {
+ print STDERR "Failed to run action $id on package $package: $@\n";
+ }
+ }
+ }
+ }
+ $group_error = 1;
+ next
+ }
+
+# proceed further
+ my $skip_action = $config->get_arg('skip-action');
+ my %skip_action = $skip_action ? map { $_ => 1 } @{$skip_action} : ();
+ foreach my $id (@{$target_conf->{actions}}) {
+ next if $skip_action{$id};
+ print "Creating action $id\n" if $verbose;
+ my $action;
+ my $action_conf = $config->get_param('actions')->{$id};
+
+ if (!$action_conf) {
+ print STDERR "No such action $id, skipping\n";
+ next;
+ }
+ eval {
+ $action = create_instance(
+ 'Youri::Submit::Action',
+ $action_conf,
+ {
+ id => $id,
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ }
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to create action $id: $@\n";
+ } else {
+ foreach my $package (@packages) {
+ print "running action $id on package $package\n" if $verbose;
+ eval {
+ $action->run(
+ $package,
+ $repository,
+ $target,
+ $config->get_arg('define')
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to run action $id on package $package: $@\n";
+ }
+ }
+ }
+ }
+
+ if ($config->get_arg('clean')) {
+ foreach my $package (@packages) {
+ print "cleaning file $package\n" if $verbose;
+ unlink $package->as_file();
+ }
+ }
+}
+
+# perfrom post action
+my $skip_post = $config->get_arg('skip-post');
+my %skip_post = $skip_post ? map { $_ => 1 } @{$skip_post} : ();
+foreach my $id (@{$target_conf->{posts}}) {
+ next if $skip_post{$id};
+ print "Creating post $id\n" if $verbose;
+ my $post;
+ my $post_conf = $config->get_param('posts')->{$id};
+
+ if (!$post_conf) {
+ print STDERR "No such post $id, skipping\n";
+ next;
+ }
+ eval {
+ $post = create_instance(
+ 'Youri::Submit::Post',
+ $post_conf,
+ {
+ id => $id,
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ }
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to create post $id: $@\n";
+ } else {
+ print "running post $id\n" if $verbose;
+ my @err = $post->run($repository, $target, $config->get_arg('define'));
+ print STDERR "Error $id: @err\n" if @err
+ }
+}
+
+exit(1) if $group_error;
Property changes on: build_system/mdv-youri-submit/trunk/bin/youri-submit
___________________________________________________________________
Added: svn:executable
+ *
Added: build_system/mdv-youri-submit/trunk/bin/youri-submit-proxy.in
===================================================================
--- build_system/mdv-youri-submit/trunk/bin/youri-submit-proxy.in (rev 0)
+++ build_system/mdv-youri-submit/trunk/bin/youri-submit-proxy.in 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,77 @@
+#!/usr/bin/perl
+
+=head1 NAME
+
+youri-submit-proxy - proxy wrapper over youri-submit-restricted
+
+=head1 VERSION
+
+Version 1.0
+
+=head1 SYNOPSIS
+
+youri-submit-proxy [options] <target> <files>
+
+=head1 DESCRIPTION
+
+youri-submit-proxy is a proxy wrapper over youri-submit-restricted, intended to
+be used in collaborative work to change uid before calling it through sudo.
+
+=head1 SEE ALSO
+
+youri-submit-restricted(1), youri-submit(1)
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+use strict;
+use warnings;
+use Fcntl ':mode';
+use File::Basename;
+
+my ($uid, $gid);
+if (-l $0) {
+ # this is a symlink, get uid and gid from it
+ ($uid, $gid) = (lstat($0))[4, 5];
+} else {
+ ($uid, $gid) = (stat($0))[4, 5];
+}
+my $user = getpwuid($uid) or die "unknown uid $uid";
+my $prog = '@bindir@/youri-submit-restricted';
+
+my %dirs;
+my @options;
+foreach my $arg (@ARGV) {
+ if (-f $arg) {
+ # push parent dir in list
+ my $parent = dirname($arg);
+ $dirs{$parent}++;
+ }
+ push(@options, $arg);
+}
+
+foreach my $dir (keys %dirs) {
+ # save original perms and gid
+ my ($orig_mode, $orig_gid) = (stat($dir))[2,5];
+ $dirs{$dir} = {
+ mode => $orig_mode,
+ gid => $orig_gid
+ };
+ # ensure correct perms and gid
+ chown -1, $gid, $dir;
+ chmod $orig_mode|S_IRGRP|S_IWGRP, $dir;
+}
+
+# call wrapped program
+system('sudo', '-H', '-u', $user, $prog, @options);
+
+foreach my $dir (keys %dirs) {
+ # restore original perms and gid
+ chown -1, $dirs{$dir}->{gid}, $dir;
+ chmod $dirs{$dir}->{mode}, $dir;
+}
Property changes on: build_system/mdv-youri-submit/trunk/bin/youri-submit-proxy.in
___________________________________________________________________
Added: svn:executable
+ *
Added: build_system/mdv-youri-submit/trunk/bin/youri-submit-restricted.in
===================================================================
--- build_system/mdv-youri-submit/trunk/bin/youri-submit-restricted.in (rev 0)
+++ build_system/mdv-youri-submit/trunk/bin/youri-submit-restricted.in 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,64 @@
+#!/usr/bin/perl -T
+
+=head1 NAME
+
+youri-submit-restricted - filtering wrapper over youri-submit
+
+=head1 VERSION
+
+Version 1.0
+
+=head1 SYNOPSIS
+
+youri-submit-restricted [options] <target> <files>
+
+=head1 DESCRIPTION
+
+youri-submit-restricted is just a filtering wrapper over youri-submit, intended
+to be used in collaborative work to sanitize environment and options before
+calling it.
+
+=head1 SEE ALSO
+
+youri-submit(1)
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+use strict;
+use warnings;
+
+my $prog = '@bindir@/youri-submit';
+my @prohibited_options = qw/--config --skip-check --skip-action/;
+my %prohibited_options = map { $_ => 1 } @prohibited_options;
+my @prohibited_envvars = qw/
+ ENV BASH_ENV IFS CDPATH
+ PERLLIB PERL5LIB PERL5OPT PERLIO
+ PERLIO_DEBUG PERL5DB PERL_ENCODING
+ PERL_HASH_SEED PERL_SIGNALS PERL_UNICODE
+/;
+
+my @options;
+while (my $arg = shift @ARGV) {
+ if ($prohibited_options{$arg}) {
+ # drop prohibited options
+ print STDERR "prohibited option $arg, skipping\n";
+ shift @ARGV;
+ } else {
+ # untaint everything else
+ $arg =~ /(.*)/;
+ push(@options, $1);
+ }
+}
+
+# secure ENV
+$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin";
+delete $ENV{$_} foreach @prohibited_envvars;
+
+# call wrapped program
+system($prog, @options);
Property changes on: build_system/mdv-youri-submit/trunk/bin/youri-submit-restricted.in
___________________________________________________________________
Added: svn:executable
+ *
Added: build_system/mdv-youri-submit/trunk/bin/youri-submit.in
===================================================================
--- build_system/mdv-youri-submit/trunk/bin/youri-submit.in (rev 0)
+++ build_system/mdv-youri-submit/trunk/bin/youri-submit.in 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,534 @@
+#!/usr/bin/perl
+# $Id: youri-submit.in 232668 2007-12-21 14:37:04Z blino $
+
+=head1 NAME
+
+youri-submit - package submission tool
+
+=head1 VERSION
+
+Version 2.0
+
+=head1 SYNOPSIS
+
+youri-submit [options] <target> <files>
+
+youri-submit --list <category> [target]
+
+youri-submit --help [category] [item]
+
+Options:
+
+ --config <file> use file <file> as config file
+ --skip-pre <pre> skip pre <pre>
+ --skip-check <check> skip check <check>
+ --skip-action <action> skip action <action>
+ --skip-post <post> skip post <post>
+ --skip-reject <reject> skip reject <reject>
+ --define <key>=<value> pass additional values
+ --clean delete package after success
+ --verbose verbose run
+ --test test run
+ --list <category> list items from given category
+ --help [category] display contextual help
+
+=head1 DESCRIPTION
+
+B<youri-submit> allows to submit packages to a repository.
+
+All packages given on command lines are passed to a list of check plugins,
+depending on given upload target. If none of them fails, all packages are
+passed to a list of action plugins, depending also on given upload target.
+
+=head1 OPTIONS
+
+=over
+
+=item B<--config> I<file>
+
+Use given file as configuration, instead of normal one.
+
+=item B<--skip-pre> I<id>
+
+Skip pre transaction plugin with given identity
+
+=item B<--skip-check> I<id>
+
+Skip check plugin with given identity.
+
+=item B<--skip-action> I<id>
+
+Skip action plugin with given identity.
+
+=item B<--skip-post> I<id>
+
+Skip post transaction plugin with given identity.
+
+=item B<--skip-reject> I<id>
+
+Skip reject action plugin with given identity.
+
+=item B<--define> <key>=<value>
+
+Define additional parameters, to be used by plugins.
+
+=item B<--clean>
+
+Delete submited packages upon successfull submission.
+
+=item B<--verbose>
+
+Produce more verbose output (can be used more than once)
+
+=item B<--test>
+
+Don't perform any modification.
+
+=item B<--list> I<category>
+
+List available items from given category and exits. Category must be either
+B<targets>, B<actions> or B<checks>. A target is needed for the two last ones.
+
+=item B<--help> I<category>
+
+Display help for given category and exits. Category must be either
+B<repository>, B<action> or B<check>. An item is needed for the two last ones.
+If no category given, display standard help.
+
+=back
+
+=head1 CONFIGURATION
+
+Configuration is read from the first file found among:
+
+=over
+
+=item * the one specified by B<--config> option on command-line
+
+=item * $HOME/.youri/submit.conf
+
+=item * /usr/local/etc/youri/submit.conf
+
+=back
+
+The configuration file should be a YAML-format files, with the following
+mandatory top-level directives:
+
+=over
+
+=item B<repository>
+
+The definition of repository plugin to be used.
+
+=item B<targets>
+
+The list of available submission targets, each one being composed from the
+following keys:
+
+=over
+
+=item B<checks>
+
+The list of check plugins to use for this target.
+
+=item B<actions>
+
+The list of action plugins to use for this target.
+
+=back
+
+=item B<checks>
+
+The list of check plugin definitions, indexed by their identity.
+
+=item B<actions>
+
+The list of action plugin definitions, indexed by their identity.
+
+=back
+
+=head1 SEE ALSO
+
+Youri::Config, for additional details about configuration file format.
+
+Each used plugin man page, for available options.
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+use strict;
+use warnings;
+
+use Youri::Config;
+use Youri::Utils;
+use Pod::Usage;
+
+my $config = Youri::Config->new(
+ args => {
+ 'skip-check' => '=s@',
+ 'skip-action' => '=s@',
+ 'define' => '=s%',
+ 'verbose' => '|v!',
+ 'clean' => '!',
+ 'test' => '|t!',
+ 'list' => '|l!',
+ 'config' => '=s',
+ 'skip-prei' => '=s@',
+ 'skip-post' => '=s@',
+ 'skip-reject' => '=s@',
+ },
+ directories => [ "$ENV{HOME}/.youri", '@sysconfdir@/youri' ],
+ file => 'submit.conf',
+);
+
+if ($config->get_arg('list')) {
+ my $category = $ARGV[0];
+ pod2usage(-verbose => 0, -message => "No category specified, aborting\n")
+ unless $category;
+ if ($category eq 'targets') {
+ print join(' ', keys %{$config->get_param('targets')});
+ } elsif ($category eq 'checks' || $category eq 'actions') {
+ my $target = $ARGV[1];
+ pod2usage(-verbose => 0, -message => "No target specified, aborting\n")
+ unless $target;
+ if ($category eq 'checks') {
+ my $checks = $config->get_param('targets')->{$target}->{checks};
+ print join(' ', @{$checks}) if $checks;
+ } else {
+ my $actions = $config->get_param('targets')->{$target}->{actions};
+ print join(' ', @{$actions}) if $actions;
+ }
+ } else {
+ pod2usage(-verbose => 0, -message => "Invalid category $category, aborting\n")
+ }
+ print "\n";
+ exit 0;
+}
+
+if ($config->get_arg('help')) {
+ my $category = $ARGV[0];
+ my ($item, $section);
+ if ($category eq 'repository') {
+ $section = $config->get_param('repository');
+ pod2usage(
+ -verbose => 0,
+ -message => "No repository defined, aborting\n"
+ ) unless $section;
+ } elsif ($category eq 'check' || $category eq 'action') {
+ $item = $ARGV[1];
+ pod2usage(
+ -verbose => 0,
+ -message => "No item specified, aborting\n"
+ ) unless $item;
+ if ($category eq 'check') {
+ $section = $config->get_param('checks')->{$item};
+ pod2usage(
+ -verbose => 0,
+ -message => "No such check $item defined, aborting\n"
+ ) unless $section;
+ } else {
+ $section = $config->get_param('actions')->{$item};
+ pod2usage(
+ -verbose => 0,
+ -message => "No such action $item defined, aborting\n"
+ ) unless $section;
+ }
+ } else {
+ pod2usage(-verbose => 0, -message => "Invalid category $category, aborting\n")
+ }
+ my $file = $section->{class} . '.pm';
+ $file =~ s/::/\//g;
+ pod2usage(
+ -verbose => 99,
+ -sections => 'NAME|DESCRIPTION',
+ -input => $file,
+ -pathlist => \@INC
+ );
+}
+
+
+pod2usage(-verbose => 0, -message => "No target specified, aborting\n")
+ unless @ARGV > 0;
+pod2usage(-verbose => 0, -message => "No packages specified, aborting\n")
+ unless @ARGV > 1 || $config->get_param('allow_omitting_packages');
+
+# convenient global flags
+my $test = $config->get_arg('test');
+my $verbose = $config->get_arg('verbose');
+
+# check target
+my $target = shift @ARGV;
+my $target_conf = $config->get_param('targets')->{$target};
+
+# create repository
+my $repository;
+my $repository_conf = $config->get_param('repository');
+die "No repository declared" unless $repository_conf;
+print "Creating repository\n" if $verbose;
+eval {
+ $repository = create_instance(
+ 'Youri::Repository',
+ $repository_conf,
+ {
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ targets => [ keys %{$config->get_param('targets')} ],
+ }
+ );
+};
+die "Failed to create repository: $@\n" if $@;
+
+# perfrom pre action
+my @errors;
+my $pre_packages = [];
+my $skip_pres = $config->get_arg('skip-pre');
+my %skip_pres = $skip_pres ? map { $_ => 1 } @{$skip_pres} : ();
+foreach my $id (@{$target_conf->{pres}}) {
+ next if $skip_pres{$id};
+ print "Creating pre $id\n" if $verbose;
+ my $pre;
+ my $pre_conf = $config->get_param('pres')->{$id};
+
+ if (!$pre_conf) {
+ print STDERR "No such pre $id, skipping\n";
+ next;
+ }
+ eval {
+ $pre = create_instance(
+ 'Youri::Submit::Pre',
+ $pre_conf,
+ {
+ id => $id,
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ }
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to create pre $id: $@\n";
+ } else {
+ print "running pre $id\n" if $verbose;
+ my @err = $pre->run(
+ $pre_packages,
+ $repository,
+ $target,
+ $config->get_arg('define')
+ );
+ push(@errors, @err) if $err[0];
+ }
+}
+
+if (@errors) {
+ print "Pre-submission errors, aborting:\n";
+ foreach my $error (@errors) {
+ print " - $error\n";
+ }
+ exit(1)
+}
+
+# create packages group
+my $group_error;
+my @packages_group;
+foreach my $group ([ map { { section => "", file => $_ } } @ARGV ], @$pre_packages) {
+ my @packages;
+ foreach my $opt (@$group) {
+ print "Preparing upload for $opt->{file} in $opt->{section}\n" if $verbose;
+ $repository->{packages}{$opt->{file}}{section} = $opt->{section};
+ push(
+ @packages,
+ create_instance(
+ 'Youri::Package',
+ {
+ class => $repository->get_package_class(),
+ },
+ {
+ file => $opt->{file},
+ %$opt
+ },
+ )
+ );
+ }
+ @packages or next;
+
+# check all packages pass all tests
+ my %errors;
+ my $skip_check = $config->get_arg('skip-check');
+ my %skip_check = $skip_check ? map { $_ => 1 } @{$skip_check} : ();
+ my @error;
+ foreach my $id (@{$target_conf->{checks}}) {
+ next if $skip_check{$id};
+ print "Creating check $id\n" if $verbose;
+ my $check;
+ my $check_conf = $config->get_param('checks')->{$id};
+
+ if (!$check_conf) {
+ print STDERR "No such check $id, skipping\n";
+ next;
+ }
+ eval {
+ $check = create_instance(
+ 'Youri::Submit::Check',
+ $check_conf,
+ {
+ id => $id,
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ }
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to create check $id: $@\n";
+ } else {
+ foreach my $package (@packages) {
+ print "running check $id on package $package\n" if $verbose;
+ my @errors = $check->run(
+ $package,
+ $repository,
+ $target,
+ $config->get_arg('define')
+ );
+ push(@{$errors{$package}}, @errors) if $errors[0];
+ }
+ }
+ }
+ if (%errors) {
+ print "Submission errors, aborting:\n";
+ foreach my $package (keys %errors) {
+ print "- $package:\n";
+ foreach my $error (@{$errors{$package}}) {
+ print " - $error\n";
+ }
+ }
+ # reject the packages
+ my $skip_rejects = $config->get_arg('skip-reject');
+ my %skip_rejects = $skip_rejects ? map { $_ => 1 } @{$skip_rejects} : ();
+ foreach my $id (@{$target_conf->{rejects}}) {
+ next if $skip_rejects{$id};
+ print "Creating reject $id\n" if $verbose;
+ my $reject;
+ my $reject_conf = $config->get_param('rejects')->{$id};
+
+ if (!$reject_conf) {
+ print STDERR "No such reject $id, skipping\n";
+ next;
+ }
+ eval {
+ $reject = create_instance(
+ 'Youri::Submit::Reject',
+ $reject_conf,
+ {
+ id => $id,
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ }
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to create reject $id: $@\n";
+ } else {
+ foreach my $package (@packages) {
+ print "running reject $id on package $package\n" if $verbose;
+ eval {
+ $reject->run($package, \%errors, $repository, $target, $config->get_arg('define'));
+ };
+ if ($@) {
+ print STDERR "Failed to run action $id on package $package: $@\n";
+ }
+ }
+ }
+ }
+ $group_error = 1;
+ next
+ }
+
+# proceed further
+ my $skip_action = $config->get_arg('skip-action');
+ my %skip_action = $skip_action ? map { $_ => 1 } @{$skip_action} : ();
+ foreach my $id (@{$target_conf->{actions}}) {
+ next if $skip_action{$id};
+ print "Creating action $id\n" if $verbose;
+ my $action;
+ my $action_conf = $config->get_param('actions')->{$id};
+
+ if (!$action_conf) {
+ print STDERR "No such action $id, skipping\n";
+ next;
+ }
+ eval {
+ $action = create_instance(
+ 'Youri::Submit::Action',
+ $action_conf,
+ {
+ id => $id,
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ }
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to create action $id: $@\n";
+ } else {
+ foreach my $package (@packages) {
+ print "running action $id on package $package\n" if $verbose;
+ eval {
+ $action->run(
+ $package,
+ $repository,
+ $target,
+ $config->get_arg('define')
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to run action $id on package $package: $@\n";
+ }
+ }
+ }
+ }
+
+ if ($config->get_arg('clean')) {
+ foreach my $package (@packages) {
+ print "cleaning file $package\n" if $verbose;
+ unlink $package->as_file();
+ }
+ }
+}
+
+# perfrom post action
+my $skip_post = $config->get_arg('skip-post');
+my %skip_post = $skip_post ? map { $_ => 1 } @{$skip_post} : ();
+foreach my $id (@{$target_conf->{posts}}) {
+ next if $skip_post{$id};
+ print "Creating post $id\n" if $verbose;
+ my $post;
+ my $post_conf = $config->get_param('posts')->{$id};
+
+ if (!$post_conf) {
+ print STDERR "No such post $id, skipping\n";
+ next;
+ }
+ eval {
+ $post = create_instance(
+ 'Youri::Submit::Post',
+ $post_conf,
+ {
+ id => $id,
+ test => $test,
+ verbose => $verbose > 0 ? $verbose - 1 : 0,
+ }
+ );
+ };
+ if ($@) {
+ print STDERR "Failed to create post $id: $@\n";
+ } else {
+ print "running post $id\n" if $verbose;
+ my @err = $post->run($repository, $target, $config->get_arg('define'));
+ print STDERR "Error $id: @err\n" if @err
+ }
+}
+
+exit(1) if $group_error;
Property changes on: build_system/mdv-youri-submit/trunk/bin/youri-submit.in
___________________________________________________________________
Added: svn:executable
+ *
Added: build_system/mdv-youri-submit/trunk/etc/bash_completion.d/youri-submit
===================================================================
--- build_system/mdv-youri-submit/trunk/etc/bash_completion.d/youri-submit (rev 0)
+++ build_system/mdv-youri-submit/trunk/etc/bash_completion.d/youri-submit 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,60 @@
+# youri-submit completion
+# $Id$
+
+_youri-submit()
+{
+
+ local cur prev config
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --config)
+ _filedir
+ return 0
+ ;;
+ --list)
+ COMPREPLY=( $( compgen -W 'targets checks actions' -- $cur ) )
+ return 0
+ ;;
+ --help)
+ COMPREPLY=( $( compgen -W 'repository check action' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--define --clean -l --list -h --help -t \
+ --test -v --verbose' -- $cur ) )
+ # add dangereous option for main command
+ if [[ ${COMP_WORDS[0]} == youri-submit ]]; then
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]} --config --skip-check \
+ --skip-action' -- $cur ) )
+ fi
+ else
+ _count_args
+ case $args in
+ 1)
+ _find_config
+ COMPREPLY=( $( compgen -W '$( youri-submit $config --list targets )' -- $cur ) )
+ ;;
+ *)
+ _filedir
+ ;;
+ esac
+ fi
+
+}
+complete -F _youri-submit youri-submit youri-submit-restricted youri-submit-proxy
+
+_find_config()
+{
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == --config ]]; then
+ config="--config ${COMP_WORDS[i+1]}"
+ break
+ fi
+ done
+}
Added: build_system/mdv-youri-submit/trunk/etc/submit.conf
===================================================================
--- build_system/mdv-youri-submit/trunk/etc/submit.conf (rev 0)
+++ build_system/mdv-youri-submit/trunk/etc/submit.conf 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,134 @@
+# youri-submit sample configuration file
+# $Id: submit.conf 1723 2006-10-17 13:53:27Z warly $
+
+# helper variables
+home: /home/user
+
+# repository definition
+repository:
+ class: Youri::Repository::PLF
+ options:
+ install_root: ${home}/ftp/mandriva
+ version_root: ${home}/cvs
+ archive_root: ${home}/backup/mandriva
+ noarch: i586
+
+# targets definitions
+targets:
+ cooker:
+ checks:
+ - tag
+ - recency
+ - history
+ actions:
+ - sign
+ - install
+ - link
+ - archive
+ - clean
+ - bugzilla
+ - cvs
+ - mail
+ - rss
+
+ 2006.0:
+ checks:
+ - type
+ - tag
+ - recency
+ - history
+ - precedence
+ actions:
+ - sign
+ - install
+ - link
+ - archive
+ - clean
+
+# checks definitions
+checks:
+ tag:
+ class: Youri::Submit::Check::Tag
+ options:
+ tags:
+ release: 'plf$'
+ packager: '<\<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">w+ at zarb</A>\.org>$'
+ distribution: '^Mandriva Linux$'
+ vendor: '^Penguin Liberation Front$'
+
+ recency:
+ class: Youri::Submit::Check::Recency
+
+ history:
+ class: Youri::Submit::Check::History
+
+ precedence:
+ class: Youri::Submit::Check::Precedence
+ options:
+ target: cooker
+
+ type:
+ class: Youri::Submit::Check::Type
+ type: binary
+
+# actions definitions
+actions:
+ sign:
+ class: Youri::Submit::Action::Sign
+ options:
+ name: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">plf at zarb.org</A>
+ path: ${home}/.gnupg
+ passphrase: s3kr3t
+
+ install:
+ class: Youri::Submit::Action::Install
+
+ link:
+ class: Youri::Submit::Action::Link
+
+ archive:
+ class: Youri::Submit::Action::Archive
+
+ clean:
+ class: Youri::Submit::Action::Clean
+
+ mail:
+ class: Youri::Submit::Action::Mail
+ options:
+ mta: /usr/sbin/sendmail
+ to: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">plf-announce at zarb.org</A>
+ reply_to: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">plf-discuss at zarb.org</A>
+ from: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">plf at zarb.org</A>
+ prefix: RPM
+ cc:
+ hot-base: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">david at dindinx.org</A> <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">bellamy at neverland.net</A>
+ dcgui: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">mathen at ketelhot.de</A>
+ dclib: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">mathen at ketelhot.de</A>
+ Video-DVDRip: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">dvdrip-users at exit1.org</A>
+ hackVideo-DVDRip: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">dvdrip-users at exit1.org</A>
+ goosnes: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">tak at bard.sytes.net</A>
+ avidemux: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">fixounet at free.fr</A>
+ vobcopy: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">robos at muon.de</A>
+ drip: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">drip-devel at lists.sourceforge.net</A>
+ libdscaler: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">vektor at dumbterm.net</A>
+ xawdecode: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">pingus77 at ifrance.com</A>
+
+ rss:
+ class: Youri::Submit::Action::RSS
+ options:
+ file: ${home}/www/changelog.rss
+ title: PLF packages updates
+ link: <A HREF="http://plf.zarb.org/">http://plf.zarb.org/</A>
+ description: ChangeLog for PLF packages
+
+ cvs:
+ class: Youri::Submit::Action::CVS
+
+ bugzilla:
+ class: Youri::Submit::Action::Bugzilla
+ options:
+ host: localhost
+ base: plf_bugs
+ user: plf
+ pass: s3kr3t
+ contact: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">plf at zarb.org</A>
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Archive.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Archive.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Archive.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,90 @@
+# $Id: Archive.pm 265457 2010-01-28 13:09:30Z pterjan $
+package Youri::Submit::Action::Archive;
+
+=head1 NAME
+
+Youri::Submit::Action::Archive - Old revisions archiving
+
+=head1 DESCRIPTION
+
+This action plugin ensures archiving of old package revisions.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ perms => 644,
+ @_
+ );
+
+ $self->{_perms} = $options{perms};
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ # FIXME: workaround for $self->{_verbose} not being initialized properly
+ $self->{_verbose} = 1;
+ # all this should be in Mandriva_upload.pm
+ my $section = $repository->_get_section($package, $target, $define);
+ my $main_section = $repository->_get_main_section($package, $target, $define);
+ print "section $section main_section $main_section\n" if $self->{_verbose};
+ my $arch = $package->get_arch();
+ $arch = $self->{_noarch} if $arch eq 'noarch';
+ my $path = $arch eq 'src' ? "$target/SRPMS" : "$target/$arch/media";
+ $path = "$repository->{_install_root}/$path";
+ $path =~ s,/+,/,g;
+ foreach my $replaced_package (
+ $repository->get_replaced_packages($package, $target, $define)
+ ) {
+ my $file = $replaced_package->get_file();
+
+ # trap for debugging bug 34999
+ if ($file =~ /\/[\d.]+\/(main\/updates|.*\/release)/) {
+ my $bugmsg = "BUG#34999 WARNING: trying to remove from a release: $file\n";
+ open(BUG34999LOG, '>>', "/home/mandrake/bug34999.log");
+ print $bugmsg;
+ print BUG34999LOG localtime().": ".$bugmsg;
+ close BUG34999LOG;
+
+ next;
+ }
+
+ my ($rep_section, $rep_main_section) = $file =~ m,$path/(([^/]+)/.*)/[^/]+.rpm,;
+ # We do accept duplicate version for other submedia of the same main media section
+ print "(path '$path') file '$file' section '$rep_section' main_section '$rep_main_section'\n" if $self->{_verbose};
+ next if $rep_main_section eq $main_section && $rep_section ne $section;
+ my $dest = $repository->get_archive_dir($package, $target, $define);
+
+ print "archiving file $file to $dest\n" if $self->{_verbose};
+
+ unless ($self->{_test}) {
+ # create destination dir if needed
+ system("install -d -m " . ($self->{_perms} + 111) . " $dest")
+ unless -d $dest;
+
+ # install file to new location
+ system("install -m $self->{_perms} $file $dest");
+
+ print "deleting file $file\n" if $self->{_verbose};
+ unlink $file unless $self->{_test};
+ }
+ }
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Bugzilla.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Bugzilla.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Bugzilla.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,81 @@
+# $Id: Bugzilla.pm 1700 2006-10-16 12:57:42Z warly $
+package Youri::Submit::Action::Bugzilla;
+
+=head1 NAME
+
+Youri::Submit::Action::Bugzilla - Bugzilla synchronisation
+
+=head1 DESCRIPTION
+
+This action plugin ensures synchronisation with Bugzilla.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use Youri::Bugzilla;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ host => '',
+ base => '',
+ user => '',
+ pass => '',
+ contact => '',
+ @_
+ );
+
+ $self->{_bugzilla} = Youri::Bugzilla->new(
+ $options{host},
+ $options{base},
+ $options{user},
+ $options{pass}
+ );
+ $self->{_contact} = $options{contact};
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ return unless $package->is_source();
+
+ my $name = $package->get_name();
+ my $version = $package->get_version();
+ my $summary = $package->get_summary();
+ my $packager = $package->get_packager();
+ $packager =~ s/.*<(.*)>/$1/;
+
+ if ($self->{_bugzilla}->has_package($name)) {
+ my %versions =
+ map { $_ => 1 }
+ $self->{_bugzilla}->get_versions($name);
+ unless ($versions{$version}) {
+ print "adding version $version to bugzilla\n" if $self->{_verbose};
+ $self->{_bugzilla}->add_version($name, $version)
+ unless $self->{_test};
+ }
+ } else {
+ print "adding package $name to bugzilla\n" if $self->{_verbose};
+ $self->{_bugzilla}->add_package(
+ $name,
+ $summary,
+ $version,
+ $packager,
+ $self->{_contact}
+ ) unless $self->{_test};
+ }
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/CVS.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/CVS.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/CVS.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,135 @@
+# $Id: CVS.pm 224115 2007-07-02 09:17:15Z pixel $
+package Youri::Submit::Action::CVS;
+
+=head1 NAME
+
+Youri::Submit::Action::CVS - CVS versionning
+
+=head1 DESCRIPTION
+
+This action plugin ensures CVS versionning of package sources.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use Cwd;
+use File::Temp qw/tempdir/;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ exclude => '\.(tar(\.(gz|bz2))?|zip)$',
+ perms => 644,
+ @_
+ );
+
+ $self->{_exclude} = $options{exclude};
+ $self->{_perms} = $options{perms};
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ return unless $package->is_source();
+
+ my $name = $package->get_name();
+ my $version = $package->get_version();
+ my $release = $package->get_release();
+
+ my $root = $repository->get_version_root();
+ my $path = $repository->get_version_path($package, $target, $define);
+
+ # remember original directory
+ my $original_dir = cwd();
+
+ # get a safe temporary directory
+ my $dir = tempdir( CLEANUP => 1 );
+ chdir $dir;
+
+ # first checkout base directory only
+ system("cvs -Q -d $root co -l $path");
+
+ # try to checkout package directory
+ my $dest = $path . '/' . $name;
+ system("cvs -Q -d $root co $dest");
+
+ # create directory if previous import failed
+ unless (-d $dest) {
+ print "adding directory $dest\n" if $self->{_verbose};
+ system("install -d -m " . ($self->{_perms} + 111) . " $dest");
+ system("cvs -Q -d $root add $dest");
+ }
+
+ chdir $dest;
+
+ # remove all files
+ unlink grep { -f } glob '*';
+
+ # extract all rpm files locally
+ $package->extract();
+
+ # remove excluded files
+ if ($self->{_exclude}) {
+ unlink grep { -f && /$self->{_exclude}/ } glob '*';
+ }
+
+ # uncompress all compressed files
+ system("bunzip2 *.bz2 2>/dev/null");
+ system("gunzip *.gz 2>/dev/null");
+
+ my (@to_remove, @to_add, @to_add_binary);
+ foreach my $line (`cvs -nq update`) {
+ if ($line =~ /^\? (\S+)/) {
+ if (-B $1) {
+ push(@to_add_binary, $1);
+ } else {
+ push(@to_add, $1);
+ }
+ }
+ if ($line =~ /^U (\S+)/) {
+ push(@to_remove, $1);
+ }
+ }
+ if (@to_remove) {
+ my $to_remove = join(' ', @to_remove);
+ print "removing file(s) $to_remove\n" if $self->{_verbose};
+ system("cvs -Q remove $to_remove");
+ }
+ if (@to_add) {
+ my $to_add = join(' ', @to_add);
+ print "adding text file(s) $to_add\n" if $self->{_verbose};
+ system("cvs -Q add $to_add");
+ }
+ if (@to_add_binary) {
+ my $to_add_binary = join(' ', @to_add_binary);
+ print "adding binary file(s) $to_add_binary\n" if $self->{_verbose};
+ system("cvs -Q add -kb $to_add_binary");
+ }
+
+ print "committing current directory\n" if $self->{_verbose};
+ system("cvs -Q commit -m $version-$release") unless $self->{_test};
+
+ # tag new release
+ my $tag = "r$version-$release";
+ $tag =~ s/\./_/g;
+ print "tagging current directory as $tag\n" if $self->{_verbose};
+ system("cvs -Q tag $tag") unless $self->{_test};
+
+ # get back to original directory
+ chdir $original_dir;
+
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Clean.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Clean.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Clean.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,40 @@
+# $Id: Clean.pm 4742 2007-01-30 09:49:58Z pixel $
+package Youri::Submit::Action::Clean;
+
+=head1 NAME
+
+Youri::Submit::Action::Clean - Old revisions cleanup
+
+=head1 DESCRIPTION
+
+This action plugin ensures cleanup of old package revisions.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Action/;
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ foreach my $replaced_package (
+ $repository->get_replaced_packages($package, $target, $define)
+ ) {
+ my $file = $replaced_package->as_file();
+ print "deleting file $file\n" if $self->{_verbose};
+ unlink $file unless $self->{_test};
+ }
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/DkmsModuleInfo.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/DkmsModuleInfo.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/DkmsModuleInfo.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,111 @@
+# $Id$
+package Youri::Submit::Action::DkmsModuleInfo;
+
+=head1 NAME
+
+Youri::Submit::Action::DkmsModuleInfo - extract and commit info from dkms package.
+
+=head1 DESCRIPTION
+
+This action plugin extract modalias and description from dkms packages and commit them
+on a SVN module.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Action/;
+use File::Temp qw/tempdir/;
+use File::Basename;
+use SVN::Client;
+
+#- inlineed from MDK::Common::Various
+sub chomp_ { my @l = @_; chomp @l; wantarray() ? @l : $l[0] }
+
+sub _init {
+ my ($self, %options) = @_;
+
+ croak "undefined svn module" unless $options{svn_module};
+
+ foreach my $var ('svn_module') {
+ $self->{"_$var"} = $options{$var};
+ }
+
+ return $self;
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my ($dkms_name) = $package->get_canonical_name =~ /^dkms-(.*)$/ or return;
+ my $package_name = $package->get_name;
+ my ($kver) = $package_name =~ /^$dkms_name-kernel-(.*)$/ or return;
+
+ my @files = map { $_->[0] } $package->get_files;
+ my @module_files = grep { m!^(/lib/modules/|/var/lib/dkms-binary/).*\.ko(\.gz)?$! } @files
+ or return;
+
+ print "Submit::Action::DkmsModuleInfo: proceeding with $package_name\n" if $self->{_verbose};
+
+ my $tempdir = tempdir(CLEANUP => 1);
+ my $file = $package->as_file;
+ my $cmd = "rpm2cpio $file | (cd $tempdir ; cpio --quiet -id)";
+ print "Submit::Action::DkmsModuleInfo: doing $cmd\n" if $self->{_verbose};
+ if (system($cmd) != 0) {
+ print "Submit::Action::DkmsModuleInfo: failed!\n" if $self->{_verbose};
+ return;
+ }
+
+ my @fields = qw(description alias);
+
+ my (%modules);
+ foreach my $file (@module_files) {
+ print "Submit::Action::DkmsModuleInfo: extracting $file\n" if $self->{_verbose};
+ my $module = $file;
+ $module =~ s!.*/!!;
+ $module =~ s!\.ko(\.gz)$!!;
+ $modules{$module}{$_} = [ chomp_(`/sbin/modinfo -F $_ $tempdir$file`) ]
+ foreach @fields;
+ }
+
+ eval {
+ my $svn = SVN::Client->new();
+ my $dir = $tempdir . '/' . basename($self->{_svn_module});
+ my $revision = $svn->checkout($self->{_svn_module}, $dir, 'HEAD', 0);
+ my $vdir = $dir . '/' . $kver;
+ $svn->update($vdir, 'HEAD', 0);
+ -d $vdir or $svn->mkdir($vdir);
+ foreach my $module (keys %modules) {
+ print "Submit::Action::DkmsModuleInfo: adding module $module\n" if $self->{_verbose};
+ foreach my $field (@fields) {
+ my $file = "$vdir/$module.$field";
+ $svn->update($file, 'HEAD', 0);
+ my $exists = -f $file;
+ open(my $fh, ">", $file);
+ print $fh map { "$_\n" } @{$modules{$module}{$field}};
+ $svn->add($file, 1) if !$exists;
+ }
+ }
+
+ $svn->log_msg(sub { $_[0] = \"add dkms info for $dkms_name with kernel $kver" });
+ $svn->commit($vdir, 0);
+ };
+ if (my $error = $@) {
+ print "Submit::Action::DkmsModuleInfo: commit to svn failed ($error)!\n" if $self->{_verbose};
+ return;
+ }
+
+ 1;
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Install.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Install.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Install.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,74 @@
+# $Id: Install.pm 229772 2007-09-26 11:21:07Z blino $
+package Youri::Submit::Action::Install;
+
+=head1 NAME
+
+Youri::Submit::Action::Install - Package installation
+
+=head1 DESCRIPTION
+
+This action plugin ensures installation of new package revisions.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ perms => 644,
+ @_
+ );
+
+ $self->{_perms} = $options{perms};
+
+ return $self;
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my $file = $package->as_file();
+ my $rpm = $package->get_file_name();
+ my $dest = $repository->get_install_dir($package, $target, $define);
+
+ # FIXME remove prefix this should be done by a function
+ $rpm =~ s/^\d{14}\.\w*\.\w+\.\d+_//;
+ $rpm =~ s/^\@\d+://;
+ print "installing file $file to $dest/$rpm\n" if $self->{_verbose};
+
+ unless ($self->{_test}) {
+ # create destination dir if needed
+ if (! -d $dest) {
+ my $status =
+ system("install -d -m " . ($self->{_perms} + 111) . " $dest");
+ croak "Unable to create directory $dest: $?" if $status;
+ }
+
+ # install file to new location
+ my $status =
+ system("install -m $self->{_perms} $file $dest/$rpm");
+ croak "Unable to install file $file to $dest/$rpm: $?" if $status;
+
+ my $arch = $package->get_arch();
+ $repository->set_arch_changed($target, $arch);
+ $repository->set_install_dir_changed($dest);
+ }
+ $package->{_file} = "$dest/$rpm";
+ print "deleting file $file\n" if $self->{_verbose};
+ unlink $file unless $self->{_test};
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Link.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Link.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Link.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,80 @@
+# $Id: Link.pm 233641 2008-01-31 16:35:55Z pixel $
+package Youri::Submit::Action::Link;
+
+=head1 NAME
+
+Youri::Submit::Action::Link - Noarch packages linking
+
+=head1 DESCRIPTION
+
+This action plugin ensures linking of noarch packages between arch-specific
+directories.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use Cwd;
+use File::Spec;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ symbolic => 0, # use symbolic linking
+ @_
+ );
+
+ $self->{_symbolic} = $options{symbolic};
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ # only needed for noarch packages
+ return unless $package->get_arch() eq 'noarch';
+
+ my $default_dir = $repository->get_install_dir($package, $target, $define);
+ my $file = $package->get_file_name();
+
+ # FIXME remove prefix this should be done by a function
+ $file =~ s/^\d{14}\.\w*\.\w+\.\d+_//;
+ $file =~ s/^\@\d+://;
+
+ foreach my $arch ($repository->get_extra_arches()) {
+ # compute installation target, forcing arch
+ my $other_dir = $repository->get_install_dir(
+ $package,
+ $target,
+ $define,
+ { arch => $arch }
+ );
+
+ if (! $self->{_test}) {
+ my $current_dir = cwd();
+ chdir $other_dir;
+ my $default_file = File::Spec->abs2rel($default_dir) . '/' . $file;
+ if ($self->{_symbolic}) {
+ symlink $default_file, $file;
+ } else {
+ link $default_file, $file;
+ }
+ chdir $current_dir;
+ print "set_install_dir_changed($other_dir) for updated $file\n";
+ $repository->set_install_dir_changed($other_dir);
+ $repository->set_arch_changed($target, $arch);
+ }
+ }
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Mail.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Mail.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Mail.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,131 @@
+# $Id: Mail.pm 223952 2007-06-23 13:54:13Z pixel $
+package Youri::Submit::Action::Mail;
+
+=head1 NAME
+
+Youri::Submit::Action::Mail - Mail notification
+
+=head1 DESCRIPTION
+
+This action plugin ensures mail notification of new package revisions.
+
+=cut
+
+use warnings;
+use strict;
+use MIME::Entity;
+use Encode qw/from_to/;
+use Carp;
+use Youri::Package;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ mta => '/usr/sbin/sendmail',
+ to => '',
+ from => '',
+ cc => '',
+ prefix => '',
+ encoding => 'quoted-printable',
+ charset => 'iso-8859-1',
+ @_
+ );
+
+ croak "undefined mail MTA" unless $options{mta};
+ croak "invalid mail MTA $options{mta}" unless -x $options{mta};
+ croak "undefined to" unless $options{to};
+ if ($options{cc}) {
+ croak "cc should be an hashref" unless ref $options{cc} eq 'HASH';
+ }
+ croak "invalid charset $options{charset}"
+ unless Encode::resolve_alias($options{charset});
+
+ $self->{_mta} = $options{mta};
+ $self->{_to} = $options{to};
+ $self->{_from} = $options{from};
+ $self->{_cc} = $options{cc};
+ $self->{_prefix} = $options{prefix};
+ $self->{_encoding} = $options{encoding};
+ $self->{_charset} = $options{charset};
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ return unless $package->is_source();
+
+ my $from = $package->get_packager();
+
+ # force from adress if defined
+ $from =~ s/<.*>/<$self->{_from}>/ if $self->{_from};
+
+ my $subject = $self->get_subject($package, $repository, $target, $define);
+ my $content = $self->get_content($package, $repository, $target, $define);
+
+ # ensure proper codeset conversion
+ # for informations coming from package
+ my $charset = $repository->get_package_charset();
+ from_to($content, $charset, $self->{_charset});
+ from_to($subject, $charset, $self->{_charset});
+
+ my $mail = MIME::Entity->build(
+ Type => 'text/plain',
+ Charset => $self->{_charset},
+ Encoding => $self->{_encoding},
+ From => $from,
+ To => $self->{_to},
+ Subject => $subject,
+ Data => $content,
+ );
+
+ if ($self->{_cc}) {
+ my $cc = $self->{_cc}->{$package->get_name()};
+ $mail->head()->add('cc', $cc) if $cc;
+ }
+
+ if ($self->{_test}) {
+ $mail->print(\*STDOUT);
+ } else {
+ open(MAIL, "| $self->{_mta} -t -oi -oem") or die "Can't open MTA program: $!";
+ $mail->print(\*MAIL);
+ close MAIL;
+ }
+
+}
+
+sub get_subject {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my $section = $repository->_get_section($package, $target, $define);
+ return
+ ($self->{_prefix} ? '[' . $self->{_prefix} . '] ' : '' ) .
+ "$target " . ($section ? "$section " : '' ) .
+ $package->as_formated_string('%{name}-%{version}-%{release}');
+}
+
+sub get_content {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my $information = $package->get_information();
+ my $last_change = $package->get_last_change();
+
+ return
+ $information . "\n" .
+ $last_change->[Youri::Package::CHANGE_AUTHOR] . ":\n" .
+ $last_change->[Youri::Package::CHANGE_TEXT];
+}
+
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Markrelease.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Markrelease.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Markrelease.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,56 @@
+# $Id: Markrelease.pm 4743 2007-01-30 09:58:30Z pixel $
+package Youri::Submit::Action::Markrelease;
+
+=head1 NAME
+
+Youri::Submit::Action::Markrelease - calls markrelease
+
+=head1 DESCRIPTION
+
+This action plugin calls markrelease
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ perms => 644,
+ @_
+ );
+
+ return $self;
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ $package->is_source or return 1;
+ my $file = $package->get_file();
+ my $srpm_name = $package->get_canonical_name;
+
+ if ($repository->package_in_svn($srpm_name)) {
+ my $svn = $repository->get_svn_url();
+ my ($rev) = $file =~ /.*\/.*?\@(\d+):/;
+ print "Run repsys markrelease -f $file -r $rev $svn/$srpm_name\n";
+ # FIXME repsys ask for a username and password
+ # FIXME we should use the key in /var/home/mandrake so that /home/mandrake does not
+ # need to be mounted
+ system('repsys', 'markrelease', '-f', $file, '-r', $rev, "$svn/$srpm_name");
+ }
+ 1
+}
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/RSS.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/RSS.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/RSS.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,102 @@
+# $Id: RSS.pm 1700 2006-10-16 12:57:42Z warly $
+package Youri::Submit::Action::RSS;
+
+=head1 NAME
+
+Youri::Submit::Action::RSS - RSS notification
+
+=head1 DESCRIPTION
+
+This action plugin ensures RSS notification of new package revisions.
+
+=cut
+
+use warnings;
+use strict;
+use XML::RSS;
+use Encode qw/from_to/;
+use Carp;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ file => '',
+ title => '',
+ link => '',
+ description => '',
+ charset => 'iso-8859-1',
+ max_items => 10,
+ @_
+ );
+
+ croak "undefined rss file" unless $options{file};
+ croak "invalid charset $options{charset}"
+ unless Encode::resolve_alias($options{charset});
+
+ $self->{_file} = $options{file};
+ $self->{_title} = $options{title};
+ $self->{_link} = $options{link};
+ $self->{_description} = $options{description};
+ $self->{_charset} = $options{charset};
+ $self->{_max_items} = $options{max_items};
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ return unless $package->is_source();
+
+ my $subject = $package->as_formated_string('%{name}-%{version}-%{release}');
+ my $content = $package->get_information();
+
+ $content =~ s/$/<br\/>/mg;
+
+ # ensure proper codeset conversion
+ # for informations coming from package
+ my $charset = $repository->get_package_charset();
+ from_to($content, $charset, $self->{_charset});
+ from_to($subject, $charset, $self->{_charset});
+
+ my $rss = XML::RSS->new(
+ encoding => $self->{_charset},
+ encode_output => 1
+ );
+
+ my $file = $self->{_file};
+ if (-e $file) {
+ $rss->parsefile($file);
+ splice(@{$rss->{items}}, $self->{_max_items})
+ if @{$rss->{items}} >= $self->{_max_items};
+ } else {
+ $rss->channel(
+ title => $self->{_title},
+ link => $self->{_link},
+ description => $self->{_description},
+ language => 'en'
+ );
+ }
+
+ $rss->add_item(
+ title => $subject,
+ description => $content,
+ mode => 'insert'
+ );
+
+ if ($self->{_test}) {
+ print $rss->as_string();
+ } else {
+ $rss->save($file);
+ }
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Rpminfo.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Rpminfo.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Rpminfo.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,69 @@
+# $Id: Rpminfo.pm 4742 2007-01-30 09:49:58Z pixel $
+package Youri::Submit::Action::Rpminfo;
+
+=head1 NAME
+
+Youri::Submit::Action::RpmInfo - Creates .info files
+
+=head1 DESCRIPTION
+
+This action plugin ensures the creation of .info files
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use File::Basename;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ perms => 644,
+ uphost => '',
+ user => '',
+ ssh_key => '',
+ verbose => '',
+ @_
+ );
+ croak "undefined upload host" unless $options{uphost};
+ croak "undefined ssh key" unless $options{ssh_key};
+
+ foreach my $var ('perms', 'user', 'uphost', 'ssh_key', 'verbose') {
+ $self->{"_$var"} = $options{$var};
+ }
+
+ return $self;
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my $file = $package->get_file();
+ my $dest = $repository->get_upload_dir($package, $target, $define);
+
+ print "Caching rpm information $file on $dest\n" if $self->{_verbose};
+ my $base = basename ($file);
+ $dest =~ s/\/[0-9]{14}\./\/*./;
+
+ my $cmd = "ssh -i $self->{_ssh_key} $self->{_user}\@$self->{_uphost} \"srpm=`echo /$dest$base`; rpm -q --qf '\%{name}\n\%{epoch}\n\%{version}-\%{release}\n\%{summary}\n' -p \\\$srpm > \\\$srpm.info\"";
+ print "Submit::Action::RpmInfo: doing $cmd\n" if $self->{_verbose};
+ if (!$self->{_test}) {
+ if (!system($cmd)) {
+ print "Submit::Action::RpmInfo: rpminfo succeeded!\n";
+ return 1
+ }
+ print "Submit::Action::RpmInfo: rpminfo failed!\n";
+ }
+}
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Send.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Send.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Send.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,77 @@
+# $Id: Send.pm 4744 2007-01-30 09:59:07Z pixel $
+package Youri::Submit::Action::Send;
+
+=head1 NAME
+
+Youri::Submit::Action::Send - upload package
+
+=head1 DESCRIPTION
+
+This action plugin uploads the package on uphost
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use File::Basename;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ perms => 644,
+ uphost => '',
+ user => '',
+ ssh_key => '',
+ verbose => '',
+ keep_svn_release => '',
+ @_
+ );
+ croak "undefined upload host" unless $options{uphost};
+ croak "undefined ssh key" unless $options{ssh_key};
+
+ foreach my $var ('perms', 'user', 'uphost', 'ssh_key', 'verbose', 'keep_svn_release') {
+ $self->{"_$var"} = $options{$var};
+ }
+
+ return $self;
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my $file = $package->get_file();
+ my $dest = $repository->get_upload_dir($package, $target, $define);
+
+ print "Sending file $file to $dest\n" if $self->{_verbose};
+ my $base;
+ if ($self->{_keep_svn_release}) {
+ $base = basename($file)
+ } else {
+ ($base) = $file =~ /.*\/(?:@\d+:)?([^\/]*)/
+ }
+
+ my $cmd = "scp -i $self->{_ssh_key} $file $self->{_user}\@$self->{_uphost}:/$dest$base.new";
+ my $cmd2 = "ssh -i $self->{_ssh_key} $self->{_user}\@$self->{_uphost} \"mv /$dest$base.new /$dest$base\"";
+ print "Submit::Action::Send: doing $cmd\n$cmd2\n" if 1 || $self->{_verbose};
+ if (!$self->{_test}) {
+ if (!system($cmd)) {
+ if (!system($cmd2)) {
+ print "Submit::Action::Send: upload succeeded!\n";
+ return 1
+ }
+ }
+ print "Submit::Action::Send: upload failed!\n";
+ }
+}
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sendcache.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sendcache.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sendcache.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,81 @@
+# $Id: Sendcache.pm 232350 2007-12-07 18:26:17Z spuk $
+package Youri::Submit::Action::Sendcache;
+
+=head1 NAME
+
+Youri::Submit::Action::Sendcache - upload package to cache
+
+=head1 DESCRIPTION
+
+This action plugin uploads the package on uphost
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use File::Basename;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ perms => 644,
+ uphost => '',
+ user => '',
+ ssh_key => '',
+ verbose => '',
+ root => '',
+ debug_pkgs => 0,
+ @_
+ );
+ croak "undefined upload host" unless $options{uphost};
+ croak "undefined ssh key" unless $options{ssh_key};
+
+ foreach my $var ('perms', 'user', 'uphost', 'ssh_key', 'verbose', 'root', 'debug_pkgs') {
+ $self->{"_$var"} = $options{$var};
+ }
+
+ return $self;
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ # only cache debug packages if option debug_pkgs is true
+ return if ($package->is_debug() && !$self->{_debug_pkgs});
+
+ my $file = $package->get_file();
+ my $dest = $repository->get_upload_dir($package, $target, $define);
+ $dest =~ s!$repository->{_upload_root}/$repository->{_queue}!$self->{_root}!;
+
+ print "Sending file $file to $dest\n" if $self->{_verbose};
+ my $destfile = "$dest".basename($file);
+ $destfile =~ s,/[^/_]+_([^/]+)$,/$1,;
+ $destfile =~ s,/@\d+:,/,;
+ my $destfilehidden = $destfile;
+ $destfilehidden =~ s,/([^/]+)$,/.$1,;
+
+ my $cmd = "scp -i $self->{_ssh_key} $file $self->{_user}\@$self->{_uphost}:/$destfilehidden";
+ my $cmd2 = "ssh -i $self->{_ssh_key} $self->{_user}\@$self->{_uphost} \"mv /$destfilehidden /$destfile\"";
+ print "Submit::Action::Send: doing $cmd\n$cmd2\n" if 1 || $self->{_verbose};
+ if (!$self->{_test}) {
+ if (!system($cmd)) {
+ if (!system($cmd2)) {
+ print "Submit::Action::Sendcache: upload succeeded!\n";
+ return 1
+ }
+ }
+ print "Submit::Action::Sendcache: upload failed!\n";
+ }
+}
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sign.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sign.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sign.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,56 @@
+# $Id: Sign.pm 1700 2006-10-16 12:57:42Z warly $
+package Youri::Submit::Action::Sign;
+
+=head1 NAME
+
+Youri::Submit::Action::Sign - GPG signature
+
+=head1 DESCRIPTION
+
+This action plugin ensures GPG signature of packages.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ name => '',
+ path => $ENV{HOME} . '/.gnupg',
+ passphrase => '',
+ @_
+ );
+
+ croak "undefined name" unless $options{name};
+ croak "undefined path" unless $options{path};
+ croak "invalid path $options{path}" unless -d $options{path};
+
+ $self->{_name} = $options{name};
+ $self->{_path} = $options{path};
+ $self->{_passphrase} = $options{passphrase};
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ $package->sign(
+ $self->{_name},
+ $self->{_path},
+ $self->{_passphrase}
+ ) unless $self->{_test};
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Unpack.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Unpack.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Unpack.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,82 @@
+# $Id: Unpack.pm 115370 2007-01-30 09:59:07Z pixel $
+package Youri::Submit::Action::Unpack;
+
+=head1 NAME
+
+Youri::Submit::Action::Unpack - unpack package files
+
+=head1 DESCRIPTION
+
+This action plugin unpack package files somewhere.
+When unpack_inside_distribution_root is set, dest_directory is relative to the distribution root.
+When the package is a noarch, the wanted files are unpacked in distribution root of each archs.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use File::Temp qw/tempdir/;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my ($self, %options) = @_;
+
+ croak "undefined package name" unless $options{name};
+ croak "undefined source sub directory" unless $options{source_subdir};
+ croak "undefined destination directory" unless $options{dest_directory};
+
+ foreach my $var ('name', 'dest_directory', 'source_subdir', 'grep_files', 'unpack_inside_distribution_root') {
+ $self->{"_$var"} = $options{$var};
+ }
+
+ return $self;
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ $package->get_name eq $self->{_name} or return;
+
+ my @dests = $self->{_unpack_inside_distribution_root} ?
+ (map { "$_/$self->{_dest_directory}" } $repository->get_distribution_roots($package, $target))
+ : $self->{_dest_directory};
+ my $file = $package->as_file;
+ print "Unpacking rpm $file$self->{_source_subdir} to @dests\n" if $self->{_verbose};
+
+ my $tempdir = tempdir(CLEANUP => 1);
+
+ my $cmd = "rpm2cpio $file | (cd $tempdir ; cpio -id)";
+ print "Submit::Action::Unpack: doing $cmd\n" if $self->{_verbose};
+ if (!$self->{_test} && system($cmd) != 0) {
+ print "Submit::Action::Unpack: failed!\n" if $self->{_verbose};
+ return;
+ }
+
+ foreach my $dest (@dests) {
+ my $find_grep = $self->{_grep_files} ? "find | grep '$self->{_grep_files}'" : 'find';
+ my $cmd = "cd $tempdir/$self->{_source_subdir}; $find_grep | cpio -pdu $dest";
+ print "Submit::Action::Unpack: doing $cmd\n" if $self->{_verbose};
+ if (!$self->{_test}) {
+ my @l = glob("$tempdir/$self->{_source_subdir}");
+ if (@l == 1 && -d $l[0]) {
+ if (system($cmd) != 0) {
+ print "Submit::Action::Unpack: failed!\n" if $self->{_verbose};
+ }
+ } else {
+ print "Submit::Action::Unpack: directory $self->{_source_subdir} doesn't exist in package $self->{_name}\n";
+ }
+ }
+ }
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/UpdateMdvDb.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/UpdateMdvDb.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/UpdateMdvDb.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,62 @@
+# $Id$
+package Youri::Submit::Action::UpdateMdvDb;
+
+=head1 NAME
+
+Youri::Submit::Action::UpdateMdvDb - Mandriva maintainers database updater
+
+=head1 DESCRIPTION
+
+This action plugin calls an external script to update last commit info, as
+well as add new packages, in the package maintainers database at
+<<A HREF="http://maint.mandriva.com/">http://maint.mandriva.com/</A>>.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Action/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ @_
+ );
+
+ # path for mdvdb-updaterep script
+ $self->{_mdvdb_updaterep} = $options{mdvdb_updaterep};
+
+ return $self;
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ # only SRPMs matter
+ return unless $package->is_source();
+
+ unless ($self->{_test}) {
+ my $pkg_name = $package->get_name();
+ my $pkg_media = $repository->_get_main_section($package, $target, $define);
+ $package->get_packager() =~ m/(\w[-_.\w]+\@[-_.\w]+)\W/;
+ my $pkg_commiter = $1;
+
+ if (system($self->{_mdvdb_updaterep}, "update", $pkg_name, $pkg_media, $pkg_commiter, "youri")) {
+ print "ERROR: ".$self->{_mdvdb_updaterep}." failed for '$pkg_name', '$pkg_media', '$pkg_commiter'.\n";
+ } else {
+ print "Updated package maintainers DB for '$pkg_name', '$pkg_media', '$pkg_commiter'.\n" if $self->{_verbose};
+ }
+ }
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2007, Mandriva
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,27 @@
+# $Id: Base.pm 631 2006-01-26 22:22:23Z guillomovitch $
+package Youri::Submit::Action;
+
+=head1 NAME
+
+Youri::Submit::Action - Abstract action plugin
+
+=head1 DESCRIPTION
+
+This abstract class defines action plugin interface.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Plugin/;
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/ACL.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/ACL.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/ACL.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,71 @@
+# $Id: ACL.pm 4817 2007-02-09 19:39:05Z blino $
+package Youri::Submit::Check::ACL;
+
+=head1 NAME
+
+Youri::Submit::Check::Tag - Incorrect tag values check
+
+=head1 DESCRIPTION
+
+This check plugin rejects packages with incorrect tag values, based on regular
+expressions.
+
+=cut
+
+use strict;
+use Carp;
+use base qw/Youri::Submit::Check/;
+my $acl;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ acl_file => '',
+ @_
+ );
+ $acl = get_acl($options{acl_file});
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+ my $file = $package->get_full_name();
+ my $arch = $package->get_arch();
+ my $srpm = $package->get_canonical_name;
+ my $section = $repository->_get_section($package, $target, $define);
+ my $user = $define->{user};
+ foreach my $t (keys %$acl) {
+ next if $target !~ /$t/;
+ foreach my $acl (@{$acl->{$t}}) {
+ my ($a, $media, $r, $users) = @$acl;
+ next if $arch !~ $a || $srpm !~ $r || $section !~ $media;
+ if ($user =~ /$users/) {
+ return
+ } else {
+ return "$user is not authorized to upload packages belonging to $srpm in section $section (authorized persons: " . join(', ', split '\|', $users) . ")";
+ }
+ }
+ }
+ return
+}
+
+sub get_acl {
+ my ($file) = @_;
+ my %acl;
+ open my $f, $file;
+ while (<$f>) {
+ my ($dis, $arch, $media, $regexp, $users) = split ' ';
+ push @{$acl{$dis}}, [ $arch , $media, $regexp, $users ]
+ }
+ \%acl
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/History.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/History.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/History.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,61 @@
+# $Id: History.pm 1707 2006-10-16 16:26:42Z warly $
+package Youri::Submit::Check::History;
+
+=head1 NAME
+
+Youri::Submit::Check::History - Non-linear history check
+
+=head1 DESCRIPTION
+
+This check plugin rejects packages whose history does not include last
+available revision one.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use Youri::Package;
+use base qw/Youri::Submit::Check/;
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my @errors;
+
+ my $last_revision =
+ $repository->get_last_older_revision($package, $target, $define);
+
+ if ($last_revision) {
+ # skip the test if last revision has been produced from another source package, as it occurs during package split/merges
+ return
+ if $last_revision->get_canonical_name()
+ ne $package->get_canonical_name();
+
+ my ($last_revision_number) = $last_revision->get_last_change()->[Youri::Package::CHANGE_AUTHOR] =~ /(\S+)\s*$/;
+ my %entries =
+ map { $_ => 1 }
+ map { /(\S+)\s*$/ }
+ map { $_->[Youri::Package::CHANGE_AUTHOR] }
+ $package->get_changes();
+ unless ($entries{$last_revision_number}) {
+ push(
+ @errors,
+ "Last changelog entry $last_revision_number from last revision " . $last_revision->get_full_name() . " missing from current changelog"
+ );
+ }
+ }
+
+ return @errors;
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Host.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Host.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Host.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,63 @@
+# $Id: Host.pm 230850 2007-10-04 20:07:25Z blino $
+package Youri::Submit::Check::Host;
+
+=head1 NAME
+
+Youri::Submit::Check::Tag - Incorrect tag values check
+
+=head1 DESCRIPTION
+
+This check plugin rejects packages with incorrect tag values, based on regular
+expressions.
+
+=cut
+
+use strict;
+use Carp;
+use base qw/Youri::Submit::Check/;
+my $host;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ host_file => '',
+ @_
+ );
+ $host = get_host($options{host_file})
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+ my $file = $package->get_file;
+ my $arch = $package->get_arch;
+ my $buildhost = $package->as_formated_string('%{buildhost}');
+ foreach my $h (keys %$host) {
+ next if $buildhost !~ $h;
+ if ($arch =~ $host->{$h}) {
+ return
+ }
+ }
+ "Packages build on host $buildhost are not authorized for arch $arch";
+}
+
+sub get_host {
+ my ($file) = @_;
+ my %host;
+ open my $f, $file;
+ while (<$f>) {
+ my ($host, $arch) = split ' ';
+ $host{$host} = $arch
+ }
+ \%host
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Precedence.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Precedence.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Precedence.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,58 @@
+# $Id: Precedence.pm 1707 2006-10-16 16:26:42Z warly $
+package Youri::Submit::Check::Precedence;
+
+=head1 NAME
+
+Youri::Submit::Check::Precedence - Release check against another check
+
+=head1 DESCRIPTION
+
+This check plugin rejects packages whose an older revision already exists for
+another upload target.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Check/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ _target => undef, # mandatory targets
+ @_
+ );
+
+ die "undefined target" unless $options{target};
+
+ $self->{_target} = $options{target};
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my @errors;
+
+ my @older_revisions =
+ $repository->get_older_revisions($package, $self->{_target}, $define);
+ if (@older_revisions) {
+ push(
+ @errors,
+ "Older revisions still exists for $self->{_target}: " . join(', ', @older_revisions)
+ );
+ }
+
+ return @errors;
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Queue_recency.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Queue_recency.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Queue_recency.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,40 @@
+# $Id: Queue_recency.pm 4747 2007-01-30 10:02:41Z pixel $
+package Youri::Submit::Check::Queue_recency;
+
+=head1 NAME
+
+Youri::Submit::Check::Recency - Release check against current target
+
+=head1 DESCRIPTION
+
+This check plugin rejects packages whose a current or newer revision already
+exists for current upload target.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Check/;
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my @newer_revisions =
+ $repository->get_upload_newer_revisions($package, $target, $define);
+ if (@newer_revisions) {
+ return "Newer revisions already exists for $target in upload queue: " . join(', ', @newer_revisions);
+ }
+ return
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Recency.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Recency.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Recency.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,64 @@
+# $Id: Recency.pm 224793 2007-07-08 02:44:48Z spuk $
+package Youri::Submit::Check::Recency;
+
+=head1 NAME
+
+Youri::Submit::Check::Recency - Release check against current target
+
+=head1 DESCRIPTION
+
+This check plugin rejects packages whose a current or newer revision already
+exists for current upload target.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Check/;
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my @errors;
+
+ my @revisions = $repository->get_revisions($package, $target, $define, undef, sub { return $_[0]->compare($package) >= 0 });
+ if (@revisions) {
+ my $section = $repository->_get_section($package, $target, $define);
+ push(
+ @errors,
+ "Current or newer revision(s) already exists in $section for $target: " .
+ join(', ', @revisions)
+ );
+ }
+
+ my $defined_section = $define->{section};
+
+ # if the user provided a section, check also in the default section
+ if ($defined_section) {
+ $define->{section} = undef;
+ my @default_revisions = $repository->get_revisions($package, $target, $define, undef, sub { return $_[0]->compare($package) >= 0 });
+ if (@default_revisions) {
+ my $section = $repository->_get_section($package, $target, $define);
+ push(
+ @errors,
+ "Current or newer revision(s) already exists in $section for $target: " .
+ join(', ', @default_revisions)
+ );
+ }
+ $define->{section} = $defined_section;
+ }
+
+ return @errors;
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Rpmlint.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Rpmlint.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Rpmlint.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,90 @@
+# $Id: Rpmlint.pm 234384 2008-02-12 09:42:32Z blino $
+package Youri::Submit::Check::Rpmlint;
+
+=head1 NAME
+
+Youri::Submit::Check::Rpmlint - Rpmlint-based check
+
+=head1 DESCRIPTION
+
+This check plugin wraps rpmlint, and reject packages triggering results
+declared as fatal.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Check/;
+
+=head2 new(%args)
+
+Creates and returns a new Youri::Submit::Check::Rpmlint object.
+
+Specific parameters:
+
+=over
+
+=item results $results
+
+List of rpmlint result id considered as fatal.
+
+=item path $path
+
+Path to the rpmlint executable (default: /usr/bin/rpmlint)
+
+=item config $config
+
+Specific rpmlint configuration.
+
+=back
+
+=cut
+
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ results => undef,
+ path => '/usr/bin/rpmlint',
+ config => '',
+ @_
+ );
+
+ croak "no results to check" unless $options{results};
+ croak "fatal should be an arrayref" unless ref $options{results} eq 'ARRAY';
+
+ $self->{_config} = $options{config};
+ $self->{_path} = $options{path};
+ $self->{_pattern} = '^(?:' . join('|', @{$options{results}}) . ')$';
+}
+
+sub run {
+ my ($self, $package, $_repository, $_target, $_define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my @errors;
+
+ my $command = "$self->{_path} -f $self->{_config} " . $package->as_file;
+ open(my $RPMLINT, "$command |") or die "Can't run $command: $!";
+ while (my $line = <$RPMLINT>) {
+ $line =~ /^[EW]: \S+ (\S+)(.*)$/ # old rpmlint format
+ || $line =~ /^\S+: [EW]: (\S+)(.*)$/ or next; # new rpmlint format
+ my ($id, $value) = ($1, $2);
+ if ($id =~ /$self->{_pattern}/o) {
+ push(@errors, "$id$value");
+ }
+ }
+
+ return @errors;
+}
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/SVN.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/SVN.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/SVN.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,79 @@
+# $Id: SVN.pm 4747 2007-01-30 10:02:41Z pixel $
+package Youri::Submit::Check::SVN;
+
+=head1 NAME
+
+Youri::Submit::Check::Tag - Incorrect tag values check
+
+=head1 DESCRIPTION
+
+This check plugin rejects packages with incorrect tag values, based on regular
+expressions.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Check/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ svn => '',
+ @_
+ );
+ $self->{_svn} = $options{svn};
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my $section = $repository->_get_section($package, $target, $define);
+ if ($section =~ /\/(testing|backport)$/) {
+ # FIXME, right now ignore packages in SVN for testing and backports
+ # we need to find a clean way to handle them
+ return
+ }
+
+ $package->is_source or return;
+ my $file = $package->get_file_name;
+ my $srpm_name = $package->get_canonical_name;
+ if ($repository->package_in_svn($srpm_name)) {
+ if ($file !~ /(^|\/|$define->{prefix}_)@\d+:\Q$srpm_name/) {
+ return "package $srpm_name is in the SVN, the uploaded SRPM must look like @<svn rev>:$srpm_name-<version>-<release>.src.rpm (created with getsrpm-mdk $srpm_name)";
+ } else {
+ print "Package $file is correct\n";
+ }
+ }
+ return
+}
+
+sub simple_prompt {
+ my $cred = shift;
+ my $realm = shift;
+ my $default_username = shift;
+ my $may_save = shift;
+ my $pool = shift;
+
+ print "Enter authentication info for realm: $realm\n";
+ print "Username: ";
+ my $username = <>;
+ chomp($username);
+ $cred->username($username);
+ print "Password: ";
+ my $password = <>;
+ chomp($password);
+ $cred->password($password);
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Section.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Section.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Section.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,58 @@
+# $Id: Precedence.pm 1707 2006-10-16 16:26:42Z warly $
+package Youri::Submit::Check::Section;
+
+=head1 NAME
+
+Youri::Submit::Check::Section - Check if package was submitted to the right section
+
+=head1 DESCRIPTION
+
+This check plugin rejects packages which were submitted to a section
+different than the one where an older version already exists.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Check/;
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my @errors;
+
+ my $submitted_main_section = $repository->_get_main_section($package, $target, $define);
+
+ # undefine section, so that Repository::_get_section() of Mandriva_upload.pm
+ # finds the section from existing packages
+ my $defined_section = $define->{section};
+ undef $define->{section};
+
+ my $old_main_section = $repository->_get_main_section($package, $target, $define);
+ my @older_revisions = $repository->get_older_revisions($package, $target, $define);
+
+ # restore defined section
+ $define->{section} = $defined_section;
+
+ if (@older_revisions && $submitted_main_section ne $old_main_section) {
+ push(
+ @errors,
+ "Section should be $old_main_section, not $submitted_main_section."
+ );
+ }
+
+
+ return @errors;
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2007, Mandriva
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Source.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Source.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Source.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,45 @@
+# $Id: Source.pm 4747 2007-01-30 10:02:41Z pixel $
+package Youri::Submit::Check::Source;
+
+=head1 NAME
+
+Youri::Submit::Check::Tag - Incorrect tag values check
+
+=head1 DESCRIPTION
+
+This check plugin rejects packages with incorrect tag values, based on regular
+expressions.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Check/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ @_
+ );
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+ my $file = $package->as_file();
+ if (!$package->is_source()) {
+ return "Package $file is not a source rpm";
+ }
+ return
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Tag.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Tag.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Tag.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,61 @@
+# $Id: Tag.pm 1707 2006-10-16 16:26:42Z warly $
+package Youri::Submit::Check::Tag;
+
+=head1 NAME
+
+Youri::Submit::Check::Tag - Incorrect tag values check
+
+=head1 DESCRIPTION
+
+This check plugin rejects packages with incorrect tag values, based on regular
+expressions.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Check/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ tags => undef, # expected tag values
+ @_
+ );
+
+ croak "no tags to check" unless $options{tags};
+ croak "tag should be an hashref" unless ref $options{tags} eq 'HASH';
+
+ $self->{_tags} = $options{tags};
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my @errors;
+
+ foreach my $tag (keys %{$self->{_tags}}) {
+ my $value = $package->get_tag($tag);
+ if ($value !~ /$self->{_tags}->{$tag}/) {
+ push(
+ @errors,
+ "invalid value $value for tag $tag"
+ );
+ }
+ }
+
+ return @errors;
+
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Type.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Type.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Type.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,54 @@
+# $Id: Type.pm 4747 2007-01-30 10:02:41Z pixel $
+package Youri::Submit::Check::Type;
+
+=head1 NAME
+
+Youri::Submit::Check::Type - Type check
+
+=head1 DESCRIPTION
+
+This check plugin rejects packages with incorrect type.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Check/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ type => undef, # expected type
+ @_
+ );
+
+ croak "no type to check" unless $options{type};
+ croak "invalid type value" unless $options{type} =~ /^(?:source|binary)$/;
+
+ $self->{_type} = $options{type};
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my @errors;
+
+ my $type = $package->get_type();
+ if ($type ne $self->{_type}) {
+ push(@errors, "invalid type $type");
+ }
+
+ return @errors;
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Version.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Version.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Version.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,102 @@
+# $Id: Version.pm 267050 2010-03-23 17:36:49Z nvigier $
+package Youri::Submit::Check::Version;
+
+=head1 NAME
+
+Youri::Submit::Check::Version - Check if older version already exist in cooker (used in freeze period)
+
+=head1 DESCRIPTION
+
+This check plugin rejects new version of packages if they are not mentioned as authorized
+in the configuration file or in a non frozen section.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use URPM;
+use base qw/Youri::Submit::Check/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ @_
+ );
+
+ foreach my $target (keys %options) {
+ $self->{$target} = $options{$target}
+ }
+}
+
+sub run {
+ my ($self, $package, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+ my $opt = $self->{$target};
+ return if $opt->{mode} eq 'normal';
+ my $section = $repository->_get_section($package, $target, $define);
+ my $name = $package->get_canonical_name;
+ return if $name =~ /$opt->{authorized_packages}/;
+ my $arch = $repository->get_arch($package, $target, $define);
+ return if $arch =~ /$opt->{authorized_arches}/;
+ if ($opt->{mode} eq 'version_freeze') {
+ return if $section =~ /$opt->{authorized_sections}/;
+ my $user = $define->{user};
+ return if $user =~ /^($opt->{authorized_users})$/;
+ my ($package_version) = $package =~ /-([^-]+)-[^-]+\.src$/;
+ $define->{arch} = 'src';
+ my @revisions = $repository->get_revisions($package, $target, $define, undef,
+ sub {
+ my ($version) = $_[0] =~ /-([^-]+)-[^-]+\.src$/;
+ URPM::ranges_overlap("== $version", "< $package_version")
+ }
+ );
+ $define->{arch} = '';
+ if (@revisions) {
+ return "FREEZE, package @revisions of different versions exist in $target\n";
+ }
+ }
+ # FIXME: The following code is not working and must be reviewed.
+ elsif ($opt->{mode} eq 'freeze') {
+ my $user = $define->{user};
+ return if (defined($opt->{authorized_users}) && $user =~ /^($opt->{authorized_users})$/);
+ # XXX: So freeze mode really only check for this exceptions?
+ if ($section !~ /$opt->{authorized_sections}/) {
+ return "FREEZE: repository $target section $section is frozen, you can still submit your packages in testing\nTo do so use your.devel --define section=<section> $target <package 1> <package 2> ... <package n>";
+ }
+ } else {
+ # FIXME: Calls to get_source_package seems invalid nowadays.
+ # This results on $source having a null content.
+ my $source = $package->get_source_package;
+ my ($package_version) = $source =~ /-([^-]+)-[^-]+\.src\.rpm$/;
+ $define->{arch} = 'src';
+ # FIXME: get_revisions now expects the filter as the 5th element, and not the 4th.
+ my @revisions = $repository->get_revisions($package, $target, $define,
+ sub {
+ # FIXME: Calls to get_source_package seems invalid nowadays.
+ # This results on $source_package having a null content.
+ my $source_package = $_[0]->get_source_package;
+ my ($version) = $source_package =~ /-([^-]+)-[^-]+\.src\.rpm$/;
+ print STDERR "Found version $version\n";
+ URPM::ranges_overlap("== $version", "< $package_version")
+ }
+ );
+ $define->{arch} = '';
+ if (@revisions) {
+ return "FREEZE, package @revisions of different versions exist in $target\n";
+ }
+ }
+ return
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2006, YOURI project
+Copyright (C) 2006, Mandriva
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
+
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,27 @@
+# $Id: Base.pm 631 2006-01-26 22:22:23Z guillomovitch $
+package Youri::Submit::Check;
+
+=head1 NAME
+
+Youri::Submit::Check - Abstract check plugin
+
+=head1 DESCRIPTION
+
+This abstract class defines check plugin interface.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Plugin/;
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Plugin.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Plugin.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Plugin.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,93 @@
+# $Id: Plugin.pm 4746 2007-01-30 10:01:14Z pixel $
+package Youri::Submit::Plugin;
+
+=head1 NAME
+
+Youri::Submit::Plugin - Abstract youri-submit plugin
+
+=head1 DESCRIPTION
+
+This abstract class defines youri-submit plugin interface.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+
+=head1 CLASS METHODS
+
+=head2 new(%args)
+
+Creates and returns a new Youri::Submit::Plugin object.
+
+No generic parameters (subclasses may define additional ones).
+
+Warning: do not call directly, call subclass constructor instead.
+
+=cut
+
+sub new {
+ my $class = shift;
+ croak "Abstract class" if $class eq __PACKAGE__;
+
+ my %options = (
+ id => '', # object id
+ test => 0, # test mode
+ verbose => 0, # verbose mode
+ @_
+ );
+
+ my $self = bless {
+ _id => $options{id},
+ _test => $options{test},
+ _verbose => $options{verbose},
+ }, $class;
+
+ $self->_init(%options);
+
+ return $self;
+}
+
+sub _init {
+ # do nothing
+}
+
+=head1 INSTANCE METHODS
+
+=head2 get_id()
+
+Returns plugin identity.
+
+=cut
+
+sub get_id {
+ my ($self) = @_;
+ croak "Not a class method" unless ref $self;
+
+ return $self->{_id};
+}
+
+=head2 run($package, $repository, $target, $define)
+
+Execute action on given L<Youri::Package> object.
+
+=head1 SUBCLASSING
+
+The following methods have to be implemented:
+
+=over
+
+=item run
+
+=back
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/CleanRpmsrate.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/CleanRpmsrate.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/CleanRpmsrate.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,53 @@
+# $Id: CleanRpmsrate.pm 115367 2007-01-30 09:47:04Z pixel $
+package Youri::Submit::Post::CleanRpmsrate;
+
+=head1 NAME
+
+Youri::Submit::Post::CleanRpmsrate - calls clean-rpmsrate
+
+=head1 DESCRIPTION
+
+Calls clean-rpmsrate
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Post/;
+
+#- inlined from MDK::Common::DataStructure
+sub uniq { my %l; $l{$_} = 1 foreach @_; grep { delete $l{$_} } @_ }
+
+sub _init {
+}
+
+sub run {
+ my ($self, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+ my $root = $repository->get_install_root();
+ my @changed = @{$repository->get_arch_changed($target)};
+ if (grep { $_ eq 'i586' } @changed) {
+ # x86_64 uses i586 pkgs, so rpmsrate need to be rebuild
+ @changed = uniq(@changed, 'x86_64');
+ }
+ foreach my $arch (@changed) {
+ my $rpmsrate = "$root/$target/$arch/media/media_info/rpmsrate";
+ my @media = "$root/$target/$arch/media/main/release";
+ system("cp", "$rpmsrate-raw", "$rpmsrate-new");
+ system("clean-rpmsrate", "$rpmsrate-new", @media);
+ system("mv", "-f", "$rpmsrate-new", $rpmsrate);
+ }
+ return
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2007, Mandriva <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">blino at mandriva.com</A>>
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
+
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Gendistrib.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Gendistrib.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Gendistrib.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,66 @@
+# $Id: Gendistrib.pm 115367 2007-01-30 09:47:04Z pixel $
+package Youri::Submit::Post::Gendistrib;
+
+=head1 NAME
+
+Youri::Submit::Post::Gendistrib - calls gendistrib
+
+=head1 DESCRIPTION
+
+Calls gendistrib
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Post/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ user => '',
+ host => '',
+ source => '',
+ destination => '',
+ @_
+ );
+
+ foreach my $var ('tmpdir', 'command') {
+ $self->{"_$var"} = $options{$var};
+ }
+}
+
+sub run {
+ my ($self, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+ my $root = $repository->get_install_root();
+ (undef, undef, my $hour) = gmtime(time);
+ # during the night, use complete hdlist rebuild
+ my $fast = '--fast';
+ $fast = ''; # blino: don't use fast for now, it might be broken
+ if ($hour > 22 && $hour < 5) {
+ if ($hour < 4) {
+ $fast = '--blind'
+ } else {
+ $fast = ''
+ }
+ }
+ foreach my $arch (@{$repository->get_arch_changed($target)}) {
+ my $cmd = "TMPDIR=$self->{_tmpdir}/$target/$arch time $self->{_command} --nochkdep --nobadrpm $fast --noclean $root/$target/$arch";
+ print "$cmd\n";
+ system($cmd);
+ }
+ return
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, Mandriva <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">warly at mandriva.com</A>>
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
+
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Genhdlist2.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Genhdlist2.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Genhdlist2.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,82 @@
+# $Id: Gendistrib.pm 115367 2007-01-30 09:47:04Z pixel $
+package Youri::Submit::Post::Genhdlist2;
+
+=head1 NAME
+
+Youri::Submit::Post::Genhdlist2 - calls genhdlist2
+
+=head1 DESCRIPTION
+
+Calls genhdlist2
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Post/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ user => '',
+ host => '',
+ source => '',
+ destination => '',
+ @_
+ );
+
+ foreach my $var ('command') {
+ $self->{"_$var"} = $options{$var};
+ }
+}
+
+sub run {
+ my ($self, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+ my $root = $repository->get_install_root();
+ my @changed = @{$repository->get_install_dir_changed($target)};
+ if (!@changed) {
+ print "nothing to do\n";
+ return;
+ }
+ foreach my $dir (@changed) {
+ my $file_deps = "$dir/../../media_info/file-deps";
+ my $file_deps_option = -e $file_deps ? "--file-deps $file_deps" : '';
+ my $cmd = "time $self->{_command} -v --versioned --allow-empty-media $file_deps_option $dir";
+ print "$cmd\n";
+ system($cmd) == 0 or print "ERROR: $cmd failed\n";
+ }
+
+ # need to redo global MD5SUM. This MD5SUM is mostly obsolete, but is still needed up to 2007.1
+ # (and even on cooker for existing urpmi.cfg)
+ foreach my $arch (@{$repository->get_arch_changed($target)}) {
+ my $dir = "$root/$target/$arch/media/media_info";
+ my $cmd = "cd $dir ; time md5sum hdlist_* synthesis.*";
+ print "$cmd\n";
+ my $m = `$cmd`;
+ open my $f, '>', "$dir/MD5SUM" or die "Can't write $dir/MD5SUM: $!\n";
+ print $f $m;
+
+ {
+ require MDV::Distribconf::Build;
+ my $distrib = MDV::Distribconf::Build->new("$root/$target/$arch");
+ $distrib->loadtree or die "$root/$target/$arch does not seem to be a distribution tree\n";
+ $distrib->parse_mediacfg;
+ $distrib->write_version($distrib->getfullpath(undef, "VERSION"));
+ print "updated $root/$target/$arch/VERSION\n";
+ }
+ }
+ return;
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, Mandriva <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">warly at mandriva.com</A>>
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
+
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,27 @@
+# $Id: Post.pm 4746 2007-01-30 10:01:14Z pixel $
+package Youri::Submit::Post;
+
+=head1 NAME
+
+Youri::Submit::Post - Abstract post plugin
+
+=head1 DESCRIPTION
+
+This abstract class defines post plugin interface.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Plugin/;
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2006, Mandriva
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre/Rsync.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre/Rsync.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre/Rsync.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,87 @@
+# $Id: Rsync.pm 267280 2010-04-01 19:57:53Z bogdano $
+package Youri::Submit::Pre::Rsync;
+
+=head1 NAME
+
+Youri::Submit::Pre::Rsync - Old revisions archiving
+
+=head1 DESCRIPTION
+
+This action plugin ensures archiving of old package revisions.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Pre/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ user => '',
+ host => '',
+ source => '',
+ destination => '',
+ @_
+ );
+
+ foreach my $var ('user', 'host', 'source', 'destination') {
+ $self->{"_$var"} = $options{$var};
+ }
+}
+
+sub run {
+ my ($self, $pre_packages, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ if (system("rsync --exclude '*.new' --exclude '.*' --remove-sent-files -avlPHe 'ssh -xc arcfour' $self->{_user}\@$self->{_host}:$self->{_source}/$target/ $self->{_destination}/$target/")) {
+ $self->{_error} = "Rsync command failed ($!)";
+ return
+ }
+ my $queue = "$self->{_destination}/$target";
+ $self->{_error} = "Reading queue directory failed";
+ # now get the packages downloaded
+ my %packages;
+ opendir my $queuedh, "$self->{_destination}/$target/" or return "Could not open $self->{_destination}/$target";
+ opendir my $targetdh, $queue or return "Could not open $queue";
+ my $idx;
+ foreach my $media (readdir $targetdh) {
+ $media =~ /^\.{1,2}$/ and next;
+ print "$target - $media\n";
+ if (-d "$queue/$media") {
+ opendir my $submediadh, "$queue/$media" or return "Could not open $queue/$media";
+ foreach my $submedia (readdir $submediadh) {
+ $submedia =~ /^\.{1,2}$/ and next;
+ print "$target - $media - $submedia\n";
+ opendir my $rpmdh, "$queue/$media/$submedia" or return "Could not open $queue/$media/$submedia";
+ foreach my $rpm (readdir $rpmdh) {
+ $rpm =~ /^\.{1,2}$/ and next;
+ print "$target - $media - $submedia : $rpm\n";
+ my $file = "$queue/$media/$submedia/$rpm";
+ $file =~ s/\/+/\//g;
+ if ($rpm =~ /^(\d{14}\.\w+\.\w+\.\d+)_.*\.rpm$/) {
+ push @{$packages{$1}{rpms}}, { section => "$media/$submedia", file => $file };
+ } elsif ($rpm =~ /\.rpm$/) {
+ $idx++;
+ push @{$packages{"independant_$idx"}{rpms}}, { section => "$media/$submedia", file => $file }
+ }
+ }
+ }
+ }
+ }
+ foreach my $key (keys %packages) {
+ push @$pre_packages, $packages{$key}{rpms}
+ }
+ return
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, Mandriva <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">warly at mandriva.com</A>>
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,27 @@
+# $Id: Pre.pm 4746 2007-01-30 10:01:14Z pixel $
+package Youri::Submit::Pre;
+
+=head1 NAME
+
+Youri::Submit::Pre - Abstract pre plugin
+
+=head1 DESCRIPTION
+
+This abstract class defines pre plugin interface.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Plugin/;
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2006, Mandriva
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Archive.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Archive.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Archive.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,61 @@
+# $Id: Archive.pm 4747 2007-01-30 10:02:41Z pixel $
+package Youri::Submit::Reject::Install;
+
+=head1 NAME
+
+Youri::Submit::Action::Archive - Old revisions archiving
+
+=head1 DESCRIPTION
+
+This action plugin ensures archiving of old package revisions.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Reject/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ perms => 644,
+ @_
+ );
+
+ $self->{_perms} = $options{perms};
+
+ return $self;
+}
+
+sub run {
+ my ($self, $package, $errors, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my $file = $package->get_file();
+ my $rpm = $package->get_file_name();
+ my $dest = $repository->get_reject_dir($package, $target, $define);
+
+ # FIXME remove prefix this should be done by a function
+ $rpm =~ s/^\d{14}\.\w+\.\w+\.\d+_//;
+ print "installing file $file to $dest/$rpm\n" ;#if $self->{_verbose};
+
+ unless ($self->{_test}) {
+ # create destination dir if needed
+ system("install -d -m " . ($self->{_perms} + 111) . " $dest/")
+ unless -d $dest;
+
+ # install file to new location
+ system("install -m $self->{_perms} $file $dest/$rpm");
+ }
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Clean.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Clean.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Clean.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,36 @@
+# $Id: Clean.pm 4747 2007-01-30 10:02:41Z pixel $
+package Youri::Submit::Reject::Clean;
+
+=head1 NAME
+
+Youri::Submit::Action::Clean - Old revisions cleanup
+
+=head1 DESCRIPTION
+
+This action plugin ensures cleanup of old package revisions.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Reject/;
+
+sub run {
+ my ($self, $package, $errors, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my $file = $package->get_file();
+ print "deleting file $file\n" if $self->{_verbose};
+ unlink $file unless $self->{_test};
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Install.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Install.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Install.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,63 @@
+# $Id: Install.pm 4747 2007-01-30 10:02:41Z pixel $
+package Youri::Submit::Reject::Install;
+
+=head1 NAME
+
+Youri::Submit::Action::Archive - Old revisions archiving
+
+=head1 DESCRIPTION
+
+This action plugin ensures archiving of old package revisions.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Reject/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ perms => 644,
+ @_
+ );
+
+ $self->{_perms} = $options{perms};
+ $self->{_verbose} = $options{verbose};
+}
+
+sub run {
+ my ($self, $package, $errors, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my $file = $package->get_file();
+ my $rpm = $package->get_file_name();
+ my $dest = $repository->get_reject_path($package, $target, $define);
+
+ # FIXME remove prefix this should be done by a function
+ $rpm =~ s/^\d{14}\.\w+\.\w+\.\d+_//;
+ print "installing file $file to $dest/$rpm\n" if $self->{_verbose};
+
+ unless ($self->{_test}) {
+ # create destination dir if needed
+ system("install -d -m " . ($self->{_perms} + 111) . " $dest/")
+ unless -d $dest;
+
+ # install file to new location
+ system("install -m $self->{_perms} $file $dest/$rpm");
+ }
+ $package->{_file} = "$dest/$rpm";
+ print "deleting file $file\n" if $self->{_verbose};
+ unlink $file unless $self->{_test};
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Mail.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Mail.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Mail.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,112 @@
+# $Id: Mail.pm 223952 2007-06-23 13:54:13Z pixel $
+package Youri::Submit::Reject::Mail;
+
+=head1 NAME
+
+Youri::Submit::Action::Mail - Mail notification
+
+=head1 DESCRIPTION
+
+This action plugin ensures mail notification of new package revisions.
+
+=cut
+
+use warnings;
+use strict;
+use MIME::Entity;
+use Encode qw/from_to/;
+use Carp;
+use Youri::Package;
+use base qw/Youri::Submit::Reject/;
+
+sub _init {
+ my $self = shift;
+ my %options = (
+ mta => '/usr/sbin/sendmail',
+ to => '',
+ from => '',
+ cc => '',
+ prefix => '',
+ encoding => 'quoted-printable',
+ charset => 'iso-8859-1',
+ @_
+ );
+
+ croak "undefined mail MTA" unless $options{mta};
+ croak "invalid mail MTA $options{mta}" unless -x $options{mta};
+ croak "undefined to" unless $options{to};
+ if ($options{cc}) {
+ croak "cc should be an hashref" unless ref $options{cc} eq 'HASH';
+ }
+ croak "invalid charset $options{charset}"
+ unless Encode::resolve_alias($options{charset});
+
+ $self->{_mta} = $options{mta};
+ $self->{_to} = $options{to};
+ $self->{_from} = $options{from};
+ $self->{_cc} = $options{cc};
+ $self->{_prefix} = $options{prefix};
+ $self->{_encoding} = $options{encoding};
+ $self->{_charset} = $options{charset};
+}
+
+sub run {
+ my ($self, $package, $errors, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+
+ my $section = $repository->_get_section($package, $target, $define);
+
+ my $subject =
+ ($self->{_prefix} ? '[' . $self->{_prefix} . '] ' : '' ) . ($section ? "$section " : '') .
+ $package->get_revision_name();
+ my $information = $package->get_information();
+ my $last_change = $package->get_last_change();
+ my $author = $last_change->[Youri::Package::CHANGE_AUTHOR] if $last_change;
+ my $list = $last_change->[Youri::Package::CHANGE_TEXT] if $last_change;
+ my $content =
+ "Errors: \n\n" . join("\n", map {
+ ( "* $_", (map { " - $_" } @{$errors->{$_}}), "\n");
+ } sort(keys %$errors)) . "\n" .
+ $information . "\n" .
+ $author . ":\n$list";
+
+ # ensure proper codeset conversion
+ # for informations coming from package
+ my $charset = $repository->get_package_charset();
+ from_to($content, $charset, $self->{_charset});
+ from_to($subject, $charset, $self->{_charset});
+
+ my $mail = MIME::Entity->build(
+ Type => 'text/plain',
+ Charset => $self->{_charset},
+ Encoding => $self->{_encoding},
+ From => $self->{_from},
+ To => $self->{_to},
+ Subject => $subject,
+ Data => $content,
+ );
+
+ if ($self->{_cc}) {
+ my $cc = $self->{_cc}->{$package->get_name()};
+ $mail->head()->add('cc', $cc) if $cc;
+ }
+
+ if ($self->{_test}) {
+ $mail->print(\*STDOUT);
+ } else {
+ open(MAIL, "| $self->{_mta} -t -oi -oem") or die "Can't open MTA program: $!";
+ $mail->print(\*MAIL);
+ close MAIL;
+ }
+
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2002-2006, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject.pm (rev 0)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject.pm 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,27 @@
+# $Id: Reject.pm 4746 2007-01-30 10:01:14Z pixel $
+package Youri::Submit::Reject;
+
+=head1 NAME
+
+Youri::Submit::Reject - Abstract reject plugin
+
+=head1 DESCRIPTION
+
+This abstract class defines reject plugin interface.
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Plugin/;
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2006, Mandriva
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: build_system/mdv-youri-submit/trunk/t/00distribution.t
===================================================================
--- build_system/mdv-youri-submit/trunk/t/00distribution.t (rev 0)
+++ build_system/mdv-youri-submit/trunk/t/00distribution.t 2011-01-05 13:19:06 UTC (rev 209)
@@ -0,0 +1,15 @@
+#!/usr/bin/perl
+# $Id: 00distribution.t 1723 2006-10-17 13:53:27Z warly $
+
+use Test::More;
+
+BEGIN {
+ eval {
+ require Test::Distribution;
+ };
+ if($@) {
+ plan skip_all => 'Test::Distribution not installed';
+ } else {
+ import Test::Distribution only => [ qw/use pod description/ ];
+ }
+}
Property changes on: build_system/mdv-youri-submit/trunk/t/00distribution.t
___________________________________________________________________
Added: svn:executable
+ *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20110105/2b91b15e/attachment-0001.html>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="001511.html">[Mageia-sysadm] [653] - do not try to do ssl when we cannot, this confuse epoll
</A></li>
<LI>Next message: <A HREF="001513.html">[Mageia-sysadm] [210] add mandriva version of youri-core, downloaded from http://svn. mandriva.com/svn/soft/build_system/youri/core/trunk/ at revision 271600
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#1512">[ date ]</a>
<a href="thread.html#1512">[ thread ]</a>
<a href="subject.html#1512">[ subject ]</a>
<a href="author.html#1512">[ author ]</a>
</LI>
</UL>
<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
mailing list</a><br>
</body></html>
|