Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

index.txt 118 KB

You have to be logged in to leave a comment. Sign In
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
  1. = Fedora Packaging Guidelines
  2. :abi-comparison-tool: https://fedoraproject.org/wiki/How_to_check_for_ABI_changes_in_a_package[ABI comparison tool]
  3. :packaging-committee: https://pagure.io/packaging-committee[Fedora Packaging Committee]
  4. :scl-guidelines: https://fedoraproject.org/wiki/User:Toshio/SCL_Guidelines_(draft)[Software Collections]
  5. :updates-policy: https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/[Updates Policy]
  6. The Packaging Guidelines are a collection of common issues
  7. and the severity that should be placed on them.
  8. While these guidelines should not be ignored,
  9. they should also not be blindly followed.
  10. If you think that your package should be exempt from part of the Guidelines,
  11. please bring the issue to the {packaging-committee}.
  12. These documents cover the fine details of acceptable Fedora packaging
  13. and while they may include various examples
  14. they will not be particularly useful as a tutorial.
  15. They also do not cover the details
  16. and policies relating to gaining access
  17. to the Fedora repositories as a packager,
  18. or the mechanics of actually creating and releasing packages
  19. as part of the distribution.
  20. For documents which cover those issues,
  21. please see the following:
  22. * https://docs.fedoraproject.org/en-US/package-maintainers/Joining_the_Package_Maintainers/[Join the Package Maintainers]
  23. * https://docs.fedoraproject.org/en-US/package-maintainers/New_Package_Process_for_Existing_Contributors/[New Package Process for Existing Contributors]
  24. * https://docs.fedoraproject.org/en-US/package-maintainers/Packaging_Tutorial/[Packaging Tutorial]
  25. It is the package reviewer's responsibility to point out specific problems with a package
  26. and a packager's responsibility to deal with those issues.
  27. The reviewer and packager work together to determine the severity of the issues
  28. (whether they block a package
  29. or can be worked on after the package is in the repository.)
  30. Please remember that any package that you submit
  31. must also conform to the xref:ReviewGuidelines.adoc[Review Guidelines].
  32. The original author of these documents is
  33. https://fedoraproject.org/wiki/TomCallaway[Tom 'spot' Callaway],
  34. though they were originally based on many other documents.
  35. They have been significantly modified over the years
  36. by many members of the Packaging Committee.
  37. The key words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY
  38. in these guidelines are to be interpreted as described in
  39. https://www.rfc-editor.org/rfc/rfc2119[RFC 2119].
  40. Report issues with these guidelines, including typos,
  41. https://pagure.io/packaging-committee[here].
  42. == Applicability
  43. In general,
  44. these guidelines apply to the currently released,
  45. non-end-of-life versions of Fedora,
  46. as well as the development version of Fedora (Rawhide).
  47. If a particular portion of these guidelines is relevant
  48. only to a subset of those releases,
  49. this will be specifically noted.
  50. However, please note that Rawhide can change rapidly,
  51. and there will be times when changes are visible there
  52. which are not yet reflected here.
  53. The guidelines also to some degree cover packages for EPEL,
  54. but only when combined with the
  55. https://docs.fedoraproject.org/en-US/epel/epel-packaging/[EPEL packaging guidelines].
  56. Fedora packaging changes far more rapidly than EPEL packaging,
  57. so over time these guidelines will drift further away
  58. from any particular EPEL release
  59. and for the older supported EPEL release
  60. the differences can be quite significant.
  61. Portions of these guidelines which do not apply to EPEL
  62. will not generally be indicated.
  63. == General Exception Policy
  64. As these guidelines can never cover all possible contingencies,
  65. there will always be packages which need exceptions.
  66. It is the packager's responsibility to follow these guidelines
  67. as closely as is feasible and to clearly document,
  68. as comments in the package specfile,
  69. instances where they cannot be followed.
  70. If, in a guideline, the language "should" or "is suggested" is used
  71. and it is not feasible for the package to conform to that guideline,
  72. the packager may deviate from the it.
  73. The nature of the deviation and the reasoning behind it
  74. MUST be documented in the specfile.
  75. Where the language "must", "is required to" or "needs to" is used,
  76. the packager may deviate from the guideline
  77. only with approval from the packaging committee.
  78. Please follow the procedure at the
  79. https://fedoraproject.org/wiki/Packaging_Committee#Bringing_Issues_to_the_Committee[Packaging Committee]
  80. page for making these requests.
  81. == Allowed Packages
  82. Please review
  83. xref:what-can-be-packaged.adoc[What Can Be Packaged]
  84. to ensure that what is to be packaged is allowed in Fedora.
  85. == Naming
  86. You should go through the
  87. xref:Naming.adoc[Naming Guidelines]
  88. to ensure that your package is named appropriately.
  89. == Version and Release
  90. Documentation covering the proper way to use the Version and Release fields
  91. can be found xref:Versioning.adoc[here].
  92. == Licensing
  93. You should review the information regarding
  94. xref:legal::license-approval.adoc[licenses determined to be allowed in Fedora]
  95. and the xref:LicensingGuidelines.adoc[Licensing Guidelines]
  96. to ensure that your package is licensed appropriately
  97. and that the license is properly indicated.
  98. === Fedora Trademarks
  99. Packagers *MUST NOT* add any Fedora trademark assets
  100. including the Fedora logo,
  101. Fedora logo icons,
  102. or graphics that include the Fedora logo.
  103. Those assets *MUST* be added to the fedora-logos package.
  104. Your packages(s) install the logos by depending on the fedora-logos package.
  105. If the upstream contains Fedora trademark assets
  106. that you believe are used inappropriately,
  107. email legal@fedoraproject.org
  108. This is because the Fedora logo is a trademark,
  109. which are handled under a different legal framework than code.
  110. It must only be distributed under terms that protect the trademark.
  111. Keeping Fedora trademarks separate in their own package
  112. instead of scattered across various other packages
  113. is also an essential practice for enabling remixes
  114. that necessarily must
  115. https://fedoraproject.org/wiki/Legal:Trademark_guidelines#Secondary_Mark[not use the Fedora trademark],
  116. and instead roll their own *-logos package
  117. or use the generic-logos package.
  118. == Libraries and Applications
  119. Many language- or domain-specific guidelines refer to "libraries",
  120. "modules", "plug-ins" or other terms specific to the language or
  121. domain. This is specifically important to package
  122. naming. Some applications may include libraries, and some libraries
  123. may include applications, so the distinction is not always clear.
  124. === Library or Application?
  125. * If the primary purpose of a package
  126. is to provide executables to be run by users,
  127. it SHOULD be packaged as an application.
  128. If it also includes libraries which may be imported
  129. or linked to by other code,
  130. see <<Mixed Use Packages>> below.
  131. * If the primary purpose of a package
  132. is to provide libraries intended to be imported or loaded into other code,
  133. it is considered a library and MUST be packaged as such.
  134. If it contains utility programs that can be run by users as well,
  135. see <<Mixed Use Packages>> below.
  136. It is left to the packager to determine the primary purpose of a package.
  137. Often times upstream will already have done this
  138. with their choice of naming
  139. and that choice SHOULD be followed by the Fedora packager.
  140. === Mixed Use Packages
  141. Many packages, regardless of their primary purpose,
  142. include both applications and libraries.
  143. In this case one or both SHOULD be packaged in subpackages
  144. in order to allow other applications to depend on only the library
  145. and not the associated application(s).
  146. Installing an application that depends on a library or service
  147. should not automatically pull in other applications
  148. associated with that library or service.
  149. == Package Independence
  150. Packages SHOULD be installable independently whenever this is technically feasible,
  151. but they MUST specify dependencies of correct type on other packages if necessary,
  152. see <<Dependency Types>> below.
  153. Desktop applications MUST NOT depend on other desktop applications
  154. unless strictly required.
  155. In particular, packages that contain a visible `.desktop` file
  156. (a `.desktop` file that does not contain the line `+NoDisplay=true+`)
  157. SHOULD NOT have a `Requires`,
  158. `Recommends`,
  159. or `Supplements`
  160. on any other package containing a visible desktop file,
  161. directly or indirectly.
  162. For example, it would be reasonable for a video game level editor
  163. to require the associated video game in order to function,
  164. or for an application's plugin to require the associated application.
  165. But it would not be reasonable for an application
  166. that happens to use a database library
  167. to depend on a database management suite associated with that library,
  168. or for an application that happens to use a particular programming language
  169. to depend on management tools associated with that programming language.
  170. If a source package provides multiple graphical applications,
  171. those applications SHOULD be packaged in separate subpackages when feasible.
  172. == Spec Files
  173. The spec file ("spec") is a fundamental element in the packaging workflow.
  174. Any change that is made to the package will include a change to the spec.
  175. Because packages in Fedora are maintained by a community of packagers
  176. as well as automated tooling,
  177. it is important for the specs to follow certain conventions.
  178. The bulk of these packaging guidelines involves what goes into a spec,
  179. but here are a few general items.
  180. === Spec File Naming
  181. The spec file MUST be named `+%{name}.spec+`.
  182. That is, if your package is named `+example+`,
  183. the spec file must be named `+example.spec+`.
  184. === Spec Legibility
  185. All spec files MUST be legible and maintained in such a way
  186. that the community of packagers is able to understand and work with them.
  187. To help facilitate legibility,
  188. only macros and conditionals for Fedora and EPEL
  189. are allowed to be used in Fedora Packages.
  190. Use of macros and conditionals for other distributions,
  191. including Fedora derivatives,
  192. is not permitted in spec files of packages in the main Fedora repositories
  193. unless those macros and conditionals are also present in Fedora.
  194. === Spec File Encoding
  195. Unless you need to use characters outside the
  196. https://commons.wikimedia.org/wiki/File:Ascii_full.png[ASCII repertoire],
  197. you will not need to be concerned about the encoding of the spec file.
  198. If you do need non-ASCII characters,
  199. save your spec files as UTF-8.
  200. If you're in doubt as to what characters are ASCII,
  201. please refer to
  202. https://commons.wikimedia.org/wiki/File:Ascii_full.png[this chart].
  203. ==== Non-ASCII Filenames
  204. Similarly, filenames that contain non-ASCII characters
  205. must be encoded as UTF-8.
  206. Since there's no way to note which encoding the filename is in,
  207. using the same encoding for all filenames is the best way
  208. to ensure users can read the filenames properly.
  209. If upstream ships filenames that are not encoded in UTF-8
  210. you can use a utility like convmv
  211. (from the convmv package)
  212. to convert the filename in your %install section.
  213. === Spec Maintenance and Canonicity
  214. Fedora's git repository is the canonical location for Fedora spec files.
  215. Maintainers MUST expect that other maintainers
  216. and automated tooling will make changes to their packages,
  217. potentially without communicating prior to doing so
  218. (though communication is always encouraged).
  219. If some maintainers are also attempting
  220. to keep copies of a spec in an outside repository,
  221. they MUST be prepared to merge changes made to the spec
  222. in Fedora's repository,
  223. and MUST NOT overwrite those changes
  224. with a copy from an external repository
  225. or using `+fedpkg import+`.
  226. == Source File Verification
  227. Where the upstream project publishes OpenPGP signatures of their releases,
  228. Fedora packages *SHOULD* verify that signature as part of the RPM build process.
  229. Although a checksum in the sources file certifies
  230. that a file retreived from the lookaside cache
  231. is the one that the packager uploaded,
  232. it is silent on whether the file is what the upstream project released.
  233. A signature by the upstream developers certifies
  234. that the source is identical to what they released.
  235. Verifying the signature as part of the build ensures
  236. that packagers don't forget to verify it.
  237. === Obtaining the Correct Keys
  238. The verification method requires an OpenPGP keyring file
  239. with one or more public keys from the upstream project.
  240. The keyring shall contain all the keys that are trusted
  241. to certify the authenticity of the sources,
  242. and *MUST NOT* contain any other keys.
  243. Ideally the upstream project publishes such a keyring as a downloadable file.
  244. You shall download that file
  245. and do everything you reasonably can to verify that it is authentic.
  246. Then you shall add it unmodified to the package SCM,
  247. and provide its URL in the spec file
  248. so that others can verify it.
  249. The URL *MUST* use HTTPS
  250. or a similarly authenticated protocol if at all possible.
  251. Even if you are unable to verify the key at the first addition,
  252. it still enhances security in a trust-on-first-use way.
  253. It will ensure that future attacks will be detected
  254. if the key is the right one,
  255. or that a current attack will be detected later
  256. if future releases are signed by the correct key.
  257. === Verifying Signatures
  258. When source file verification is done,
  259. it *MUST* be done first in the `%prep` section of the spec file,
  260. before any potentially compromised code is executed.
  261. The verification *MUST* be done with the macro `+%{gpgverify}+`,
  262. which expands into a command
  263. whose parameters shall be the pathnames of the keyring,
  264. the signature and the signed file.
  265. `BuildRequires: gnupg2` is necessary for the verification to work.
  266. Any detached signature file
  267. (e.g. foo.tar.gz.asc or foo.tar.gz.sig)
  268. must be uploaded to the package lookaside cache alongside the source code,
  269. while the keyring must be committed directly to the package SCM.
  270. The following format must be used:
  271. [source, rpm-spec]
  272. ----
  273. Source0: ftp://ftp.example.com/pub/foo/%{name}-%{version}.tar.gz
  274. Source1: ftp://ftp.example.com/pub/foo/%{name}-%{version}.tar.gz.asc
  275. Source2: https://www.example.com/gpgkey-0123456789ABCDEF0123456789ABCDEF.gpg
  276. BuildRequires: gnupg2
  277. %prep
  278. %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
  279. ----
  280. The first source is the actual tarball,
  281. the second one is the signature from upstream,
  282. and the third one is the keyring.
  283. === Exceptions
  284. If the upstream tarball of a package needs to be modified,
  285. for example because it contains forbidden items,
  286. then the tarball cannot be verified as part of the build process.
  287. In this case
  288. the upstream OpenPGP keyring must still be included in the package SCM
  289. and the instructions/script used to build the stripped-down tarball
  290. needs to verify the upstream source.
  291. If the upstream project does not publish a keyring file
  292. (for example if they publish only a fingerprint on their website
  293. and refer to a keyserver network for downloading the key),
  294. then you may need to create a keyring after you have verified the key.
  295. In this case there is no upstream URL to the keyring,
  296. so instead you should document how you created the keyring
  297. in a comment in the spec file.
  298. A minimal keyring with the key with the fingerprint
  299. `7D33D762FD6C35130481347FDB4B54CBA4826A18`
  300. can be created with the following command:
  301. ....
  302. gpg2 --export --export-options export-minimal 7D33D762FD6C35130481347FDB4B54CBA4826A18 > gpgkey-7D33D762FD6C35130481347FDB4B54CBA4826A18.gpg
  303. ....
  304. If upstream signed a tarball differently,
  305. for example by signing only the uncompressed tarball
  306. but distributing a compressed version,
  307. then the verification step must be adjusted accordingly,
  308. for example:
  309. [source, rpm-spec]
  310. ----
  311. Source0: ftp://ftp.example.com/pub/foo/%{name}-%{version}.tar.xz
  312. Source1: ftp://ftp.example.com/pub/foo/%{name}-%{version}.tar.asc
  313. Source2: https://www.example.com/gpgkey-0123456789ABCDEF0123456789ABCDEF.gpg
  314. BuildRequires: gnupg2 xz
  315. %prep
  316. xzcat '%{SOURCE0}' | %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data=-
  317. ----
  318. Packages that are vital during bootstrapping of Fedora
  319. may use a <<bootstrapping,bootstrap flag>>
  320. to skip the verification before GnuPG has been built.
  321. === Help
  322. If you need help getting your package compliant to this guideline,
  323. or if you do not know what to do if a build fails on a signature verification,
  324. then you should seek help on the Fedora devel mailing list
  325. before circumventing the check,
  326. to make sure that you do not build compromised software.
  327. == Architecture Support
  328. All Fedora packages must successfully compile and build
  329. into binary rpms on at least one supported primary architecture,
  330. except where the package is useful only on a secondary architecture
  331. (such as an architecture-specific boot utility, microcode loader,
  332. or hardware configuration tool).
  333. Fedora packagers should make every effort to support all
  334. https://fedoraproject.org/wiki/Architectures#Primary_Architectures[primary architectures].
  335. Content, code which does not need to compile or build,
  336. and architecture independent code (noarch) are notable exceptions.
  337. === Architecture Build Failures
  338. If a Fedora package does not successfully compile, build or work on an architecture,
  339. then those architectures should be listed in the spec in `+ExcludeArch+`.
  340. Each architecture listed in `+ExcludeArch+`
  341. needs to have a bug filed in bugzilla,
  342. describing the reason that the package does not
  343. compile/build/work on that architecture.
  344. The bug number should then be placed in a comment,
  345. next to the corresponding `+ExcludeArch+` line.
  346. New packages will not have bugzilla entries during the review process,
  347. so they should put this description in the comment
  348. until the package is approved,
  349. then file the bugzilla entry,
  350. and replace the long explanation with the bug number.
  351. The bug should be marked as blocking one (or more)
  352. of the following bugs to simplify tracking such issues:
  353. * https://bugzilla.redhat.com/show_bug.cgi?id=F-ExcludeArch-x86[F-ExcludeArch-x86]
  354. * https://bugzilla.redhat.com/show_bug.cgi?id=F-ExcludeArch-x64[F-ExcludeArch-x64]
  355. * https://bugzilla.redhat.com/show_bug.cgi?id=F-ExcludeArch-ARM[F-ExcludeArch-ARM]
  356. * https://bugzilla.redhat.com/show_bug.cgi?id=PPCTracker[PPCTracker]
  357. * https://bugzilla.redhat.com/show_bug.cgi?id=F-ExcludeArch-s390x[F-ExcludeArch-s390x]
  358. === Noarch with Unported Dependencies
  359. Sometimes you are working on a noarch package
  360. that can only run in locations that a different,
  361. arched package builds on.
  362. This is common for packages written in a scripting language
  363. which depend on the language's interpreter package, for instance.
  364. If the arched package that your package deps on isn't available
  365. on all architectures Fedora (or EPEL) targets
  366. you run into a situation where you may need to exclude your package
  367. from certain architectures' package repositories
  368. or prevent it from building on certain architectures in the buildsystem.
  369. ==== Arch-Specific Runtime and Build-Time Dependencies
  370. You can limit both the architectures used to build a noarch package,
  371. and the repositories to which the built noarch package will be added,
  372. by using either the `+ExcludeArch:+` or `+ExclusiveArch:+` tags:
  373. [source, rpm-spec]
  374. ----
  375. BuildArch: noarch
  376. # List the arches that the dependent package builds on below
  377. ExclusiveArch: %{ix86} %{arm} x86_64 noarch
  378. ----
  379. Sometimes a language runtime you are packaging for will provide a macro
  380. for the arches it's available on, for instance,
  381. `+%{nodejs_arches}+`.
  382. If it does exist, then you can use something like
  383. `+ExclusiveArch: %{nodejs_arches} noarch+`
  384. in your spec file.
  385. Take a look at the guidelines for the language
  386. to see if such a macro exists.
  387. === No Arch-Specific Sources or Patches ===
  388. Packages MUST NOT have `+Source:+` or `+Patch:+` tags
  389. which are conditionalized on architecture.
  390. For example, this is forbidden:
  391. [source, rpm-spec]
  392. ----
  393. %ifarch ppc64
  394. Patch0: build-fix-for-ppc64.patch
  395. %endif
  396. ----
  397. Conditionalizing `+Source:+` or `+Patch:+` tags by architecture
  398. causes the contents of the source package to differ
  399. depending on the architecture which was used to build it.
  400. Note that this unfortunately prevents `+%autosetup+`
  401. from being used to apply patches
  402. when some of those patches apply only to certain architectures.
  403. The best solution is to write patches
  404. which simply work on all architectures.
  405. If that is not possible, then simply use `+%setup+`
  406. and to use the `+%patch+` macro to apply each patch
  407. using `+%ifarch+` or `+%ifnarch+` as appropriate.
  408. For example:
  409. [source, rpm-spec]
  410. ----
  411. %prep
  412. %setup -q
  413. %ifarch s390x
  414. %patch0 -p1
  415. %endif
  416. ----
  417. == Filesystem Layout
  418. Fedora follows the
  419. https://refspecs.linuxfoundation.org/fhs.shtml[Filesystem Hierarchy Standard]
  420. with regards to filesystem layout,
  421. with exceptions noted below.
  422. The FHS defines where files should be placed on the system.
  423. === Exceptions
  424. * Fedora allows cross-compilers to place files in `+/usr/target+`.
  425. * Fedora does not allow new directories
  426. directly under `+/+` or `+/usr+` without FPC approval.
  427. === Libexecdir
  428. The https://www.pathname.com/fhs/[Filesystem Hierarchy Standard]
  429. does not include any provision for libexecdir,
  430. but Fedora packages MAY store appropriate files there.
  431. Libexecdir (aka, `+/usr/libexec+` on Fedora systems)
  432. should only be used as the directory for executable programs
  433. that are designed primarily to be run by other programs
  434. rather than by users.
  435. Fedora's rpm includes a macro for libexecdir,
  436. `+%{_libexecdir}+`.
  437. Packagers are highly encouraged to store libexecdir files
  438. in a package-specific subdirectory of `+%{_libexecdir}+`,
  439. such as `+%{_libexecdir}/%{name}+`.
  440. If upstream's build scripts support the use of `+%{_libexecdir}+`
  441. then that is the most appropriate place to configure it
  442. (e.g., passing `+--libexecdir=%{_libexecdir}/%{name}+` to autotools configure).
  443. If upstream's build scripts do not support that,
  444. `+%{_libdir}/%{name}+` is a valid second choice.
  445. If you have to patch support for using one of these directories in,
  446. then you should patch in LIBEXECDIR,
  447. preferably configurable at build time
  448. (so distributions that do not have `+/usr/libexec+`
  449. can set LIBEXECDIR to another directory
  450. more appropriate for their distro).
  451. === Multilib Exempt Locations
  452. If a package is exempt from multilib,
  453. it may use `+%{_prefix}/lib+` instead of `+%{_libdir}+`.
  454. Packages that contain architecture specific files
  455. that would ordinarily be installed into `+%{_libexecdir}+`
  456. are always considered ineligible for multilib.
  457. However, you should be sure that the (sub)package that they are in
  458. does not have other content that would be considered eligible for multilib.
  459. If this is not the case for the files you wish to do this in for your package
  460. or you are just unsure, ask FESCo for an explicit multilib exemption.
  461. === `+/run+`
  462. System services should store small volatile run-time data in `+/run+`.
  463. This is a tmpfs backed directory that is mounted in very early boot,
  464. before any services are started
  465. (and before `+/var+` is available).
  466. `+/var/run+` is a legacy symlink to `+/run+`.
  467. === No Files or Directories Under `+/srv+`, `+/usr/local+`, or `+/home/$USER+`
  468. The https://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM[FHS says]:
  469. ....
  470. "...no program should rely on a specific subdirectory structure of /srv existing
  471. or data necessarily being stored in /srv. However /srv should always exist on FHS
  472. compliant systems and should be used as the default location for such data.
  473. Distributions must take care not to remove locally placed files in these
  474. directories without administrator permission."
  475. ....
  476. The FHS is explicitly handing control of the directory structure
  477. under `+/srv+` to the system administrator rather than the distribution.
  478. Therefore, no Fedora packages can have any files or directories under `+/srv+`,
  479. come preconfigured to use specific files or directories under `+/srv+`,
  480. to remove files there, or to modify the files there in any way.
  481. In addition, no Fedora package can
  482. contain files or directories or modify files under:
  483. * `+/usr/local+`
  484. as these directories are not permitted to be used
  485. by Distributions in the FHS
  486. * `+/home/$USER+`
  487. as users can arbitrarily modify the files in their home directories
  488. and rpm packages that modify those files run the risk of destroying user data.
  489. Additionally, sites may be nfs mounting `+/home+`
  490. on many different types of systems
  491. or even network automounting them on demand.
  492. Modifying files in home directories that are thus configured
  493. will have negative effects in both of these situations.
  494. It is important to note that the software in a Fedora package,
  495. once installed and configured by a user,
  496. can use `+/srv+` as a location for data.
  497. The package simply must not do this out of the box
  498. === Limited Usage of `+/opt+`, `+/etc/opt+`, and `+/var/opt+`
  499. `+/opt+` and its related directories (`+/etc/opt+` and `+/var/opt+`)
  500. is reserved for the use of vendors in the FHS.
  501. We have reserved the `+fedora+` name with
  502. https://www.lanana.org/lsbreg/providers/providers.txt[LANANA]
  503. for our use.
  504. If a package installs files into `+/opt+`
  505. it may only use directories in the `+/opt/fedora+` hierarchy.
  506. Fedora attempts to organize this directory by allocating a subdirectory
  507. of our `+/opt/fedora+` directory for specific subsystems.
  508. If you think you need to use `+/opt/fedora+`
  509. please file an FPC ticket to decide whether it's a valid use of `+/opt+`
  510. and what subdirectory should be allocated for your use.
  511. Currently, we have allocated
  512. `+/opt/fedora/scls+`, `+/etc/opt/fedora/scls+`, and `+/var/opt/fedora/scls+`
  513. for use by {scl-guidelines}.
  514. Because the Google-supplied Chrome packaging has chosen
  515. a specific file location for extension-specific files which,
  516. if used, would conflicts with the above guidelines,
  517. the Packaging Committee has approved the following exception:
  518. A package MAY install files into the
  519. `+/etc/opt/chrome/native-messaging-hosts+` directory,
  520. and may create that directory hierarchy,
  521. as long as package as a whole also supports Chromium.
  522. (The Chromium support MAY be in a different subpackage.)
  523. If Chrome in the future allows a more standard directory
  524. to be used for this purpose, this exception will be removed.
  525. === Merged file system layout
  526. Fedora has merged several directories that historically used to be
  527. separate.
  528. [cols=",,"]
  529. |===
  530. |Path|Merged with|RPM Macro
  531. |`+/bin+`
  532. |`+/usr/bin+`
  533. |`+{_bindir}+`
  534. |`+/sbin+`
  535. |`+/usr/bin+`
  536. |`+%{_bindir}+`
  537. |`+/usr/sbin+`
  538. |`+/usr/bin+`
  539. |`+%{_bindir}+`
  540. |`+/lib64+` or `+/lib+`
  541. |`+/usr/lib64+` or `+/usr/lib+`
  542. |`+%{_libdir}+`
  543. |`+/lib+`
  544. |`+/usr/lib+`
  545. |`+%{_prefix}/lib+`
  546. |===
  547. For example, end users will find that
  548. `+/bin/sh+` is the same file as `+/usr/bin/sh+`,
  549. and `+/usr/sbin/sendmail+` is the the same as `+/usr/bin/sendmail+`.
  550. However,
  551. rpm file dependencies don't work according to what's on the filesystem,
  552. they work according to the path specified in the rpm `+%files+` section.
  553. So an rpm which specified:
  554. [source, rpm-spec]
  555. ----
  556. %files
  557. /bin/sh
  558. ----
  559. would be able to satisfy a file dependency for `+/bin/sh+`
  560. but not for `+/usr/bin/sh+`.
  561. Packages **must** use the real filesystem paths in the `+%files+` section.
  562. If other packages have dependencies on a different path
  563. that resolves to the same file,
  564. and it is not convenient to update them to the new path,
  565. packages **may** use a virtual `+Provides+` to list the alternate path.
  566. For instance:
  567. [source, rpm-spec]
  568. ----
  569. Provides: /sbin/ifconfig
  570. [...]
  571. %files
  572. %{_bindir}/ifconfig
  573. ----
  574. == Use `+rpmlint+`
  575. Run rpmlint on binary and source rpms to examine them for common errors,
  576. and fix them (unless rpmlint is wrong, which can happen, too).
  577. If you find rpmlint's output cryptic,
  578. the `+-e+` switch to it can be used
  579. to get more verbose descriptions of most errors and warnings.
  580. Note that rpmlint will perform additional checks
  581. if given the name of an installed package.
  582. For example,
  583. `+dnf install foo-1.0-1.f20.x86_64.rpm; rpmlint -i foo+`
  584. will perform a set of tests on the foo package that
  585. `+rpmlint foo-1.0-1.f20.x86_64.rpm+` cannot.
  586. A community-maintained page on rpmlint issues can be found
  587. https://fedoraproject.org/wiki/Common_Rpmlint_issues[here].
  588. == Tags and Sections
  589. * The `+Copyright:+`, `+Packager:+`, `+Vendor:+` and `+PreReq:+` tags
  590. MUST NOT be used.
  591. * The `+BuildRoot:+` tag, `+Group:+` tag, and `+%clean+` section
  592. SHOULD NOT be used.
  593. * The contents of the buildroot SHOULD NOT be removed
  594. in the first line of `+%install+`.
  595. * The `+Summary:+` tag value SHOULD NOT end in a period.
  596. * The `+Source:+` tags document where to find
  597. the upstream sources for the package.
  598. In most cases this SHOULD be a complete URL to the upstream tarball.
  599. For special cases, please see the
  600. xref:SourceURL.adoc[SourceURL Guidelines].
  601. * URLs in the `+URL:+`, `+Source:+` and `+Patch:+` tags
  602. SHOULD require authentication of the server whenever possible.
  603. This typically means writing `+https:+` instead of `+http:+` or `+ftp:+`.
  604. == Package Dependencies
  605. All package dependencies
  606. (build-time or runtime, regular, weak or otherwise)
  607. MUST ALWAYS be satisfiable within the official Fedora repositories.
  608. RPM can automatically determine dependencies for most compiled libraries
  609. and for some scripting languages such as Perl.
  610. Automatically determined dependencies MUST NOT be duplicated
  611. by manual dependencies.
  612. Build dependencies, however, MUST be explicitly listed,
  613. unless you are using an automatic build dependency generator
  614. (e.g. xref:Rust.adoc#_buildrequires[Rust] or
  615. xref:Python.adoc#_build_time_dependency_generator[Python]).
  616. Refer to the <<buildrequires>>.
  617. Versioned dependencies (build-time or runtime) SHOULD ONLY be used
  618. when actually necessary to guarantee
  619. that the proper version of a package is present.
  620. If a versioned dependency would be satisfied
  621. by a version present in three previous Fedora releases
  622. then a versioned dependency is not needed
  623. and a regular unversioned dependency SHOULD be used instead.
  624. A versioned dependency on a package with a defined Epoch
  625. MUST be included in that dependency.
  626. Otherwise the dependency will not function as expected.
  627. === Dependency Types
  628. `Requires` MUST be used if the dependency is required
  629. for the software to function correctly.
  630. If the package functions correctly but in diminished capacity,
  631. then `Recommends` or `Suggests` SHOULD be used.
  632. If the functionality should be available by default for users,
  633. `Recommends` SHOULD be used,
  634. and `Suggests` otherwise.
  635. Alternatively, the reverse dependencies
  636. `Supplements` or `Enhances`
  637. may be used in the other package.
  638. See xref:WeakDependencies.adoc[Packaging:WeakDependencies]
  639. for guidelines on using those dependency types.
  640. === Architecture-specific Dependencies
  641. A dependency is made arch-specific by appending the macro `+%{?_isa}+`
  642. to the package name.
  643. For example:
  644. [source, rpm-spec]
  645. ----
  646. Requires: foo
  647. ----
  648. becomes:
  649. [source, rpm-spec]
  650. ----
  651. Requires: foo%{?_isa}
  652. ----
  653. If the foo-devel package has a foo-config script,
  654. you can try doing a foo-config --libs and foo-config --cflags
  655. to get strong hints what packages should be marked as foo's requirements.
  656. For example:
  657. ....
  658. $ gtk-config --cflags
  659. -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include
  660. $ gtk-config --libs
  661. -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm
  662. ....
  663. This means that gtk+-devel should contain
  664. `+Requires: glib-devel%{?_isa} libXi-devel%{?_isa} libXext-devel%{?_isa} libX11-devel%{?_isa}+`
  665. === Rich/Boolean Dependencies
  666. Packages MAY make full use of the
  667. https://rpm-software-management.github.io/rpm/manual/boolean_dependencies.html[rich (or Boolean) dependency feature]
  668. supported in RPM.
  669. === File and Directory Dependencies
  670. RPM gives you the ability to depend on arbitrary files or directories
  671. instead of packages.
  672. Packages MAY include such dependencies for paths inside one of the following directories:
  673. * `+/usr/bin+`
  674. * `+/etc+`
  675. They also MAY depend on paths listed in an explicit `Provides:`.
  676. They MUST NOT include dependencies on other paths,
  677. as that would require downloading of additional repository metadata to be enabled.
  678. Please also note that it is not uncommon
  679. for multiple packages to provide the same directory.
  680. Directory dependencies SHOULD ONLY be used
  681. to express the dependency on that directory existing,
  682. not on any other functionality of any other package
  683. that might provide that directory.
  684. When declaring file and directory dependencies,
  685. xref:RPMMacros.adoc#macros_installation[installation path macros] like `+%{_bindir}+`
  686. MUST NOT be used.
  687. `+%{_bindir}+` of the package that provides `+sometool+`
  688. may be different from `+%{_bindir}+` of a package that requires `+sometool+`.
  689. In such case, `+BuildRequires: %{_bindir}/sometool+` does not work as expected.
  690. === Explicit Requires
  691. Explicit Requires are Requires added manually by the packager in the spec file.
  692. Packages must not contain unnecessary explicit Requires on libraries.
  693. We generally rely on rpmbuild to automatically add dependencies
  694. on library SONAMEs.
  695. Modern package management tools are capable of resolving such dependencies
  696. to determine the required packages in many cases.
  697. However, present versions of rpmbuild only add deps on library SONAMES,
  698. not the library's full version.
  699. This can be a problem if a library has added features over the course of time
  700. without backwards incompatibilities that would cause SONAMES to be changed.
  701. This can lead to a case where the user has an old version
  702. of a library installed,
  703. the new version of the library with new ABI is built in Fedora
  704. and an application using that ABI is built.
  705. If the user just attempts to install or update that one application
  706. without also updating the library,
  707. the application will install fine
  708. (because the SONAME dependency is satisfied)
  709. but will fail when run because the library installed
  710. on the system is missing features it needs.
  711. Although you do need to add explicit library dependencies
  712. to keep this from occurring,
  713. there are drawbacks to manually specifying this in all your packages.
  714. History has shown that such dependencies add confusion
  715. when library/files are moved from one package to another,
  716. when packages get renamed,
  717. when one out of multiple alternative packages would suffice,
  718. and when versioned explicit dependencies become out-of-date and inaccurate.
  719. Additionally, in some cases,
  720. old explicit dependencies on package names
  721. require unnecessary updates/rebuilds.
  722. For example,
  723. Fedora packages are only required to retain historical provides
  724. for two full release cycles.
  725. Because of this and because we hope to have this fixed in rpmbuild,
  726. this is something to be aware of
  727. but it's not required that you explicitly specify the libraries you require
  728. with their version information.
  729. When explicit library Requires are necessary,
  730. explicit library dependencies should typically be arch-specific
  731. (unless the packages involved are noarch)
  732. and there should be a spec file comment justifying it:
  733. [source, rpm-spec]
  734. ----
  735. # The automatic dependency on libfubar.so.1 is insufficient,
  736. # as we strictly need at least the release that fixes two segfaults.
  737. Requires: libfubar%{?_isa} >= 0:1.2.3-7
  738. ----
  739. Packagers should revisit an explicit dependency
  740. as appropriate to avoid it becoming inaccurate and superfluous.
  741. For instance in the example above,
  742. when no current Fedora release shipped with libfubar < 1.2.3-7,
  743. it is no longer necessary to list the explicit, versioned requirement.
  744. === Filtering Auto-Generated Requires
  745. RPM attempts to auto-generate Requires (and Provides) at build time,
  746. but in some situations,
  747. the auto-generated Requires/Provides are not correct or not wanted.
  748. For more details on how to filter out auto-generated Requires or Provides,
  749. please see:
  750. xref:AutoProvidesAndRequiresFiltering.adoc[Packaging:AutoProvidesAndRequiresFiltering].
  751. [#buildrequires]
  752. == Build-Time Dependencies (BuildRequires)
  753. It is important that your package list all necessary build dependencies
  754. using the `+BuildRequires:+` tag.
  755. You MAY assume that enough of an environment exists for RPM to function,
  756. to build packages and execute basic shell scripts,
  757. but you SHOULD NOT assume any other packages are present
  758. as RPM dependencies
  759. and anything brought into the buildroot by the build system
  760. can change over time.
  761. === BuildRequires and `+%{_isa}+`
  762. You MUST NOT use arched BuildRequires.
  763. The arch ends up in the built SRPM
  764. but SRPMs need to be architecture independent.
  765. For instance, if you did this:
  766. [source, rpm-spec]
  767. ----
  768. # Example of what *not* to do
  769. BuildRequires: foo%{?_isa} >= 3.3
  770. ----
  771. Then the SRPM that is built in Fedora would have one of these Requirements
  772. depending on what builder the SRPM was created on:
  773. ....
  774. foo(x86-32) >= 3.3
  775. # or
  776. foo(x86-64) >= 3.3
  777. ....
  778. This would prevent yum-builddep
  779. or similar tools that use the SRPM's requirements
  780. from operating correctly.
  781. === BuildRequires Based on `+pkg-config+`
  782. Fedora packages which use `+pkg-config+`
  783. to build against a library (e.g. 'foo') on which they depend,
  784. *SHOULD* express their build dependency correctly as `+pkgconfig(foo)+`.
  785. For more information, see
  786. xref:PkgConfigBuildRequires.adoc[Packaging:PkgConfigBuildRequires].
  787. == Conditional Build-Time Dependencies
  788. If the spec file contains conditional dependencies
  789. selected based on presence of optional
  790. `+--with(out) foo+` arguments to `+rpmbuild+`,
  791. build the source RPM to be submitted with the default options,
  792. i.e., so that none of these arguments are present
  793. in the `+rpmbuild+` command line.
  794. The reason is that those requirements get "serialized"
  795. into the resulting source RPM,
  796. i.e., the conditionals no longer apply.
  797. == Summary and Description
  798. The summary should be a short and concise description of the package.
  799. The description expands upon this.
  800. Do not include installation instructions in the description;
  801. it is not a manual.
  802. If the package requires some manual configuration
  803. or there are other important instructions to the user,
  804. refer the user to the documentation in the package.
  805. Add a _README.Fedora_, or similar,
  806. if you feel this is necessary.
  807. Also, please make sure that there are no lines in the description
  808. longer than 80 characters.
  809. Please put personal preferences aside
  810. and use American English spelling in the summary and description.
  811. Packages can contain additional translated summary/description
  812. for supported Non-English languages,
  813. if available.
  814. The Summary tag value SHOULD NOT end in a period.
  815. === Trademarks in Summary or Description
  816. Packagers should be careful how they use trademarks
  817. in Summary or Description.
  818. There are a few rules to follow:
  819. * Never use `\(TM)` or `\(R)` (or the Unicode equivalents, ™/®).
  820. It is incredibly complicated to use these properly,
  821. so it is actually safer for us to not use them at all.
  822. * Use trademarks in a way that is not ambiguous.
  823. Avoid phrasing like "similar to" or "like". Some examples:
  824. * *BAD:* It is similar to Adobe Photoshop.
  825. * *GOOD:* It supports Adobe Photoshop PSD files, ...
  826. * *BAD:* A Linux version of Microsoft Office
  827. * *GOOD:* A word-processor with support for Microsoft Office DOC files
  828. If you're not sure, ask yourself,
  829. is there any chance someone may get confused
  830. and think that this package is the trademarked item?
  831. When in doubt, try to leave the trademark out.
  832. == Documentation
  833. Any relevant documentation included in the source distribution
  834. should be included in the package in the proper documentation directory.
  835. Irrelevant documentation includes build instructions,
  836. the omnipresent _INSTALL_ file containing generic build instructions,
  837. or example,
  838. and documentation for non-Linux systems, e.g. _README.MSDOS_.
  839. Also pay attention about which subpackage you include documentation in.
  840. For example API documentation belongs in the `+-devel+` subpackage,
  841. not the main one.
  842. Or if there's a lot of documentation,
  843. consider putting it into a subpackage.
  844. In this case, it is recommended to use `+*-doc+` as the subpackage name.
  845. Marking a _relative_ path with `+%doc+` in the `+%files+` section
  846. will cause RPM to copy the referenced file or directory
  847. from `+%_builddir+` to the proper location for documentation.
  848. Files can also be placed in `+%_pkgdocdir+`,
  849. and the build scripts of the software being packaged may do this automatically
  850. when called in `+%install+`.
  851. However, mixing these methods is problematic
  852. and may result in duplicated or conflicting files,
  853. so use of `+%doc+` with _relative_ paths and installation of files
  854. directly into `+%_pkgdocdir+` in the same source package is forbidden.
  855. Files marked as documentation must not cause the package
  856. to pull in more dependencies than it would without the documentation.
  857. One simple way to ensure this in most cases
  858. is to remove all executable permissions from files in `+%_pkgdocdir+`.
  859. Files located in `+%_pkgdocdir+` must not affect the runtime
  860. of the packaged software.
  861. The software must function properly
  862. and with unchanged functionality
  863. if those files are modified, removed or not installed at all.
  864. Although license files are documentation,
  865. they are treated specially (including using a different tag).
  866. Please see xref:LicensingGuidelines.adoc[Licensing Guidelines]
  867. for how to handle them.
  868. === Separate Documentation Packages
  869. If building documentation requires many additional dependencies
  870. then you MAY elect to not build it in the main package
  871. and instead create a separate *-doc source package
  872. which builds only the documentation.
  873. This separately packaged documentation MUST correspond
  874. to the version of the packaged software.
  875. In other words,
  876. if a new release of the software includes changes to the documentation,
  877. then the documentation package MUST also be updated.
  878. But if the new version of the software
  879. does not include documentation changes,
  880. then you MAY choose not to update the documentation package.
  881. A comment SHOULD be added near Version tag of the main package
  882. to remind maintainers to update the separate *-doc package when needed.
  883. [#changelogs]
  884. == Changelogs
  885. The changelog describes the changes to the package that are relevant
  886. to the users of the package. This includes new upstream versions, important
  887. changes to how the package is built, rebuilds, and other changes affecting the outcome.
  888. Changes which are only relevant to packagers should not be mentioned in the
  889. changelog. This includes spec file cleanups, build error fixes or workarounds,
  890. and other changes which don't have an effect on content of the binary packages.
  891. The changelog **should** be generated automatically from git commit logs
  892. using the `+%autochangelog+` macro:
  893. [source, rpm-spec]
  894. ----
  895. %changelog
  896. %autochangelog
  897. ----
  898. The commit subject (the first line of the commit message)
  899. and optionally some additional lines
  900. are used to generate the changelog text.
  901. The commit author name and email address and the commit timestamp
  902. are also used in changelog entry.
  903. The text in the the commit message which will become part of the changelog
  904. should should provide a brief summary of the changes relevant for the user.
  905. The commit message may contain additional information that is relevant
  906. to packagers.
  907. If a particular change is related to a Bugzilla bug,
  908. include the bug ID in the changelog entry for easy reference, e.g.
  909. [source]
  910. ----
  911. Add README file (rhbz#1000042)
  912. ----
  913. If a particular commit fixes a CVE, this information should be included too.
  914. The intent is to give the user a hint as to what changed
  915. in a package update without overwhelming them with the technical details.
  916. They must never simply contain an entire copy of the source CHANGELOG entries.
  917. Links to upstream NEWS files or changelogs can be entered
  918. for those who want additional information.
  919. See https://docs.pagure.org/fedora-infra.rpmautospec/autochangelog.html[autochangelog documentation]
  920. for the details of how the changelog is generated from git commit messages,
  921. and how to create multi-line entries or skip entries for certain commits.
  922. Packagers **may** alternatively use a manual changelog instead of the `+%autochangelog+` macro.
  923. This is described in xref:manual-changelog.adoc[Manual Changelog].
  924. === Example
  925. The packager updates package to version 1.0 and creates a commit
  926. [console]
  927. ----
  928. $ git show
  929. commit 0000000000001234567890ABCDEF000000000000
  930. Author: Joe Packager <joe@example.com>
  931. Date: Wed Jun 14 2003
  932. Version 1.0
  933. ... (rhbz#1000024)
  934. - Also fixes the slowdown reported in rhbz#1000025
  935. - Upstream changelog: https://example.com/package/NEWS.html#v1.0
  936. Whitespace in the spec file has been cleaned up.
  937. diff --git package.spec package.spec
  938. index 5c77064c03..efcd53a61c 100644
  939. --- package.spec
  940. +++ package.spec
  941. @@ -1,5 +1,5 @@
  942. Name: package
  943. -Version: 0.1
  944. +Version: 0.2
  945. Release: %autorelease
  946. ...
  947. ----
  948. When the package is built, an appropriate changelog entry will be generated.
  949. It can be previewed with `rpmautospec generate-chagengelog`:
  950. [console]
  951. ----
  952. $ rpmautospec generate-changelog
  953. * Wed Jun 14 2003 Joe Packager <joe@example.com> - 0.2-1
  954. - Version 1.0 (rhbz#1000024)
  955. - Also fixes the slowdown reported in rhbz#1000025
  956. - Upstream changelog: https://example.com/package/NEWS.html#v1.0
  957. ----
  958. Note that the sentence about whitespace is not included in the changelog.
  959. == Manpages
  960. As man pages are the traditional method of getting help on a Unix system,
  961. packages SHOULD contain them for all executables.
  962. If some man pages are absent,
  963. packagers SHOULD work with upstream to add them.
  964. It is also occasionally possible to find pages created by other distributions,
  965. or to use the output of the `+help2man+` program;
  966. those are often useful as a starting point.
  967. When installing man pages,
  968. note that RPM will re-compress them into its preferred format.
  969. So the `+%files+` section MUST reference manpages
  970. with a pattern that takes this into account:
  971. [source, rpm-spec]
  972. ----
  973. %files
  974. %{_mandir}/man1/foo.1*
  975. ----
  976. Note also that files installed in `+%{_mandir}+`
  977. are automatically marked by RPM as documentation.
  978. Thus it is not necessary to use `+%doc+`.
  979. For localised manpages, use `+%find_lang --with-man+`
  980. as described in <<handling_locale_files>>.
  981. [#compiler]
  982. == Compiler
  983. Fedora packages should default to using gcc as the compiler
  984. (for all languages that gcc supports)
  985. or clang if upstream does not support building with gcc.
  986. However, if there is a good technical reason,
  987. packagers may choose not to use the default compiler.
  988. Examples of valid technical reasons to not use the default compiler,
  989. include but are not limited to:
  990. * The default compiler cannot build a package correctly.
  991. * The packager needs to disable a compiler feature (e.g. LTO)
  992. in order for the default compiler to correctly compile their package.
  993. * The default compiler takes significantly longer to build a package.
  994. * The default compiler is missing a feature that would benefit the package.
  995. Packagers choosing to use a non-default compiler
  996. should document the reason for this decision in a comment in the spec file.
  997. == Compiler Macros
  998. If clang is being used to build a package,
  999. packagers must set the %toolchain macro to clang:
  1000. [source, rpm-spec]
  1001. ----
  1002. %global toolchain clang
  1003. ----
  1004. This ensures that Fedora's clang-specific compiler flags are used
  1005. when compiling.
  1006. If a packager wants to use conditional macros in a spec file
  1007. to make it easier to switch between two different compilers,
  1008. then the following macros names should be used:
  1009. [source, rpm-spec]
  1010. ----
  1011. %bcond_with toolchain_clang
  1012. %bcond_with toolchain_gcc
  1013. ----
  1014. Packagers may also use the %build_cc, %build_cxx, or %build_cpp macros
  1015. in the spec file in place of hard-coding the compiler name.
  1016. The values of these variables are controled by setting the %toolchain macro
  1017. to either clang or gcc.
  1018. == Compiler Flags
  1019. Compilers used to build packages must honor the applicable compiler flags
  1020. set in the system rpm configuration.
  1021. Honoring means that the contents of that variable is used
  1022. as the basis of the flags actually used by the compiler
  1023. during the package build.
  1024. For C, {cpp}, and Fortran code,
  1025. the xref:RPMMacros.adoc#build-flags-macros-and-variables[%\{optflags} macro]
  1026. contains these flags.
  1027. Overriding these flags for performance optimizations
  1028. (for instance, -O3 instead of -O2)
  1029. is generally discouraged.
  1030. If you can present benchmarks that show a significant speedup
  1031. for this particular code,
  1032. this could be revisited on a case-by-case basis.
  1033. Adding to and overriding or filtering parts of these flags is permitted
  1034. if there's a good reason to do so;
  1035. the rationale for doing so must be documented in the specfile.
  1036. There are certain, security related flags that are commonly allowed.
  1037. These flags may degrade performance slightly
  1038. but the increased security can be worthwhile for some programs.
  1039. === PIE
  1040. PIE adds security to executables
  1041. by composing them entirely of position-independent code.
  1042. Position-independent code (PIC) is machine instruction code
  1043. that executes properly regardless of where in memory it resides.
  1044. PIE allows Exec Shield to use address space layout randomization
  1045. to prevent attackers from knowing where existing executable code is
  1046. during a security attack using exploits that rely on knowing the offset
  1047. of the executable code in the binary, such as return-to-libc attacks.
  1048. In Fedora, PIE is enabled by default. To disable it in your
  1049. spec, add:
  1050. [source, rpm-spec]
  1051. ----
  1052. %undefine _hardened_build
  1053. ----
  1054. If your package meets any of the following criteria you
  1055. MUST NOT disable the PIE compiler flags:
  1056. * Your package is long running.
  1057. This means it's likely to be started and keep running
  1058. until the machine is rebooted, not start on demand and quit on idle.
  1059. * Your package has suid binaries, or binaries with capabilities.
  1060. * Your package runs as root.
  1061. == Debuginfo Packages
  1062. Packages should produce useful `+-debuginfo+` packages,
  1063. or explicitly disable them when it is not possible to generate a useful one
  1064. but rpmbuild would do it anyway.
  1065. Whenever a `+-debuginfo+` package is explicitly disabled,
  1066. an explanation why it was done is required in the specfile.
  1067. Debuginfo packages are discussed in more detail in a separate document,
  1068. xref:Debuginfo.adoc[Packaging:Debuginfo].
  1069. == Devel Packages
  1070. Fedora packages must be designed with a logical separation of files.
  1071. Specifically, -devel packages must be used to contain files
  1072. which are intended solely for development or needed only at build-time.
  1073. This is done to minimize the install footprint for users.
  1074. There are some types of files which almost always belong in a -devel package:
  1075. * Header files (foo.h), usually found in /usr/include
  1076. * Static library files
  1077. when the package does not provide any matching shared library files.
  1078. See <<packaging-static-libraries>> for more information about this scenario.
  1079. * Unversioned shared system library files,
  1080. when a matching versioned shared system library file is also present.
  1081. For example, if your package contains:
  1082. ....
  1083. /usr/lib/libfoo.so.3.0.0
  1084. /usr/lib/libfoo.so.3
  1085. /usr/lib/libfoo.so
  1086. ....
  1087. The versioned shared library files
  1088. (/usr/lib/libfoo.so.3.2.0 and /usr/lib/libfoo.so.3)
  1089. are necessary for users to run programs linked against libfoo,
  1090. so they belong in the base package.
  1091. The other, unversioned, shared library file (/usr/lib/libfoo.so)
  1092. is only used to actually link libfoo to code being compiled,
  1093. and is not necessary to be installed on a users system.
  1094. This means that it belongs in a -devel package.
  1095. Please note that in most cases,
  1096. only the fully versioned shared library file (/usr/lib/libfoo.so.3.2.0)
  1097. is an actual file, all of the other files are symbolic links to it.
  1098. When a shared library file is only provided in an unversioned format,
  1099. the packager should ask upstream
  1100. to consider providing a properly versioned library file.
  1101. However, in such cases, if the shared library file is necessary
  1102. for users to run programs linked against it,
  1103. it must go into the base package.
  1104. If upstream versions the shared library file at a future point,
  1105. packagers must be careful to move to the versioned layout described above.
  1106. === Unversioned Shared Objects
  1107. As an additional complication,
  1108. some software generates xref:Unversioned_shared_objects.
  1109. adoc[unversioned shared objects]
  1110. which are not intended to be used as system libraries.
  1111. These files are usually plugins or modular functionality specific to an application,
  1112. and are not to be located in the ld library paths or cache.
  1113. These types of unversioned shared objects
  1114. do not need to go into a -devel package.
  1115. They are only loaded at runtime
  1116. and should be included in a private directory of the main package.
  1117. For specific details
  1118. about how to deal with these types of DSOs,
  1119. please see xref:Unversioned_shared_objects.
  1120. adoc[unversioned shared objects]
  1121. for detailed guidance.
  1122. === Exceptions
  1123. There are some notable exceptions to this packaging model, specifically:
  1124. * compilers often include development files in the main package
  1125. because compilers are themselves only used for software development,
  1126. thus, a split package model does not make any sense.
  1127. When in doubt as to whether a file belongs in the base package or in -devel,
  1128. packagers should consider whether the file is necessary to be present
  1129. for a user to use or execute the functionality in the base package properly,
  1130. or if it is only necessary for development.
  1131. If it is only necessary for development, it must go into a -devel package.
  1132. As with all Fedora Packaging Guidelines,
  1133. it is recognized that there are unique situations
  1134. that fall outside of the boundaries of this model.
  1135. Should you come across such a case,
  1136. please open a ticket with the {packaging-committee}
  1137. and explain it to us so that we can extend the Guidelines to address it.
  1138. === Pkgconfig Files (`+foo.pc+`)
  1139. The placement of pkgconfig(.pc) files depends on their usecase.
  1140. Since they are almost always used for development purposes,
  1141. they should be placed in a -devel package.
  1142. A reasonable exception is when the main package itself is a development tool
  1143. not installed in a user runtime, e.g. gcc or gdb.
  1144. == Requiring Base Package
  1145. Subpackages are often extensions for their base package
  1146. and in that case they should require their base package.
  1147. When a subpackage requires the base package,
  1148. it *MUST* do so using a fully versioned arch-specific
  1149. (for non-noarch packages) dependency:
  1150. [source, rpm-spec]
  1151. ----
  1152. Requires: %{name}%{?_isa} = %{version}-%{release}
  1153. ----
  1154. Devel packages are an example of a package
  1155. that must require their base packages using a fully versioned dependency.
  1156. -libs subpackages which only contain shared libraries
  1157. do not normally need to explicitly depend on their base packages
  1158. as they usually do not need the base package to be functional libraries.
  1159. If you end up in a situation where the main package depends on the subpackage
  1160. and the subpackage on the main package
  1161. you should think carefully
  1162. about why you don't have everything in the main package.
  1163. == Shared Libraries
  1164. Whenever possible (and feasible),
  1165. Fedora packages containing libraries SHOULD build them as shared libraries.
  1166. It is not necessary to call `+ldconfig+` when installing shared libraries.
  1167. === Listing Shared Library Files
  1168. Shared libraries installed directly into `+%{_libdir}+` *SHOULD NOT* be listed
  1169. in the `%files` section of the spec by using a glob in a way
  1170. that conceals important parts of the file name (e.g. `libfoo.so*`),
  1171. since changes to the `SONAME` also result in a changed file name in most cases.
  1172. Otherwise, when the library bumps its `SONAME` as part of an update,
  1173. this change might remain unnoticed and cause problems like broken dependencies
  1174. (see the relevant {updates-policy} section for further information).
  1175. However, if the use of globs is deemed useful by the packager - for example,
  1176. if the `Y` and `Z` parts of a library named `libfoo.so.X.Y.Z` change frequently,
  1177. using something like `libfoo.so.X{,.*}` is recommended instead,
  1178. since dependent packages usually don't have to be rebuilt
  1179. for changes of this kind.
  1180. === Downstream `+.so+` Name Versioning
  1181. In cases where upstream ships unversioned .so *library*
  1182. (so this is not needed for plugins, drivers, etc.),
  1183. the packager *MUST* try to convince upstream to start versioning it.
  1184. If that fails due to unwilling or unresponsive upstream,
  1185. the packager may start versioning downstream
  1186. but this must be done with caution and ideally only in rare cases.
  1187. We don't want to create a library that could conflict with upstream
  1188. if they later start providing versioned shared libraries.
  1189. Under no circumstances should the unversioned library be shipped in Fedora.
  1190. For downstream versioning, the name should be composed like this:
  1191. ....
  1192. libfoobar.so.0.n
  1193. ....
  1194. The _n_ should initially be a small integer (for instance, "1").
  1195. we use two digits here ("0.n")
  1196. because the common practice with upstreams is to use only a single digit here.
  1197. Using multiple digits helps us avoid potential future conflicts.
  1198. Do not forget to add the SONAME field (see below) to the library.
  1199. When new versions of the library are released,
  1200. you should use an {abi-comparison-tool} to check for ABI differences
  1201. in the built shared libraries.
  1202. If it detects any incompatibilities, bump the _n_ number by one.
  1203. ==== SONAME Handling
  1204. When running an executable linked to shared object with SONAME field,
  1205. the dynamic linker checks for this field
  1206. instead of filename to determine the object with which it should link.
  1207. This allows developers to simply link against the unversioned library symlink
  1208. and the dynamic linker will link against the correct object.
  1209. Keep in mind that although the filename is usually the library's SONAME
  1210. plus an incrementing minor version
  1211. there's nothing that intrinsically links these.
  1212. ldconfig uses the SONAME as the value for a symlink to the actual filename.
  1213. The dynamic linker then uses that symlink to find the library,
  1214. disregarding the actual filename.
  1215. The dynamic linker merely does a simple equality check on the field
  1216. and does not check for ABI incompatibilities or similar problems.
  1217. This is the main reason for using an
  1218. {abi-comparison-tool} and incrementing the SONAME.
  1219. The SONAME field is written to the shared object by linker,
  1220. using (at least in case of `+ld+`) the `+-soname SONAME+` flags.
  1221. This can be passed as an option to `+gcc+` like this:
  1222. ....
  1223. $ gcc $CFLAGS -Wl,-soname,libfoo.so.0.n -o libfoo.so.0.n
  1224. ....
  1225. If you want to check if the SONAME field is set and what value it has,
  1226. use the `+objdump+` command (from `+binutils+`):
  1227. ....
  1228. $ objdump -p /path/to/libfoo.so.0.n | grep 'SONAME'
  1229. ....
  1230. [#packaging-static-libraries]
  1231. == Packaging Static Libraries
  1232. Packages including libraries SHOULD exclude static libs as far as possible
  1233. (e.g., by configuring with _--disable-static_).
  1234. Applications linking against libraries SHOULD link against shared libraries
  1235. not static versions.
  1236. Libtool archives, _foo.la_ files, SHOULD NOT be included.
  1237. Packages using libtool will install these by default
  1238. even if you configure with _--disable-static_,
  1239. so they may need to be removed before packaging.
  1240. Due to bugs in older versions of libtool or bugs in programs that use it,
  1241. there are times when it is not always possible to remove *.la files
  1242. without modifying the program.
  1243. In most cases it is fairly easy to work with upstream to fix these issues.
  1244. Note that if you are updating a library in a stable release (not devel)
  1245. and the package already contains *.la files,
  1246. removing the *.la files SHOULD be treated as an API/ABI change
  1247. -- i.e., removing them changes the interface that the library gives
  1248. to the rest of the world thus MUST follow Fedora policies
  1249. for potentially destabilizing updates.
  1250. === Packaging Static Libraries
  1251. * In general, packagers SHOULD NOT ship static libraries.
  1252. * We want to be able to track which packages are using static libraries
  1253. (so we can find which packages need to be rebuilt
  1254. if a security flaw in a static library is fixed, for instance).
  1255. There are two scenarios in which static libraries are packaged:
  1256. 1. *Static libraries and shared libraries.*
  1257. In this case, the static libraries MUST be placed in a _*-static_ subpackage.
  1258. Separating the static libraries from the other development files
  1259. in _*-devel_ allow us to track this usage by checking which packages
  1260. `+BuildRequire+` the _*-static_ package.
  1261. The intent is that whenever possible,
  1262. packages will move away from using these static libraries,
  1263. to the shared libraries.
  1264. If the _*-static_ subpackage requires headers or other files
  1265. from _*-devel_ in order to be useful it MUST require the _*-devel_ subpackage.
  1266. 2. *Static libraries only.*
  1267. When a package only provides static libraries
  1268. you MAY place all the static library files in the _*-devel_ subpackage.
  1269. When doing this you also MUST have a virtual Provide
  1270. for the _*-static_ package:
  1271. +
  1272. [source, rpm-spec]
  1273. ----
  1274. %package devel
  1275. Provides: foo-static = %{version}-%{release}
  1276. ----
  1277. Packages which explicitly need to link against the static version
  1278. MUST `+BuildRequire: foo-static+`,
  1279. so that the usage can be tracked.
  1280. * If (and only if) a package has shared libraries
  1281. which require static libraries to be functional,
  1282. the static libraries can be included in the _*-devel_ subpackage.
  1283. The devel subpackage must have a virtual Provide for the _*-static_ package,
  1284. and packages dependent on it must `+BuildRequire+` the _*-static_ package.
  1285. === Packaging Header Only Libraries
  1286. Certain libraries, especially some {cpp} template libraries,
  1287. are header only libraries.
  1288. Since the code is generated during compile time,
  1289. they act just like static libraries and need to be treated as such.
  1290. Place all of the header files in the _*-devel_ subpackage
  1291. and then you must have a virtual Provide for the _*-static_ package:
  1292. [source, rpm-spec]
  1293. ----
  1294. %package devel
  1295. Provides: foo-static = %{version}-%{release}
  1296. ----
  1297. Packages which use the header library must `+BuildRequire: foo-static+`,
  1298. so that the usage can be tracked.
  1299. ==== Use noarch only in subpackages
  1300. The base package for a header library MUST NOT be marked noarch.
  1301. This ensures that any tests are run on all architectures,
  1302. and makes it possible to detect whether the build or install process
  1303. has modified the headers based on the build architecture.
  1304. When the contents of subpackages, including the `+-devel+` package,
  1305. are actually architecture-independent, they may still be marked noarch.
  1306. Since the base package for a header library typically has no `+%files+` list,
  1307. this may result in an arched package that builds only noarch rpms.
  1308. This may require adding `+%global debug_package %{nil}+` to the spec file in
  1309. order to avoid empty `+debugsourcefiles.list+` issues.
  1310. === Statically Linking Executables
  1311. Executables and libraries SHOULD NOT be linked statically against libraries
  1312. which come from other packages.
  1313. (It is of course acceptable for files generated
  1314. during a package's build process
  1315. to be linked statically against `+.a+` files
  1316. generated as part of that build process.)
  1317. If it is necessary to link against `+.a+` files from a different package,
  1318. a build dependency on the `+-static+` package
  1319. (not just the `+-devel+` package)
  1320. which provides those files MUST be present so that the usage can be tracked.
  1321. [#bundling]
  1322. == Bundling and Duplication of System Libraries
  1323. Fedora packages SHOULD make every effort to avoid having
  1324. multiple, separate, upstream projects
  1325. bundled together in a single package.
  1326. All packages whose upstreams allow them to be built against system libraries
  1327. MUST be built against system libraries.
  1328. In this case, bundled libraries (and/or their source code)
  1329. MUST be explicitly deleted during `+%prep+`.
  1330. Build scripts may need to be patched to deal with this situation.
  1331. Whenever possible,
  1332. the patch should conditionalize the use of the bundled libraries,
  1333. so that the patch can be sent upstream for consideration.
  1334. All packages whose upstreams have no mechanism to build against system libraries
  1335. MAY opt to carry bundled libraries,
  1336. but if they do, they MUST include an indication of what they bundle.
  1337. This provides a mechanism for locating libraries with bundled code which can,
  1338. for example, assist in locating packages
  1339. which may have particular security vulnerabilities.
  1340. To indicate an instance of bundling,
  1341. first determine the name and version of the bundled library:
  1342. * If the bundled package also exists separately in the distribution,
  1343. use the name of that package.
  1344. Otherwise consult the xref:Naming.adoc[Naming Guidelines]
  1345. to determine an appropriate name for the library
  1346. as if it were entering the distribution as a separate package.
  1347. * Use the xref:Versioning.adoc[Versioning Guidelines]
  1348. to determine an appropriate version for the library, if possible.
  1349. If the library has been forked from an upstream,
  1350. use the upstream version that was most recently merged in or rebased onto,
  1351. or the version the original library carried at the time of the fork.
  1352. Then at an appropriate place in your spec,
  1353. add `+Provides: bundled(<libname>) = <version>+`
  1354. where `+<libname>+` and `+<version>+`
  1355. are the name and version you determined above.
  1356. If it was not possible to determine a version,
  1357. use `+Provides: bundled(<libname>)+` instead.
  1358. In addition to indicating bundling in this manner,
  1359. packages whose upstreams have no mechanism to build against system libraries
  1360. must be contacted publicly about a path to supporting system libraries.
  1361. If upstream refuses, this must be recorded in the spec file,
  1362. either in comments placed adjacent to the Provides: above,
  1363. or in an additional file checked into the SCM
  1364. and referenced by a comment placed adjacent to the `+Provides:+` above.
  1365. === Avoid Bundling of Fonts in Other Packages
  1366. Fonts in general-purpose formats such as
  1367. Type1, OpenType TT (TTF) or OpenType CFF (OTF)
  1368. are subject to specific packaging guidelines
  1369. (xref:FontsPolicy.adoc[Packaging/FontsPolicy]),
  1370. and should always be packaged in the system-wide font repositories
  1371. instead of private application directories.
  1372. For more information, see: xref:FontsPolicy.adoc[Packaging/FontsPolicy].
  1373. == Beware of `+rpath+`
  1374. Sometimes, code will hardcode specific library paths when linking binaries
  1375. (using the -rpath or -R flag).
  1376. This is commonly referred to as an rpath.
  1377. Normally, the dynamic linker and loader (ld.so)
  1378. resolve the executable's dependencies on shared libraries
  1379. and load what is required.
  1380. However, when -rpath or -R is used,
  1381. the location information is then hardcoded into the binary
  1382. and is examined by ld.so in the beginning of the execution.
  1383. Since the Linux dynamic linker is usually smarter than a hardcoded path,
  1384. we usually do not permit the use of rpath in Fedora.
  1385. There is a tool called _check-rpaths_ which is included
  1386. in the _rpmdevtools_ package.
  1387. It is a good idea to add it to the `+%__arch_install_post+` macro
  1388. in your `+~/.rpmmacros+` config file:
  1389. [source, rpm-spec]
  1390. ----
  1391. %__arch_install_post \
  1392. /usr/lib/rpm/check-rpaths \
  1393. /usr/lib/rpm/check-buildroot
  1394. ----
  1395. When _check-rpaths_ is run, you might see output like this:
  1396. ....
  1397. ERROR 0001: file '/usr/bin/xapian-tcpsrv' contains a standard rpath '/usr/lib64' in [/usr/lib64]
  1398. ....
  1399. Any rpath flagged by check-rpaths *MUST* be removed.
  1400. === `+rpath+` for Internal Libraries
  1401. When a program installs internal libraries
  1402. they are often not installed in the system path.
  1403. These internal libraries are only used for the programs
  1404. that are present in the package
  1405. (for example, to factor out code that's common to the executables).
  1406. These libraries are not intended for use outside of the package.
  1407. When this occurs, it is acceptable for the programs within the package
  1408. to use an rpath to find these libraries.
  1409. Example:
  1410. ....
  1411. # Internal libraries for myapp are present in:
  1412. %{_libdir}/myapp/
  1413. %{_libdir}/myapp/libmyapp.so.0.3.4
  1414. %{_libdir}/myapp/libmyapp.so
  1415. # myapp has an rpath to %{_libdir}/myapp/
  1416. readelf -d /usr/bin/myapp | grep RPATH
  1417. 0x0000000f (RPATH) Library rpath: [/usr/lib/myapp]
  1418. ....
  1419. TIP: *Non-Internal Libraries*: When programs outside of the package
  1420. are supposed to link against the library,
  1421. it is better to use the
  1422. <<alternatives-to-rpath,Alternative to Rpath>>
  1423. or simply move the libraries into `+%{_libdir}+` instead.
  1424. That way the dynamic linker can find the libraries
  1425. without having to link all the programs with an rpath.
  1426. [#alternatives-to-rpath]
  1427. === Alternatives to `+rpath+`
  1428. Often, rpath is used because a binary is looking for libraries
  1429. in a non-standard location
  1430. (standard locations are /lib, /usr/lib, /lib64, /usr/lib64).
  1431. If you are storing a library in a non-standard location (e.g. /usr/lib/foo/),
  1432. you should include a custom config file in /etc/ld.so.conf.d/.
  1433. For example, if I was putting 32 bit libraries of libfoo in /usr/lib/foo,
  1434. I would want to make a file called "foo32.conf"
  1435. in /etc/ld.so.conf.d/, which contained the following:
  1436. ....
  1437. /usr/lib/foo
  1438. ....
  1439. Make sure that you also make a 64bit version of this file (e.g. foo64.conf)
  1440. as well (unless the package is disabled for 64bit architectures, of course).
  1441. === Removing `+rpath+`
  1442. There are several different ways to fix the rpath issue:
  1443. * If the application uses configure,
  1444. try passing the _--disable-rpath_ flag to configure.
  1445. * If the application uses a local copy of libtool,
  1446. add the following lines to the spec after %configure:
  1447. [source, rpm-spec]
  1448. ----
  1449. %configure
  1450. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
  1451. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
  1452. ----
  1453. * Sometimes, the code/Makefiles can be patched
  1454. to remove the _-rpath_ or _-R_ flag from being called.
  1455. This is not always easy or sane to do, however.
  1456. * As a last resort, Fedora has a package called _chrpath_.
  1457. When this package is installed,
  1458. you can run `+chrpath --delete+` on the files which contain rpaths.
  1459. So, in our earlier example, we'd run:
  1460. ....
  1461. chrpath --delete $RPM_BUILD_ROOT%{_bindir}/xapian-tcpsrv
  1462. ....
  1463. Make sure that you remember to add a
  1464. *BuildRequires: chrpath* if you end up using this method.
  1465. == Configuration Files
  1466. Configuration files must be marked as such in packages.
  1467. As a rule of thumb,
  1468. use `+%config(noreplace)+` instead of plain `+%config+`
  1469. unless your best, educated guess is that doing so will break things.
  1470. In other words,
  1471. think hard before overwriting local changes
  1472. in configuration files n package upgrades.
  1473. An example case when *not* to use `+noreplace+`
  1474. is when a package's configuration file changes
  1475. so that the new package revision wouldn't work
  1476. with the config file from the previous package revision.
  1477. Whenever plain `+%config+` is used,
  1478. add a brief comment to the specfile explaining why.
  1479. Don't use %config or %config(noreplace) under /usr.
  1480. /usr is deemed to not contain configuration files in Fedora.
  1481. === Configuration of Package Managers
  1482. Packages MUST NOT install repository configuration files which violate
  1483. the https://docs.fedoraproject.org/en-US/fesco/Third_Party_Repository_Policy/[Third Party Repository Policy],
  1484. unless those files are installed under `+%{_docdir}+`.
  1485. == Per-Product Configuration
  1486. In the Fedora.next world,
  1487. we will have a set of curated Fedora Products
  1488. as well as the availability of classic Fedora.
  1489. Historically, we have maintained a single set of configuration defaults
  1490. for all Fedora installs but different target use-cases have different needs.
  1491. Please see the
  1492. xref:Per-Product_Configuration.adoc[Per-Product Configuration Guidelines]
  1493. for instructions on how to create packages
  1494. that need to behave differently between Fedora.next Products.
  1495. == Initscripts
  1496. SystemV-style initscripts are forbidden in Fedora.
  1497. Systemd units must be used instead.
  1498. == Systemd Units
  1499. Detailed guidelines for packaging systemd units
  1500. and systemd-managed services are xref:Systemd.adoc[here].
  1501. == Desktop Files
  1502. If a package contains a GUI application,
  1503. then it needs to also include a properly installed .desktop file.
  1504. For the purposes of these guidelines,
  1505. a GUI application is defined as any application which draws a window
  1506. and runs from within that window.
  1507. Installed .desktop files MUST follow the
  1508. https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html[desktop-entry-spec],
  1509. paying particular attention to validating correct usage of
  1510. Name, GenericName,
  1511. https://standards.freedesktop.org/menu-spec/latest/apa.html[Categories],
  1512. https://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt[StartupNotify]
  1513. entries.
  1514. === Icon Tag in Desktop Files
  1515. The icon tag can be specified in two ways:
  1516. * Full path to specific icon file:
  1517. `+Icon=/usr/share/pixmaps/comical.png+`
  1518. * Short name without file extension:
  1519. `+Icon=comical+`
  1520. The short name without file extension is preferred,
  1521. because it allows for icon theming
  1522. (it assumes .png by default, then tries .svg and finally .xpm),
  1523. but either method is acceptable.
  1524. === `+.desktop+` File Creation
  1525. If the package doesn't already include and install its own .desktop file,
  1526. you need to make your own.
  1527. You can do this by including a .desktop file you create as a Source:
  1528. (e.g. Source3: %\{name}.desktop)
  1529. or generating it in the spec file.
  1530. Here are the contents of a sample .desktop file (comical.desktop):
  1531. ....
  1532. [Desktop Entry]
  1533. Name=Comical
  1534. GenericName=Comic Archive Reader
  1535. Comment=Open .cbr & .cbz files
  1536. Exec=comical
  1537. Icon=comical
  1538. Terminal=false
  1539. Type=Application
  1540. Categories=Graphics;
  1541. ....
  1542. === `+desktop-file-install+` Usage
  1543. It is not simply enough to just include the .desktop file in the package,
  1544. one MUST run `+desktop-file-install+` (in `+%install+`)
  1545. OR `+desktop-file-validate+` (in `+%check+` or `+%install+`)
  1546. and have `+BuildRequires: desktop-file-utils+`,
  1547. to help ensure .desktop file safety and spec-compliance.
  1548. `+desktop-file-install+` MUST be used if the package does not install the file
  1549. or there are changes desired to the .desktop file
  1550. (such as add/removing categories, etc).
  1551. `+desktop-file-validate+` MAY be used instead
  1552. if the .desktop file's content/location does not need modification.
  1553. Here are some examples of usage:
  1554. [source, rpm-spec]
  1555. ----
  1556. desktop-file-install \
  1557. --dir=%{buildroot}%{_datadir}/applications \
  1558. %{SOURCE3}
  1559. ----
  1560. [source, rpm-spec]
  1561. ----
  1562. desktop-file-install \
  1563. --add-category="AudioVideo" \
  1564. --delete-original \
  1565. --dir=%{buildroot}%{_datadir}/applications \
  1566. %{buildroot}/%{_datadir}/applications/foo.desktop
  1567. ----
  1568. [source, rpm-spec]
  1569. ----
  1570. desktop-file-validate %{buildroot}/%{_datadir}/applications/foo.desktop
  1571. ----
  1572. Do *not* apply a vendor tag to .desktop files (using --vendor).
  1573. == AppData Files
  1574. Packages containing graphical applications should include AppData files.
  1575. See xref:AppData.adoc[Packaging:AppData] for the relevant guidelines.
  1576. == Macros
  1577. Packagers are strongly encouraged to use macros
  1578. instead of hard-coded directory names (see xref:RPMMacros.adoc[RPMMacros]).
  1579. However, in situations where the macro is longer than the path it represents,
  1580. or situations where the packager feels it is cleaner to use the actual path,
  1581. the packager is permitted to use the actual path instead of the macro.
  1582. There are several caveats to this approach:
  1583. * The package must be consistent.
  1584. For any given path, within the same spec,
  1585. use either a hard-coded path or a macro, not a combination of the two.
  1586. * %\{_libdir} must always be used for binary libraries due to multi-lib,
  1587. you may not substitute a hard-coded path.
  1588. Macros with names beginning with underscores
  1589. are generally considered to be implementation details internal to RPM
  1590. and its associated macro packages
  1591. and SHOULD NOT be referenced in specfiles
  1592. except to set their values in order to influence RPM behavior.
  1593. This implies that macro forms of system executables SHOULD NOT be used.
  1594. For example, `+rm+` should be used in preference to `+%{__rm}+`.
  1595. However, in some cases needed data are simply not provided
  1596. under names which are not prefixed with underscores.
  1597. If that is the case, the macro named with leading underscores MAY be used.
  1598. Authors of macro packages are encouraged
  1599. to avoid using leading underscores
  1600. when naming macros which are intended to be used in specfiles
  1601. (as opposed to being set).
  1602. Having macros in a Source: or Patch: line is a matter of style.
  1603. Some people enjoy the ready readability of a source line without macros.
  1604. Others prefer the ease of updating for new versions when macros are used.
  1605. In all cases, remember to be consistent in your spec file
  1606. and verify that the URLs you list are valid.
  1607. spectool (from the rpmdevtools package)
  1608. can aid you in checking that whether the URL contains macros or not.
  1609. If you need to determine the actual string when it contains macros,
  1610. you can use rpm.
  1611. For example, to determine the actual Source: value, you can run:
  1612. ....
  1613. rpm -q --specfile foo.spec --qf "$(grep -i ^Source foo.spec)\n"
  1614. ....
  1615. === `+%autosetup+`
  1616. As an alternative to the usual `+%setup+` macro,
  1617. the `+%autosetup+` can be used.
  1618. In addition to the normal %setup tasks,
  1619. it will apply all defined Patch# items in the spec automatically.
  1620. It is also capable of handling VCS formatted patch files,
  1621. but this will require additional BuildRequires,
  1622. and assumes that _all_ patch files in the spec are formatted
  1623. for that single VCS type.
  1624. For this reason, it is not recommended that you specify a VCS
  1625. with `+%autosetup+`.
  1626. For more details on proper use of `+%autosetup+`,
  1627. refer to the
  1628. https://rpm-software-management.github.io/rpm/manual/autosetup.html[RPM documentation].
  1629. === Using `+%{buildroot}+` and `+%{optflags}+` vs `+$RPM_BUILD_ROOT+` and `+$RPM_OPT_FLAGS+`
  1630. There are two styles of defining the rpm Build Root and Optimization Flags
  1631. in a spec file:
  1632. |==========================================
  1633. | |macro style |variable style
  1634. |Build Root |%\{buildroot} |$RPM_BUILD_ROOT
  1635. |Opt. Flags |%\{optflags} |$RPM_OPT_FLAGS
  1636. |==========================================
  1637. There is very little value in choosing one style over the other,
  1638. since they will resolve to the same values in all scenarios.
  1639. You should pick a style and use it consistently throughout your packaging.
  1640. Mixing the two styles, while valid,
  1641. is bad from a QA and usability point of view,
  1642. and should not be done in Fedora packages.
  1643. === Why the `+%makeinstall+` Macro Should Not Be Used
  1644. Fedora's RPM includes a `+%makeinstall+` macro
  1645. but it must *NOT* be used when make install DESTDIR=%\{buildroot} works.
  1646. %makeinstall is a kludge that can work with Makefiles
  1647. that don't make use of the DESTDIR variable
  1648. but it has the following potential issues:
  1649. * `+%makeinstall+` overrides a set of Make variables during "make install"
  1650. and prepends the %\{buildroot} path,
  1651. i.e. it performs
  1652. make prefix="%\{buildroot}%\{_prefix}" libdir="%\{buildroot}%\{_libdir} ...".
  1653. * It is error-prone and can have unexpected effects
  1654. when run against less than perfect Makefiles,
  1655. e.g., the buildroot path may be included in installed files
  1656. where variables are substituted at install-time.
  1657. * It can trigger unnecessary and wrong rebuilds when executing "make install",
  1658. since the Make variables have different values compared with the %build section.
  1659. * If a package contains libtool archives,
  1660. it can cause broken *.la files to be installed.
  1661. Instead, Fedora packages should use: `+%make_install+` (Note the "_" !),
  1662. `+make DESTDIR=%{buildroot} install+`
  1663. or `+make DESTDIR=$RPM_BUILD_ROOT install+`.
  1664. Those all do the same thing.
  1665. === Source RPM Buildtime Macros
  1666. All macros in `+Summary:+` and `+%description+`
  1667. need to be expandable at srpm buildtime.
  1668. Because SRPMs are built without the package's BuildRequires installed,
  1669. depending on macros defined outside of the spec file
  1670. can easily lead to the unexpanded macros showing up in the built SRPM.
  1671. One way to check is to create a minimal chroot and build the srpm:
  1672. ....
  1673. mock --init
  1674. mock --copyin [SRPM] /
  1675. mock --shell bash
  1676. rpm -ivh [SRPM]
  1677. cd /builddir/build/SPECS
  1678. rpmbuild -bs --nodeps [SRPM]
  1679. rpm -qpiv /builddir/build/SRPMS/[SRPM]
  1680. ....
  1681. Check the `+rpm+` output for unexpanded macros (`+%{foo}+`)
  1682. or missing information (when`+%{?foo}+` is expanded to the empty string).
  1683. Even easier is to simply avoid macros in `+Summary:+` and `+%description+`
  1684. unless they are defined in the current spec file.
  1685. === Improper Use of `+%_sourcedir+`
  1686. Packages which use files itemized as Source# files,
  1687. must refer to those files by their `+Source#+` macro name,
  1688. and must not use `+$RPM_SOURCE_DIR+` or `+%{sourcedir}+`
  1689. to refer to those files.
  1690. See xref:RPM_Source_Dir.adoc[Packaging:RPM_Source_Dir] for full details.
  1691. === Software Collection Macros
  1692. {scl-guidelines} are to be kept to separate packages from mainstream packages
  1693. similar to how xref:MinGW.adoc[MingW packages] are managed.
  1694. In the past, SCL macros were allowed to be present
  1695. inside of mainstream packages if they were not used.
  1696. Since we're now building SCLs, we are now enforcing a strict separation.
  1697. Packages *MUST* be updated to restrict SCL macros
  1698. to only those packages particularly approved as part of an SCL.
  1699. === Packaging of Additional RPM Macros
  1700. Additional RPM macros must be stored in %\{_rpmmacrodir}.
  1701. They must be named using the syntax "macros.$PACKAGE" (e.g. macros.perl).
  1702. Normally, these files are packaged in the -devel subpackage,
  1703. since they are usually only needed for building other packages.
  1704. However, in some situations, this is not always ideal
  1705. and packagers are encouraged to use their best judgment
  1706. when determining the proper package for these files.
  1707. RPM macro files MUST NOT be marked as `+%config+`.
  1708. == Scripting Inside of Specfiles
  1709. Sometimes it is necessary to write a short script (perhaps a one-liner)
  1710. that is executed in the
  1711. `+%prep+`, `+%build+`, or `+%install+` sections of a spec file
  1712. to get some information about the build environment.
  1713. In order to simplify the dependency graph,
  1714. spec files should only use the following languages for this purpose:
  1715. * Python
  1716. * Perl
  1717. * Standard programs used in shell programing, for instance gawk or sed
  1718. * Lua (as supported by the native lua interpreter in rpm)
  1719. Additionally,
  1720. if your package cannot build without a specific scripting language
  1721. (such as Ruby, or Tcl),
  1722. and therefore already has a BuildRequires on that language,
  1723. it may also be called from the spec file.
  1724. Note: If you call Perl or Python in your spec file
  1725. (and it is not already a BuildRequires for the package),
  1726. you need to explicitly add a BuildRequires for Perl or Python.
  1727. == `+%global+` Preferred Over `+%define+`
  1728. Use `+%global+` instead of `+%define+`,
  1729. unless you really need only locally defined submacros
  1730. within other macro definitions (a very rare case).
  1731. Rationale: The two macro defining statements behave the same
  1732. when they are at the top level of rpm's nesting level.
  1733. But when they are used in nested macro expansions
  1734. (like in `+%{!?foo: ... }+` constructs,
  1735. `+%define+` theoretically only lasts until the end brace (local scope),
  1736. while `+%global+` definitions have global scope.
  1737. Note that %define and %global differ in more ways than just scope:
  1738. the body of a %define'd macro is lazily expanded (i.e., when used),
  1739. but the body of %global is expanded at definition time.
  1740. It's possible to use %%-escaping to force lazy expansion of %global.
  1741. [#handling_locale_files]
  1742. == Handling Locale Files
  1743. Translation files may be handled by different programs
  1744. for different frameworks.
  1745. Make sure you add BuildRequires: for the correct package
  1746. or else your package could fail to generate translation files in the buildroot.
  1747. If the package uses gettext for translations, add
  1748. [source, rpm-spec]
  1749. ----
  1750. BuildRequires: gettext
  1751. ----
  1752. For Qt-based packages that use the Linguist tool chain,
  1753. for the localization utilities add
  1754. [source, rpm-spec]
  1755. ----
  1756. BuildRequires: qt-devel
  1757. ----
  1758. If you have few enough locale files that they can all go into one package,
  1759. you can use the `+%find_lang+` macro.
  1760. (If you need to split your package into separate language packs,
  1761. please see xref:Langpacks.adoc[the langpack guidelines].)
  1762. This macro will locate all of the them belonging to your package (by name),
  1763. and put this list in a file.
  1764. You can then use that file to include all of the locales.
  1765. `+%find_lang+` should be run in the %install section of your spec file,
  1766. after all of the files have been installed into the buildroot.
  1767. The correct syntax for `+%find_lang+` is usually:
  1768. [source, rpm-spec]
  1769. ----
  1770. %find_lang %{name}
  1771. ----
  1772. In some cases, the application may use a different "name" for its locales.
  1773. You may have to look at the locale files and see what they are named.
  1774. If they are named `+myapp.mo+`,
  1775. then you will need to pass `+myapp+` to `+%find_lang+` instead of `+%{name}+`.
  1776. After `+%find_lang+` is run,
  1777. it will generate a file in the active directory
  1778. (by default, the top level of the source dir).
  1779. This file will be named based on what you passed as the option
  1780. to the `+%find_lang+` macro.
  1781. Usually, it will be named `+%{name}.lang+`.
  1782. You should then use this file in the `+%files+` list
  1783. to include the locales detected by `+%find_lang+`.
  1784. To do this, you should include it with the -f parameter to `+%files+`.
  1785. [source, rpm-spec]
  1786. ----
  1787. %files -f %{name}.lang
  1788. %{_bindir}/foobar
  1789. ...
  1790. ----
  1791. Note that `+%find_lang+` by default searches for gettext locales,
  1792. but it can also handle Qt translations, localised manpages and help files.
  1793. To process GNOME help files put into `+/usr/share/gnome/help/+` use
  1794. [source, rpm-spec]
  1795. ----
  1796. %find_lang %{name} --with-gnome
  1797. ----
  1798. To process KDE help files put into `+/usr/share/doc/HTML/+` use
  1799. [source, rpm-spec]
  1800. ----
  1801. %find_lang %{name} --with-kde
  1802. ----
  1803. To process Qt's `+.qm+` binary translation files use
  1804. [source, rpm-spec]
  1805. ----
  1806. %find_lang %{name} --with-qt
  1807. ----
  1808. To process localised manpages
  1809. (doesn't include the default, non-localised one), use
  1810. [source, rpm-spec]
  1811. ----
  1812. %find_lang %{name} --with-man
  1813. ----
  1814. To see all the options, run `+/usr/lib/rpm/find-lang.sh+` in the terminal.
  1815. Names different from `+%{name}+` (e.g. multiple manpages)
  1816. must be handled via separate calls to `+%find_lang+`.
  1817. Here is an example of proper usage of `+%find_lang+`,
  1818. in `+foo.spec+` with the "foo" application localised
  1819. using gettext and man pages named "bar" instead of "foo":
  1820. [source, rpm-spec]
  1821. ----
  1822. Name: foo
  1823. ...
  1824. %prep
  1825. %setup -q
  1826. %build
  1827. %configure --with-cheese
  1828. make %{?_smp_mflags}
  1829. %install
  1830. make DESTDIR=%{buildroot} install
  1831. %find_lang %{name}
  1832. %find_lang bar --with-man
  1833. %files -f %{name}.lang -f bar.lang
  1834. %license LICENSE
  1835. %doc README
  1836. %{_bindir}/%{name}
  1837. %{_mandir}/man1/bar.1*
  1838. %changelog
  1839. * Fri Jan 13 2012 Karel Volny <kvolny@redhat.com> 0.1-2
  1840. - add man pages example
  1841. * Thu May 4 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.1-1
  1842. - sample spec that uses %%find_lang
  1843. ----
  1844. === Why do we need to use %find_lang?
  1845. Using `+%find_lang+` helps keep the spec file simple,
  1846. and helps avoid several other packaging mistakes.
  1847. * Packages that use `+%{_datadir}/*+` to grab all the locale files in one line
  1848. also grab ownership of the locale directories, which is not permitted.
  1849. * Most packages that have locales have lots of locales.
  1850. Using `+%find_lang+` is much easier in the spec file than having to do:
  1851. [source, rpm-spec]
  1852. ----
  1853. %{_datadir}/locale/ar/LC_MESSAGES/%{name}.mo
  1854. %{_datadir}/locale/be/LC_MESSAGES/%{name}.mo
  1855. %{_datadir}/locale/cs/LC_MESSAGES/%{name}.mo
  1856. %{_datadir}/locale/de/LC_MESSAGES/%{name}.mo
  1857. %{_datadir}/locale/es/LC_MESSAGES/%{name}.mo
  1858. ...
  1859. ----
  1860. * As new locale files appear in later package revisions,
  1861. `+%find_lang+` will automatically include them when it is run,
  1862. preventing you from having to update the spec any more than is necessary.
  1863. Keep in mind that usage of `+%find_lang+`
  1864. in packages containing locales is a MUST
  1865. unless the locale files are broken out into langpacks.
  1866. In which case, you should follow xref:Langpacks.adoc[the langpack guidelines].
  1867. == Log Files
  1868. Packages which generate log files should write out their logfiles
  1869. in a package-specific (and package owned) directory
  1870. under %\{_localstatedir}/log.
  1871. Unless the software being packaged rotates its own logs,
  1872. it must also ship a logrotate config file to rotate its log file(s).
  1873. === `+logrotate+` Config File
  1874. Logrotate config files should be named in a way that matches
  1875. the daemon/software which is generating the logs,
  1876. which is usually (though not always) the same name as the package.
  1877. When unsure, use "%\{name}.conf".
  1878. These files must be placed in %\{_sysconfdir}/logrotate.d,
  1879. and should use standard file permissions (0644) and ownership (root:root).
  1880. Since these are config files,
  1881. they must be marked as %config(noreplace) in the %files list.
  1882. ==== Example Minimal `+logrotate+` Config File
  1883. ....
  1884. /var/log/example/*log {
  1885. missingok # If the log file is missing, go on to the next one without issuing an error message
  1886. notifempty # Don't do any rotation if the logfile is empty
  1887. compress # Compress older files with gzip
  1888. delaycompress # Don't compress yesterdays files
  1889. }
  1890. ....
  1891. == Timestamps
  1892. When adding file copying commands in the spec file,
  1893. consider using a command that preserves the files' timestamps,
  1894. e.g., `+cp -p+` or `+install -p+`.
  1895. When downloading sources, patches etc.,
  1896. consider using a client that preserves the upstream timestamps.
  1897. For example `+wget -N+` or `+curl -R+`.
  1898. To make the change global for wget,
  1899. add this to your `+~/.wgetrc+`: `+timestamping = on+`,
  1900. and for curl, add to your `+~/.curlrc+`: `+-R+`.
  1901. == Parallel Make
  1902. Whenever possible, invocations of `+make+` should be done as
  1903. [source, rpm-spec]
  1904. ----
  1905. %make_build
  1906. ----
  1907. This generally speeds up builds and especially on SMP machines.
  1908. Do make sure, however, that the package builds cleanly this way
  1909. as some make files do not support parallel building.
  1910. Therefore you should consider adding
  1911. [source, rpm-spec]
  1912. ----
  1913. %_smp_mflags -j3
  1914. ----
  1915. to your `+~/.rpmmacros+` file -- even on UP machines --
  1916. as this will expose most of these errors.
  1917. == Scriptlets
  1918. Great care should be taken when using scriptlets in Fedora packages.
  1919. If scriptlets are used, those scriptlets must be sane.
  1920. Some common scriptlets are documented xref:Scriptlets.adoc[here].
  1921. === Scriplets are only allowed to write in certain directories
  1922. Build scripts of packages
  1923. (%prep, %build, %install, %check and %clean)
  1924. may only alter files (create, modify, delete) under
  1925. %\{buildroot}, %\{_builddir}
  1926. and valid temporary locations like /tmp, /var/tmp
  1927. (or $TMPDIR or %\{_tmppath} as set by the rpmbuild process)
  1928. according to the following matrix
  1929. [cols=",,,",]
  1930. |=============================================================================
  1931. | |/tmp, /var/tmp, $TMPDIR, %\{_tmppath} |%\{_builddir} |%\{buildroot}
  1932. |%prep |yes |yes |no
  1933. |%build |yes |yes |no
  1934. |%install |yes |yes |yes
  1935. |%check |yes |yes |no
  1936. |%clean |yes |yes |yes
  1937. |=============================================================================
  1938. Further clarification: That should hold true irrespective of the builder's uid.
  1939. == Build Packages with Separate User Accounts
  1940. When building software,
  1941. which you have not conducted a full security-audit on,
  1942. protect sensitive data, such as your GPG private key,
  1943. in a separate user account.
  1944. The same applies to reviewers/testers.
  1945. Rebuild src.rpms in a separate account
  1946. which does not have access to any sensitive data.
  1947. == Relocatable Packages
  1948. The use of RPM's facility for generating relocatable packages
  1949. is strongly discouraged.
  1950. It is difficult to make work properly,
  1951. impossible to use from the installer or from yum,
  1952. and not generally necessary if other packaging guidelines are followed.
  1953. However, in the unlikely event that you have a good reason
  1954. to make a package relocatable,
  1955. you MUST state this intent and reasoning in the request for package review.
  1956. == File and Directory Ownership
  1957. Your package should own all of the files
  1958. that are installed as part of the %install process.
  1959. In most cases,
  1960. it should not be necessary for multiple packages
  1961. to contain identical copies of the same file.
  1962. However, if it is necessary,
  1963. multiple packages may contain identical copies of the same file,
  1964. as long as the following requirements are met:
  1965. * The packages sharing ownership of the identical files
  1966. are built from a single SRPM.
  1967. OR
  1968. * The packages sharing ownership of the identical files
  1969. are not in a dependency chain
  1970. (e.g. if package A requires package B,
  1971. they should not both contain identical files,
  1972. either A or B must own the common files, but not both.)
  1973. In addition,
  1974. identical files are defined as files which are always identical in
  1975. content, checksum, permissions, and location on the filesystem
  1976. in each package.
  1977. One notable type of file that is often shared identically between subpackages
  1978. is the license text.
  1979. There are certain situations where it is required to duplicate the license text
  1980. across multiple %files section within a package.
  1981. For more details, please refer to
  1982. xref:LicensingGuidelines.adoc#subpackage-licensing[Subpackage Licensing].
  1983. Directory ownership is a little more complex than file ownership.
  1984. Packages must own all directories they put files in, except for:
  1985. * any directories owned by the `+filesystem+`, `+man+`,
  1986. or other explicitly created `+-filesystem+` packages
  1987. * any directories owned by other packages
  1988. in your package's natural dependency chain
  1989. In this context, a package's "natural dependency chain" is defined
  1990. as the set of packages necessary for that package to function normally.
  1991. To be specific, you do not need to require a package for the sole fact
  1992. that it happens to own a directory that your package places files in.
  1993. If your package already requires that package for other reasons,
  1994. then your package should not also own that directory.
  1995. In all cases we are guarding against unowned directories
  1996. being present on a system.
  1997. Please see xref:UnownedDirectories.adoc[Packaging:UnownedDirectories]
  1998. for the details.
  1999. IMPORTANT: When co-owning directories,
  2000. you *must* ensure that the ownership and permissions
  2001. on the directory match in all packages that own it.
  2002. Here are examples that describe how to handle most cases
  2003. of directory ownership.
  2004. === The directory is wholly contained in your package, or involves core functionality of your package
  2005. An example:
  2006. ....
  2007. gnucash places many files under the /usr/share/gnucash directory
  2008. ....
  2009. Solution: the `+gnucash+` package should own
  2010. the `+/usr/share/gnucash+` directory
  2011. === The directory is also owned by a package implementing required functionality of your package
  2012. An example:
  2013. ....
  2014. pam owns the /etc/pam.d directory
  2015. gdm places files into /etc/pam.d
  2016. gdm depends on pam to function normally, and would Require: pam (either implicitly or explicitly) separate from the directory ownership.
  2017. ....
  2018. Solution: the `+pam+` package should own the `+/etc/pam.d+` directory,
  2019. and `+gdm+` should `+Require:+` the `+pam+` package.
  2020. === The directory is owned by a package which is not required for your package to function
  2021. Some packages create and own directories
  2022. with the intention of permitting other packages to store appropriate files,
  2023. but those other packages do not need that original package
  2024. to be present to function properly.
  2025. An example:
  2026. ....
  2027. gtk-doc owns the /usr/share/gtk-doc/ directory
  2028. evolution puts files into /usr/share/gtk-doc/
  2029. evolution does not need gtk-doc in order to function properly.
  2030. Nothing in evolution's dependency chain owns /usr/share/gtk-doc/
  2031. ....
  2032. Solution: the `+evolution+` package should own the
  2033. `+/usr/share/gtk-doc+` directory.
  2034. There is no need to add an explicit Requires on gtk-doc
  2035. solely for the directory ownership.
  2036. Sometimes, it may be preferable for such directories to be owned
  2037. by an "artificial filesystem" package, such as `+mozilla-filesystem+`.
  2038. These packages are designed to be explicitly required
  2039. when other packages store files in their directories,
  2040. thus, in such situations,
  2041. these packages should explicitly Require the artificial filesystem package
  2042. and not multiply own those directories.
  2043. Packagers should consider the number of
  2044. affected directories and packages
  2045. when determining whether to create artificial filesystem packages,
  2046. and use their own best judgement to determine if this is necessary or not.
  2047. TIP: *Rule of Thumb*: When determining whether this exception applies,
  2048. packagers and reviewers should ask this question:
  2049. Do the files in this common directory enhance
  2050. or add functionality to another package,
  2051. where that other package is not necessary to be present
  2052. for the primary functionality of this package?
  2053. === The package you depend on to provide a directory may choose to own a different directory in a later version and your package will run unmodified with that later version
  2054. An example involving Perl modules:
  2055. Assume `+perl-A-B+` depends on `+perl-A+`
  2056. and installs files into
  2057. /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/A/B.
  2058. The base Perl package guarantees that it will own
  2059. /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
  2060. for as long as it remains compatible with version 5.8.8,
  2061. but a future upgrade of the `+perl-A+` package may install into
  2062. (and thus own)
  2063. /usr/lib/perl5/vendor_perl/5.9.0/i386-linux-thread-multi/A.
  2064. So the `+perl-A-B+` package needs to own
  2065. /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/A
  2066. as well as /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/A/B
  2067. in order to maintain proper ownership.
  2068. === File Permissions
  2069. Permissions on files MUST be set properly.
  2070. Inside of /usr, files should be owned by root:root
  2071. unless a more specific user or group is needed for security.
  2072. They MUST be universally readable (and executable if appropriate).
  2073. Outside of /usr, non-config and non-state files SHOULD be owned by root:root,
  2074. universally readable (and executable if appropriate)
  2075. unless circumstances require otherwise.
  2076. The default file mode is 0644 or 0755.
  2077. Directories should be mode 0755.
  2078. Most well behaved build scripts and rpm will use these defaults.
  2079. If the directory needs to be group writable,
  2080. it SHOULD also have the setgid bit set
  2081. so that files written there are owned by that group.
  2082. These directories SHOULD have mode 2775.
  2083. The %defattr directive in the %files list
  2084. SHOULD ONLY be used when setting a non-default value,
  2085. or to reset to the default value after having set a non-default value.
  2086. === Explicit lists
  2087. Packagers *SHOULD NOT* simply glob everything under a shared directory.
  2088. In particular, the following *SHOULD NOT* be used in `+%files+`:
  2089. * `+%{_bindir}/*+`
  2090. * `+%{_datadir}/*+`
  2091. * `+%{_includedir}/*+`
  2092. * `+%{_mandir}/*+`
  2093. * `+%{_docdir}/*+`
  2094. This rule serves as a check against common mistakes
  2095. which are otherwise hard to detect.
  2096. It does limit some possibilities for automation.
  2097. The most common mistake this rule prevents is upstream adding new commands in `+%{_bindir}/*+`.
  2098. You should always check such changes for
  2099. https://docs.fedoraproject.org/en-US/packaging-guidelines/Conflicts/#_common_conflicting_files_cases_and_solutions[conflicts],
  2100. and keep the list of such files explicit and auditable.
  2101. == Users and Groups
  2102. Some packages require or benefit from
  2103. dedicated runtime user and/or group accounts.
  2104. Guidelines for handling these cases are in a
  2105. xref:UsersAndGroups.adoc[separate document].
  2106. Note that system services packaged for Fedora
  2107. MUST NOT run as the `+nobody+` user,
  2108. but MUST instead allocate their own system user.
  2109. == Web Applications
  2110. Web applications packaged in Fedora should put their content into
  2111. /usr/share/%\{name} and NOT into /var/www/.
  2112. This is done because:
  2113. * /var is supposed to contain variable data files and logs.
  2114. /usr/share is much more appropriate for this.
  2115. * Many users already have content in /var/www,
  2116. and we do not want any Fedora package to step on top of that.
  2117. * /var/www is no longer specified by the Filesystem Hierarchy Standard
  2118. == Conflicts
  2119. Whenever possible, Fedora packages should avoid conflicting with each other.
  2120. Unfortunately, this is not always possible.
  2121. For full details on Fedora's Conflicts policy, see:
  2122. xref:Conflicts.adoc[Conflicts].
  2123. Tools such as Alternatives and Environment Modules
  2124. can also help prevent package conflicts.
  2125. === Alternatives
  2126. The "alternatives" tool provides a means for parallel installation of packages
  2127. which provide the same functionality by maintaining sets of symlinks.
  2128. For full details on how to properly use alternatives,
  2129. see xref:Alternatives.adoc[Alternatives].
  2130. === Environment Modules
  2131. When there are multiple variants that each serve the needs of some user
  2132. and thus must be available simultaneously by users,
  2133. the alternatives system simply isn't enough since it is system-wide.
  2134. In such situations, use of Environment Modules can avoid conflicts.
  2135. For full details on how to properly use Environment Modules,
  2136. see xref:EnvironmentModules.adoc[Environment Modules].
  2137. == Patch Guidelines
  2138. === All patches should have an upstream bug link or comment
  2139. All patches in Fedora spec files *SHOULD* have a comment above them
  2140. about their upstream status.
  2141. Any time you create a patch,
  2142. it is best practice to file it in an upstream bug tracker,
  2143. and include a link to that in the comment above the patch.
  2144. For example:
  2145. [source, rpm-spec]
  2146. ----
  2147. # https://bugzilla.gnome.org/show_bug.cgi?id=12345
  2148. Patch: gnome-panel-fix-frobnicator.patch
  2149. ----
  2150. The above is perfectly acceptable;
  2151. but if you prefer,
  2152. a brief comment about what the patch does above can be helpful:
  2153. [source, rpm-spec]
  2154. ----
  2155. # Don't crash with frobnicator applet
  2156. # https://bugzilla.gnome.org/show_bug.cgi?id=12345
  2157. Patch: gnome-panel-fix-frobnicator.patch
  2158. ----
  2159. Sending patches upstream and adding this comment
  2160. will help ensure that Fedora is acting as a good FLOSS citizen
  2161. (https://docs.fedoraproject.org/en-US/package-maintainers/Staying_Close_to_Upstream_Projects/[Staying Close to Upstream Projects]).
  2162. It will help others (and even you) down the line in package maintenance
  2163. by knowing what patches are likely to appear in a new upstream release.
  2164. ==== If upstream doesn't have a bug tracker
  2165. You can indicate that you have sent the patch upstream and any known status:
  2166. [source, rpm-spec]
  2167. ----
  2168. # Sent upstream via email 20080407
  2169. Patch: foobar-fix-the-bar.patch
  2170. ----
  2171. [source, rpm-spec]
  2172. ----
  2173. # Upstream has applied this in SVN trunk
  2174. Patch: foobar-fix-the-baz.patch
  2175. ----
  2176. ==== Fedora-specific (or rejected upstream) patches
  2177. It may be that some patches truly are Fedora-specific; in that case, say so:
  2178. [source, rpm-spec]
  2179. ----
  2180. # This patch is temporary until we land the long term System.loadLibrary fix in OpenJDK
  2181. Patch: jna-jni-path.patch
  2182. ----
  2183. === Applying Patches
  2184. Normally, patches to a package SHOULD be listed in `+PatchN:+` tags
  2185. in the RPM spec file and applied using the %patch or %autosetup macros.
  2186. The files MUST then be checked into the Fedora Package revision control system
  2187. (currently the git repos on pkgs.fedoraproject.org
  2188. and commonly accessed via fedpkg).
  2189. Storing the files in this way allows people to use standard tools
  2190. to visualize the changes between revisions of the files
  2191. and track additions and removals
  2192. without a layer of indirection (as putting them into lookaside would do).
  2193. Applying patches directly from RPM_SOURCE_DIR IS NOT ALLOWED.
  2194. Please see
  2195. xref:RPM_Source_Dir.adoc[Packaging:RPM_Source_Dir] for the complete rationale.
  2196. The maintainer MAY deviate from this rule
  2197. when the upstream of the package provides an extremely large patch
  2198. or a tarball of patches against a base release.
  2199. In this case the tarball of patches MAY be listed as a `+SourceN:+` line
  2200. and the patches would be applied by untarring the archive
  2201. and then applying the distributed patch(es)
  2202. using the regular /usr/bin/patch command.
  2203. Additional patches to the package
  2204. (for instance, generated by the Fedora maintainer to fix bugs)
  2205. MUST still be listed in `+PatchN:+` lines
  2206. and be applied by %patch macros
  2207. after the patches from the tarball were applied.
  2208. Maintainers and reviewers should be cautious when exercising this exception
  2209. as shipping an update as a patchset
  2210. may be a sign that the patchset is not from the actual upstream
  2211. or that the patches should be reviewed for correctness
  2212. rather than simply accepted as the upstream code base.
  2213. == Use of Epochs
  2214. RPM supports a field called "Epoch:",
  2215. which is a numeric field, that, if set,
  2216. adds another qualifier for RPM to use in doing package comparisons.
  2217. Specifically, if set, the Epoch of a package trumps all other comparisons
  2218. (except for a larger Epoch).
  2219. If Epoch is not set in a package,
  2220. RPM treats it the same as if it was set to 0.
  2221. Example:
  2222. [source, rpm-spec]
  2223. ----
  2224. Version: 1.2
  2225. Release: 3%{?dist}
  2226. Epoch: 1
  2227. ----
  2228. A package with those definitions would be considered greater than
  2229. a package with a higher version or a higher release.
  2230. Since Epoch is confusing to humans
  2231. (and can never be removed from a package once used),
  2232. it should only be used in Fedora *as a last resort*
  2233. to resolve upgrade ordering of a package,
  2234. and should be avoided wherever possible.
  2235. Also, Epoch complicates normal packaging guidelines.
  2236. If a package uses an Epoch,
  2237. it must be referred to in any place where `+%{version}-%{release}+` is used.
  2238. For example, if a package being depended upon has an Epoch,
  2239. this must be listed when adding a versioned dependency:
  2240. [source, rpm-spec]
  2241. ----
  2242. Requires: foo = %{epoch}:%{version}-%{release}
  2243. ----
  2244. === Epochs from Third Party Repositories
  2245. If a package to be imported is or previously was present
  2246. in a publicly accessible repository,
  2247. the packager can optionally include an Epoch tag
  2248. equal to that of the most recent version of the third-party package.
  2249. == Symlinks
  2250. There are two ways of making a symlink,
  2251. either as a relative link or an absolute link.
  2252. In Fedora, neither method is required.
  2253. Packagers should use their best judgement
  2254. when deciding which method of symlink creation is appropriate.
  2255. === Relative Symlinks
  2256. A relative symlink is a symlink which points to a file or directory
  2257. relative to the position of the symlink.
  2258. For example, this command would create a relative symlink:
  2259. ....
  2260. ln -s ../..%{_bindir}/foo %{buildroot}%{_bindir}/bar
  2261. ....
  2262. Pros:
  2263. * Relative symlinks will point to the same file inside or outside of a chroot.
  2264. Cons:
  2265. * Much more complicated to create than absolute symlinks
  2266. * Relative symlinks may break or behave unexpectedly
  2267. when a part of a filesystem is mounted to a custom location.
  2268. * Relative symlinks may break when bind mounting or symlinking directories.
  2269. * Relative symlinks may make it more difficult to use rpm system macros.
  2270. === Absolute Symlinks
  2271. An absolute symlink is a symlink which points to an absolute file
  2272. or directory path.
  2273. For example, this command would create an absolute symlink:
  2274. ....
  2275. ln -s %{_bindir}/foo %{buildroot}%{_bindir}/bar
  2276. ....
  2277. Pros:
  2278. * Much easier to create than relative symlinks.
  2279. * Absolute symlinks work properly when bind mounting or symlinking directories.
  2280. * Absolute symlinks work well with rpm system macros.
  2281. Cons:
  2282. * Absolute symlinks may break when used with chroots.
  2283. == Replacing a Symlink to a Directory or a Directory to Any Type File
  2284. In some cases replacing a symlink to a directory requires special handling.
  2285. Replacing a directory with any type of file always requires special handling.
  2286. See xref:Directory_Replacement.adoc[Packaging:Directory_Replacement]
  2287. for information about doing this.
  2288. == Test Suites
  2289. If the source code of the package provides a test suite,
  2290. it should be executed in the `+%check+` section,
  2291. whenever it is practical to do so.
  2292. == binfmt.d, sysctl.d and tmpfiles.d
  2293. If you install a sysctl configuration snippet foobar.conf
  2294. into %\{_sysctldir} (/usr/lib/sysctl.d/)
  2295. you must invoke %sysctl_apply in your %post section:
  2296. [source, rpm-spec]
  2297. ----
  2298. %sysctl_apply foobar.conf
  2299. ----
  2300. If you install a binfmt configuration snippet waldo.conf
  2301. into %\{_binfmtdir} (/usr/lib/binfmt.d/)
  2302. you must invoke %binfmt_apply in your %post section:
  2303. [source, rpm-spec]
  2304. ----
  2305. %binfmt_apply waldo.conf
  2306. ----
  2307. These have the effect of making the appropriate changes
  2308. immediately upon package installation
  2309. instead of requiring a reboot or manual activation.
  2310. There are specific guidelines for handling tmpfiles.d
  2311. configurations and directories
  2312. (in /run and /run/lock): xref:Tmpfiles.d.adoc[Tmpfiles.d].
  2313. [#renaming-or-replacing-existing-packages]
  2314. == Renaming/Replacing or Removing Existing Packages
  2315. NOTE: https://docs.fedoraproject.org/en-US/package-maintainers/Package_Renaming_Process/[Package Renaming Process]
  2316. should be followed when renaming an existing package.
  2317. In the event that it becomes necessary to rename or replace an existing package,
  2318. the new package should make the change transparent to end users
  2319. to the extent applicable.
  2320. If a package is being renamed without any functional changes,
  2321. or is a compatible-enough replacement to an existing package
  2322. (where "enough" means that it includes only changes of magnitude
  2323. that are commonly found in version upgrade changes),
  2324. provide clean upgrade paths and compatibility with:
  2325. [source, rpm-spec]
  2326. ----
  2327. Provides: oldpackagename = $provEVR
  2328. Obsoletes: oldpackagename < $obsEVR
  2329. ----
  2330. $provEVR refers to an (Epoch-)Version-Release tuple
  2331. the original unchanged package would have had
  2332. if it had been version or release bumped.
  2333. You usually use macros here because the provides EVR should continue to go up
  2334. as the renamed package advances in version and release.
  2335. $obsEVR is an (Epoch-)Version-Release tuple
  2336. arranged so that there is a clean upgrade path
  2337. but without gratuitously polluting the version space upwards.
  2338. You usually do not use macros for this
  2339. as you're simply trying to advance beyond the last known release
  2340. under the old name.
  2341. If a package supersedes/replaces an existing package
  2342. without being a sufficiently compatible replacement as defined above,
  2343. use only the `+Obsoletes:+` line from the above example.
  2344. CAUTION: *Take `+%{?dist}+` into account*:
  2345. When deciding what $obsEVR should be,
  2346. remember that it needs to be higher than the previous `Release:`,
  2347. including the `+%{?dist}+` suffix.
  2348. Example: if the package previously had the release tag of `+-4.fcNN+`,
  2349. the release specified in $obsEVR should be at least 5.
  2350. NOTE: If the replaced package uses `rpmautospec`,
  2351. either look at the built package (e.g. in koji) to find the actual release tag of the latest build,
  2352. or use `+rpmautospec calculate-release+` to calculate just the release number.
  2353. If retired packages need to be removed from end user machines
  2354. because they cause dependency issues which interfere with upgrades
  2355. or are otherwise harmful,
  2356. a packager SHOULD request that `+Obsoletes:+` be added
  2357. to `+fedora-obsolete-packages+`.
  2358. Simply file a bugzilla ticket
  2359. https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=rawhide&component=fedora-obsolete-packages[here].
  2360. Please include information on which packages need to be obsoleted,
  2361. the exact versions which need to be obsoleted,
  2362. and the reasons why they cannot be allowed to remain installed.
  2363. If the obsoleted package had an Epoch set,
  2364. it must be preserved in both the `+Provides:+` and `+Obsoletes:+`.
  2365. For example, assume foo being renamed to bar,
  2366. bar is compatible with foo,
  2367. and the last foo package release being `+foo-1.0-3.fcNN+` with `+Epoch: 2+`.
  2368. The following should be added to bar
  2369. (and similarly for all subpackages as applicable):
  2370. [source, rpm-spec]
  2371. ----
  2372. Provides: foo = 2:%{version}-%{release}
  2373. # Important: We set the Obsoletes release to 4 to be higher than the last build of foo
  2374. Obsoletes: foo < 2:1.0-4
  2375. ----
  2376. Explicit `+Provides:+` need to be aware of whether
  2377. the package is supplying things that can be used in an arch-independent
  2378. or arch-specific fashion.
  2379. For packages that are not noarch,
  2380. `+Provides:+` should be made arch-specific
  2381. by applying the `+%{?_isa}+` macro to the end of the text string in Provides
  2382. (e.g. `+Provides: foo%{?_isa} = 2:%{version}-%{release}+`).
  2383. Packages that explicitly provide things that can be used
  2384. in an arch-independent way
  2385. (for example, those whose dependents don't need to be of the same arch)
  2386. need not apply this macro.
  2387. In some cases, a package will supply multiple elements,
  2388. some of which may be consumed only by dependents of an identical arch
  2389. and some which may be consumed by dependents of any arch.
  2390. In such cases, both arch-specific and arch-independent Provides: are warranted.
  2391. Examples of packages that should explicitly provide
  2392. only arch-specific `+Provides:+` include
  2393. native code libraries or plug-ins and their associated -devel packages.
  2394. Packages that should explicitly provide
  2395. only arch-independent `+Provides:+` include
  2396. most stand-alone programs
  2397. (in addition to all noarch packages).
  2398. Even though these programs may themselves be arch-specific,
  2399. clients that run them should not care about their arch in most cases.
  2400. A package that explicitly provides, for example,
  2401. both a native code library
  2402. as well as an interpreted language interface to that library
  2403. should have both arch-specific (for clients of the native code library)
  2404. and arch-independent (for clients of the interpreted language interface)
  2405. Provides:.
  2406. If there is no standard naming for a package
  2407. or other long term naming compatibility requirements involved with the rename,
  2408. the Provides should be assumed to be deprecated and short lived
  2409. and removed in the distro release after the next one
  2410. (i.e., if introduced in FC-X, keep in all subsequent package revisions
  2411. for distros FC-X and FC-(X+1),
  2412. drop in FC-(X+2)),
  2413. and the distro version where it is planned to be dropped
  2414. documented in a comment in the specfile.
  2415. Maintainers of affected packages should be notified
  2416. and encouraged to switch to use the new name.
  2417. Forward compatibility Provides: in older distro branches can be considered
  2418. in order to make it possible for package maintainers
  2419. to keep same simple specfiles between branches
  2420. but still switch to the newer name.
  2421. For packages that are not usually pulled in
  2422. by using the package name as the dependency
  2423. such as library only packages
  2424. (which are pulled in through library soname depenencies),
  2425. there's usually no need to add the Provides.
  2426. Note however that the -devel subpackages of lib packages
  2427. are pulled in as build dependencies using the package name,
  2428. so adding the Provides is often appropriate there.
  2429. == Deprecating Packages
  2430. A procedure exists for indicating that a package is deprecated
  2431. and may leave the distribution in the future.
  2432. See xref:deprecating-packages.adoc[Deprecating Packages].
  2433. == Networking Support
  2434. If an application contains native and stable support for both IPv4 and IPv6,
  2435. and support for IPv6 does not negatively affect IPv4 then both MUST be enabled
  2436. in the Fedora package.
  2437. == Cron Files
  2438. For details on how to package cron files, refer to:
  2439. xref:CronFiles.adoc[CronFiles].
  2440. == Security Updates to Resolve Known CVE Issues
  2441. If an update to your package resolves a known security concern
  2442. (at the time of the update)
  2443. with a Common Vulnerabilities and Exposures (CVE) number assigned to it,
  2444. you should mention the CVE number in the RPM changelog entry.
  2445. == Build Time Network Access
  2446. Packages in the Fedora buildsystem are built in a mock chroot
  2447. with no access to the internet.
  2448. Packages must not depend or or use any network resources
  2449. that they don't themselves create (i.e., for tests).
  2450. In no cases should source code be downloaded from any external sources,
  2451. only from the lookaside cache and/or the Fedora git repository.
  2452. [#bootstrapping]
  2453. == Bootstrapping
  2454. If your package introduces build time circular dependencies,
  2455. you should use this macro to bootstrap your package:
  2456. [source, rpm-spec]
  2457. ----
  2458. # When we are bootstrapping, we drop some dependencies, and/or build time tests.
  2459. %bcond_with bootstrap
  2460. [...]
  2461. %if %{without bootstrap}
  2462. # dependencies for %%check
  2463. BuildRequires: foo
  2464. %endif
  2465. [...]
  2466. %if %{without bootstrap}
  2467. %check
  2468. make check
  2469. %endif
  2470. ----
  2471. TIP: Since Fedora 30,
  2472. as a nice side-effect,
  2473. when bootstrapping mode is enabled,
  2474. the `+~bootstrap+` suffix is appended to the dist tag.
  2475. This avoids the need to bump release
  2476. between bootstrap and final build.
  2477. You can temporarily enable bootstrapping by commit,
  2478. which changes `+%bcond_with bootstrap+` to `+%bcond_without bootstrap+`
  2479. and later reverting the commit to do final build.
  2480. TIP: Since Fedora 31,
  2481. you can disable the automatic suffix addition
  2482. by specifying `+%global __bootstrap %{nil}+`
  2483. in your spec file.
  2484. If your package explicitly `+Provides:+` some functionality
  2485. that is missing when bootstrapped,
  2486. then that `+Provides:+` should look like:
  2487. [source, rpm-spec]
  2488. ----
  2489. %if %{without bootstrap}
  2490. Provides: bar(some_functionality)
  2491. %endif
  2492. ----
  2493. Please note that usage of pre-built binaries
  2494. in bootstrap still needs an exception from the Packaging Committee
  2495. as stated in <<General Exception Policy>>.
  2496. == System Cryptographic Policies
  2497. Applications which make use the SSL or TLS cryptographic protocols
  2498. MUST follow xref:CryptoPolicies.adoc[Crypto Policies].
  2499. == Shebang Lines
  2500. When packaging script files,
  2501. where the interpreter to be used is specified in the first line of the script
  2502. (the shebang line) following `+#!+`,
  2503. the following rules apply:
  2504. * `+env+`, `+/bin/env+` and `+/usr/bin/env+` MUST NOT be used.
  2505. The interpreter used to run packaged applications cannot depend upon
  2506. what the user has in their personal `+$PATH+`.
  2507. * Files which are not installed as executables SHOULD NOT have shebang lines.
  2508. * Language-specific guidelines may have additional restrictions.
  2509. Shebang lines for executable scripts are automatically modified
  2510. to convert calls to `+env+` into direct use of the proper executable
  2511. in `+/usr/bin+`.
  2512. Various checks are also applied to verify that the shebang lines are valid,
  2513. and the build process can fail as a result of these.
  2514. Finally, other language-specific modifications may also be made.
  2515. It is thus generally unnecessary to manually modify executable scripts
  2516. to fix `+env+` usage as long as this functionality is enabled.
  2517. If the automatic checks and modifications break a package,
  2518. there are two primary options:
  2519. * The packager can elect to fix the shebang lines manually
  2520. (using patches, scripting via sed, or other similar methods).
  2521. * The packager can remove the executable permission from the script
  2522. so that the checks and modifications are not made.
  2523. If (and only if) the script needs to remain executable
  2524. and cannot be modified to pass the checks,
  2525. then the maintainer MAY elect to disable the checks and modifications.
  2526. It is also possible to disable the functionality for specific paths
  2527. or for specific shebang lines by setting
  2528. `+%__brp_mangle_shebangs_exclude_from+`
  2529. and `+%__brp_mangle_shebangs_exclude+`,
  2530. respectively, using the same syntax as the settings described in
  2531. xref:AutoProvidesAndRequiresFiltering.adoc[Packaging:AutoProvidesAndRequiresFiltering].
  2532. It is also possible to disable the functionality entirely
  2533. by adding `+%undefine __brp_mangle_shebangs+`
  2534. near the beginning of the specfile.
  2535. == BRP (BuildRoot Policy) Scripts
  2536. BRP scripts are injected at the end of `+%install+`
  2537. (via the `+%__os_install_post+` macro)
  2538. and perform some automatic sanity checks of, or adjustments to,
  2539. files installed in the build root.
  2540. All packages SHOULD always be subject to all the BRP scripts,
  2541. but sometimes it is necessary for a package to opt-out of certain ones.
  2542. It is possible to disable any BRP script
  2543. simply by defining the corresponding variable to `+%{nil}+`.
  2544. For example, to disable the `+brp-python-bytecompile+` script:
  2545. [source, rpm-spec]
  2546. ----
  2547. # Turn off Python bytecode compilation because this is a Jython
  2548. # package and we will generate JVM bytecode instead
  2549. %global __brp_python_bytecompile %{nil}
  2550. ----
  2551. Any package that disables a BRP script this way MUST also note the reason
  2552. in an accompanying comment.
  2553. For a list of the BRP scripts run by default,
  2554. invoke:
  2555. sed -r -n '/^%.?__os_install_post/,/%.?nil/p' /usr/lib/rpm/redhat/macros
  2556. For a list of all BRP scripts,
  2557. invoke:
  2558. rpmbuild --eval '%dump' |& grep ': __brp_'
  2559. === Removal of common sources of build irreproducibility
  2560. One of the BRP scripts that is invoked by default is
  2561. `+%__os_install_post_build_reproducibility+`.
  2562. Its purpose is to normalize installed files
  2563. by removing unwanted embedded metadata that is dependent on the build environment
  2564. and may cause different builds from the same sources to be irreproducible.
  2565. See `/usr/lib/rpm/macros.d/macros.build-reproducibility`
  2566. for details about how it can be configured.
  2567. == Packaging for EPEL
  2568. For the most part, these guidelines
  2569. and the application-specific guidelines below
  2570. cover packaging for both Fedora and EPEL.
  2571. However, there are necessarily some differences.
  2572. When packaging for EPEL, please also consult
  2573. https://fedoraproject.org/wiki/EPEL:Packaging[the EPEL packaging guidelines]
  2574. for additional information.
  2575. == Domain Specific Guidelines
  2576. Some applications, languages and build systems
  2577. have specific guidelines written for them, located on their own pages:
  2578. * xref:Ada.adoc[Ada]
  2579. * xref:BLAS_LAPACK.adoc[BLAS/LAPACK]
  2580. * xref:C_and_C++.adoc[C and {cpp}]
  2581. * xref:CMake.adoc[CMake]
  2582. * xref:D.adoc[D]
  2583. * xref:Drupal7.adoc[Drupal7]
  2584. * xref:Emacs.adoc[Emacs]
  2585. * xref:FontsPolicy.adoc[Fonts]
  2586. * xref:Fortran.adoc[Fortran]
  2587. * xref:GAP.adoc[GAP]
  2588. * xref:Haskell.adoc[Haskell]
  2589. * xref:Java.adoc[Java]
  2590. * xref:JavaScript.adoc[JavaScript]
  2591. * xref:Langpacks.adoc[Language packs]
  2592. * xref:LibreOfficeExtensions.adoc[LibreOffice Extensions]
  2593. * xref:Lisp.adoc[Lisp]
  2594. * xref:Meson.adoc[Meson]
  2595. * xref:MinGW.adoc[MinGW]
  2596. * xref:Mono.adoc[Mono]
  2597. * xref:MPI.adoc[MPI]
  2598. * xref:Node.js.adoc[Node.js]
  2599. * xref:OCaml.adoc[OCaml]
  2600. * xref:Octave.adoc[Octave]
  2601. * xref:Perl.adoc[Perl]
  2602. * xref:PHP.adoc[PHP]
  2603. * xref:Python.adoc[Python]
  2604. * xref:R.adoc[R]
  2605. * xref:Ruby.adoc[Ruby]
  2606. * xref:Rust.adoc[Rust]
  2607. * xref:SugarActivityGuidelines.adoc[Sugar activities]
  2608. * xref:Tcl.adoc[Tcl/Tk extensions]
  2609. * xref:Web_Assets.adoc[Web Assets]
  2610. * xref:WordPress_plugin_packaging_guidelines.adoc[WordPress extensions]
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...