fpm Documentation

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.

11,513 stars Ruby Ruby 1 file ยท ~30,514 tokens #packaging
RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy fpm on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name fpm --restart always jordansissel/fpm:latest

Technical Documentation: jordansissel/fpm

โ„น๏ธ Provenance: Multi-Tier Ingestion ยท CodeWiki Reference

Changelog (`docs/changelog.rst`)

.. include:: changelog_links.rst
.. include:: ../CHANGELOG.rst


.. _#1006: https://github.com/jordansissel/fpm/issues/1006
.. _#1008: https://github.com/jordansissel/fpm/issues/1008
.. _#1012: https://github.com/jordansissel/fpm/issues/1012
.. _#1053: https://github.com/jordansissel/fpm/issues/1053
.. _#1054: https://github.com/jordansissel/fpm/issues/1054
.. _#1073: https://github.com/jordansissel/fpm/issues/1073
.. _#1090: https://github.com/jordansissel/fpm/issues/1090
.. _#1093: https://github.com/jordansissel/fpm/issues/1093
.. _#1101: https://github.com/jordansissel/fpm/issues/1101
.. _#1112: https://github.com/jordansissel/fpm/issues/1112
.. _#1113: https://github.com/jordansissel/fpm/issues/1113
.. _#1115: https://github.com/jordansissel/fpm/issues/1115
.. _#1119: https://github.com/jordansissel/fpm/issues/1119
.. _#1120: https://github.com/jordansissel/fpm/issues/1120
.. _#1123: https://github.com/jordansissel/fpm/issues/1123
.. _#1132: https://github.com/jordansissel/fpm/issues/1132
.. _#1134: https://github.com/jordansissel/fpm/issues/1134
.. _#1146: https://github.com/jordansissel/fpm/issues/1146
.. _#1147: https://github.com/jordansissel/fpm/issues/1147
.. _#1148: https://github.com/jordansissel/fpm/issues/1148
.. _#1191: https://github.com/jordansissel/fpm/issues/1191
.. _#1196: https://github.com/jordansissel/fpm/issues/1196
.. _#1202: https://github.com/jordansissel/fpm/issues/1202
.. _#1203: https://github.com/jordansissel/fpm/issues/1203
.. _#1206: https://github.com/jordansissel/fpm/issues/1206
.. _#1208: https://github.com/jordansissel/fpm/issues/1208
.. _#1210: https://github.com/jordansissel/fpm/issues/1210
.. _#1213: https://github.com/jordansissel/fpm/issues/1213
.. _#1218: https://github.com/jordansissel/fpm/issues/1218
.. _#1225: https://github.com/jordansissel/fpm/issues/1225
.. _#1231: https://github.com/jordansissel/fpm/issues/1231
.. _#1235: https://github.com/jordansissel/fpm/issues/1235
.. _#1236: https://github.com/jordansissel/fpm/issues/1236
.. _#1237: https://github.com/jordansissel/fpm/issues/1237
.. _#1241: https://github.com/jordansissel/fpm/issues/1241
.. _#1242: https://github.com/jordansissel/fpm/issues/1242
.. _#1253: https://github.com/jordansissel/fpm/issues/1253
.. _#1259: https://github.com/jordansissel/fpm/issues/1259
.. _#1262: https://github.com/jordansissel/fpm/issues/1262
.. _#1264: https://github.com/jordansissel/fpm/issues/1264
.. _#1266: https://github.com/jordansissel/fpm/issues/1266
.. _#1287: https://github.com/jordansissel/fpm/issues/1287
.. _#1291: https://github.com/jordansissel/fpm/issues/1291
.. _#1293: https://github.com/jordansissel/fpm/issues/1293
.. _#1307: https://github.com/jordansissel/fpm/issues/1307
.. _#1309: https://github.com/jordansissel/fpm/issues/1309
.. _#1311: https://github.com/jordansissel/fpm/issues/1311
.. _#1313: https://github.com/jordansissel/fpm/issues/1313
.. _#1314: https://github.com/jordansissel/fpm/issues/1314
.. _#1320: https://github.com/jordansissel/fpm/issues/1320
.. _#1321: https://github.com/jordansissel/fpm/issues/1321
.. _#1325: https://github.com/jordansissel/fpm/issues/1325
.. _#1338: https://github.com/jordansissel/fpm/issues/1338
.. _#1339: https://github.com/jordansissel/fpm/issues/1339
.. _#1340: https://github.com/jordansissel/fpm/issues/1340
.. _#1341: https://github.com/jordansissel/fpm/issues/1341
.. _#1342: https://github.com/jordansissel/fpm/issues/1342
.. _#1343: https://github.com/jordansissel/fpm/issues/1343
.. _#1344: https://github.com/jordansissel/fpm/issues/1344
.. _#1345: https://github.com/jordansissel/fpm/issues/1345
.. _#1348: https://github.com/jordansissel/fpm/issues/1348
.. _#1349: https://github.com/jordansissel/fpm/issues/1349
.. _#1352: https://github.com/jordansissel/fpm/issues/1352
.. _#1354: https://github.com/jordansissel/fpm/issues/1354
.. _#1355: https://github.com/jordansissel/fpm/issues/1355
.. _#1358: https://github.com/jordansissel/fpm/issues/1358
.. _#1359: https://github.com/jordansissel/fpm/issues/1359
.. _#1374: https://github.com/jordansissel/fpm/issues/1374
.. _#1376: https://github.com/jordansissel/fpm/issues/1376
.. _#1379: https://github.com/jordansissel/fpm/issues/1379
.. _#1384: https://github.com/jordansissel/fpm/issues/1384
.. _#1385: https://github.com/jordansissel/fpm/issues/1385
.. _#1390: https://github.com/jordansissel/fpm/issues/1390
.. _#1391: https://github.com/jordansissel/fpm/issues/1391
.. _#1395: https://github.com/jordansissel/fpm/issues/1395
.. _#1419: https://github.com/jordansissel/fpm/issues/1419
.. _#1422: https://github.com/jordansissel/fpm/issues/1422
.. _#1434: https://github.com/jordansissel/fpm/issues/1434
.. _#1440: https://github.com/jordansissel/fpm/issues/1440
.. _#1443: https://github.com/jordansissel/fpm/issues/1443
.. _#1447: https://github.com/jordansissel/fpm/issues/1447
.. _#1452: https://github.com/jordansissel/fpm/issues/1452
.. _#1453: https://github.com/jordansissel/fpm/issues/1453
.. _#1482: https://github.com/jordansissel/fpm/issues/1482
.. _#1484: https://github.com/jordansissel/fpm/issues/1484
.. _#1488: https://github.com/jordansissel/fpm/issues/1488
.. _#1490: https://github.com/jordansissel/fpm/issues/1490
.. _#1492: https://github.com/jordansissel/fpm/issues/1492
.. _#1494: https://github.com/jordansissel/fpm/issues/1494
.. _#1509: https://github.com/jordansissel/fpm/issues/1509
.. _#1511: https://github.com/jordansissel/fpm/issues/1511
.. _#1514: https://github.com/jordansissel/fpm/issues/1514
.. _#1515: https://github.com/jordansissel/fpm/issues/1515
.. _#1519: https://github.com/jordansissel/fpm/issues/1519
.. _#1522: https://github.com/jordansissel/fpm/issues/1522
.. _#1523: https://github.com/jordansissel/fpm/issues/1523
.. _#1528: https://github.com/jordansissel/fpm/issues/1528
.. _#1592: https://github.com/jordansissel/fpm/issues/1592
.. _#1627: https://github.com/jordansissel/fpm/issues/1627
.. _#1636: https://github.com/jordansissel/fpm/issues/1636
.. _#1642: https://github.com/jordansissel/fpm/issues/1642
.. _#1667: https://github.com/jordansissel/fpm/issues/1667
.. _#1668: https://github.com/jordansissel/fpm/issues/1668
.. _#1682: https://github.com/jordansissel/fpm/issues/1682
.. _#1697: https://github.com/jordansissel/fpm/issues/1697
.. _#1699: https://github.com/jordansissel/fpm/issues/1699
.. _#1709: https://github.com/jordansissel/fpm/issues/1709
.. _#1710: https://github.com/jordansissel/fpm/issues/1710
.. _#1711: https://github.com/jordansissel/fpm/issues/1711
.. _#171: https://github.com/jordansissel/fpm/issues/171
.. _#1724: https://github.com/jordansissel/fpm/issues/1724
.. _#1727: https://github.com/jordansissel/fpm/issues/1727
.. _#1729: https://github.com/jordansissel/fpm/issues/1729
.. _#1737: https://github.com/jordansissel/fpm/issues/1737
.. _#1738: https://github.com/jordansissel/fpm/issues/1738
.. _#1739: https://github.com/jordansissel/fpm/issues/1739
.. _#1740: https://github.com/jordansissel/fpm/issues/1740
.. _#1741: https://github.com/jordansissel/fpm/issues/1741
.. _#1745: https://github.com/jordansissel/fpm/issues/1745
.. _#1748: https://github.com/jordansissel/fpm/issues/1748
.. _#1749: https://github.com/jordansissel/fpm/issues/1749
.. _#1751: https://github.com/jordansissel/fpm/issues/1751
.. _#1752: https://github.com/jordansissel/fpm/issues/1752
.. _#1753: https://github.com/jordansissel/fpm/issues/1753
.. _#1760: https://github.com/jordansissel/fpm/issues/1760
.. _#1761: https://github.com/jordansissel/fpm/issues/1761
.. _#1764: https://github.com/jordansissel/fpm/issues/1764
.. _#1766: https://github.com/jordansissel/fpm/issues/1766
.. _#1772: https://github.com/jordansissel/fpm/issues/1772
.. _#1774: https://github.com/jordansissel/fpm/issues/1774
.. _#1775: https://github.com/jordansissel/fpm/issues/1775
.. _#1784: https://github.com/jordansissel/fpm/issues/1784
.. _#1785: https://github.com/jordansissel/fpm/issues/1785
.. _#1786: https://github.com/jordansissel/fpm/issues/1786
.. _#1788: https://github.com/jordansissel/fpm/issues/1788
.. _#1794: https://github.com/jordansissel/fpm/issues/1794
.. _#1797: https://github.com/jordansissel/fpm/issues/1797
.. _#1798: https://github.com/jordansissel/fpm/issues/1798
.. _#1800: https://github.com/jordansissel/fpm/issues/1800
.. _#1803: https://github.com/jordansissel/fpm/issues/1803
.. _#1811: https://github.com/jordansissel/fpm/issues/1811
.. _#1812: https://github.com/jordansissel/fpm/issues/1812
.. _#1815: https://github.com/jordansissel/fpm/issues/1815
.. _#1816: https://github.com/jordansissel/fpm/issues/1816
.. _#1817: https://github.com/jordansissel/fpm/issues/1817
.. _#1818: https://github.com/jordansissel/fpm/issues/1818
.. _#1820: https://github.com/jordansissel/fpm/issues/1820
.. _#1821: https://github.com/jordansissel/fpm/issues/1821
.. _#1823: https://github.com/jordansissel/fpm/issues/1823
.. _#1825: https://github.com/jordansissel/fpm/issues/1825
.. _#1827: https://github.com/jordansissel/fpm/issues/1827
.. _#1829: https://github.com/jordansissel/fpm/issues/1829
.. _#1831: https://github.com/jordansissel/fpm/issues/1831
.. _#1832: https://github.com/jordansissel/fpm/issues/1832
.. _#1833: https://github.com/jordansissel/fpm/issues/1833
.. _#1834: https://github.com/jordansissel/fpm/issues/1834
.. _#1838: https://github.com/jordansissel/fpm/issues/1838
.. _#1842: https://github.com/jordansissel/fpm/issues/1842
.. _#1844: https://github.com/jordansissel/fpm/issues/1844
.. _#1845: https://github.com/jordansissel/fpm/issues/1845
.. _#1846: https://github.com/jordansissel/fpm/issues/1846
.. _#1850: https://github.com/jordansissel/fpm/issues/1850
.. _#1851: https://github.com/jordansissel/fpm/issues/1851
.. _#1852: https://github.com/jordansissel/fpm/issues/1852
.. _#1854: https://github.com/jordansissel/fpm/issues/1854
.. _#1856: https://github.com/jordansissel/fpm/issues/1856
.. _#185: https://github.com/jordansissel/fpm/issues/185
.. _#1864: https://github.com/jordansissel/fpm/issues/1864
.. _#186: https://github.com/jordansissel/fpm/issues/186
.. _#1875: https://github.com/jordansissel/fpm/issues/1875
.. _#1876: https://github.com/jordansissel/fpm/issues/1876
.. _#1877: https://github.com/jordansissel/fpm/issues/1877
.. _#1879: https://github.com/jordansissel/fpm/issues/1879
.. _#187: https://github.com/jordansissel/fpm/issues/187
.. _#1880: https://github.com/jordansissel/fpm/issues/1880
.. _#1882: https://github.com/jordansissel/fpm/issues/1882
.. _#1884: https://github.com/jordansissel/fpm/issues/1884
.. _#1886: https://github.com/jordansissel/fpm/issues/1886
.. _#1893: https://github.com/jordansissel/fpm/issues/1893
.. _#1895: https://github.com/jordansissel/fpm/issues/1895
.. _#1896: https://github.com/jordansissel/fpm/issues/1896
.. _#1897: https://github.com/jordansissel/fpm/issues/1897
.. _#1898: https://github.com/jordansissel/fpm/issues/1898
.. _#1899: https://github.com/jordansissel/fpm/issues/1899
.. _#1902: https://github.com/jordansissel/fpm/issues/1902
.. _#1905: https://github.com/jordansissel/fpm/issues/1905
.. _#1907: https://github.com/jordansissel/fpm/issues/1907
.. _#1908: https://github.com/jordansissel/fpm/issues/1908
.. _#1909: https://github.com/jordansissel/fpm/issues/1909
.. _#190: https://github.com/jordansissel/fpm/issues/190
.. _#1912: https://github.com/jordansissel/fpm/issues/1912
.. _#1913: https://github.com/jordansissel/fpm/issues/1913
.. _#1916: https://github.com/jordansissel/fpm/issues/1916
.. _#191: https://github.com/jordansissel/fpm/issues/191
.. _#1923: https://github.com/jordansissel/fpm/issues/1923
.. _#1934: https://github.com/jordansissel/fpm/issues/1934
.. _#1935: https://github.com/jordansissel/fpm/issues/1935
.. _#1937: https://github.com/jordansissel/fpm/issues/1937
.. _#1939: https://github.com/jordansissel/fpm/issues/1939
.. _#193: https://github.com/jordansissel/fpm/issues/193
.. _#1940: https://github.com/jordansissel/fpm/issues/1940
.. _#1942: https://github.com/jordansissel/fpm/issues/1942
.. _#1946: https://github.com/jordansissel/fpm/issues/1946
.. _#1948: https://github.com/jordansissel/fpm/issues/1948
.. _#1949: https://github.com/jordansissel/fpm/issues/1949
.. _#194: https://github.com/jordansissel/fpm/issues/194
.. _#1950: https://github.com/jordansissel/fpm/issues/1950
.. _#1955: https://github.com/jordansissel/fpm/issues/1955
.. _#1959: https://github.com/jordansissel/fpm/issues/1959
.. _#196: https://github.com/jordansissel/fpm/issues/196
.. _#1978: https://github.com/jordansissel/fpm/issues/1978
.. _#1981: https://github.com/jordansissel/fpm/issues/1981
.. _#1982: https://github.com/jordansissel/fpm/issues/1982
.. _#1988: https://github.com/jordansissel/fpm/issues/1988
.. _#198: https://github.com/jordansissel/fpm/issues/198
.. _#2009: https://github.com/jordansissel/fpm/issues/2009
.. _#2011: https://github.com/jordansissel/fpm/issues/2011
.. _#2017: https://github.com/jordansissel/fpm/issues/2017
.. _#2027: https://github.com/jordansissel/fpm/issues/2027
.. _#2029: https://github.com/jordansissel/fpm/issues/2029
.. _#202: https://github.com/jordansissel/fpm/issues/202
.. _#2036: https://github.com/jordansissel/fpm/issues/2036
.. _#2040: https://github.com/jordansissel/fpm/issues/2040
.. _#2041: https://github.com/jordansissel/fpm/issues/2041
.. _#204: https://github.com/jordansissel/fpm/issues/204
.. _#2053: https://github.com/jordansissel/fpm/issues/2053
.. _#2054: https://github.com/jordansissel/fpm/issues/2054
.. _#205: https://github.com/jordansissel/fpm/issues/205
.. _#2062: https://github.com/jordansissel/fpm/issues/2062
.. _#2063: https://github.com/jordansissel/fpm/issues/2063
.. _#2064: https://github.com/jordansissel/fpm/issues/2064
.. _#2065: https://github.com/jordansissel/fpm/issues/2065
.. _#2066: https://github.com/jordansissel/fpm/issues/2066
.. _#2067: https://github.com/jordansissel/fpm/issues/2067
.. _#2068: https://github.com/jordansissel/fpm/issues/2068
.. _#206: https://github.com/jordansissel/fpm/issues/206
.. _#2072: https://github.com/jordansissel/fpm/issues/2072
.. _#2074: https://github.com/jordansissel/fpm/issues/2074
.. _#2076: https://github.com/jordansissel/fpm/issues/2076
.. _#207: https://github.com/jordansissel/fpm/issues/207
.. _#2082: https://github.com/jordansissel/fpm/issues/2082
.. _#2084: https://github.com/jordansissel/fpm/issues/2084
.. _#2085: https://github.com/jordansissel/fpm/issues/2085
.. _#2087: https://github.com/jordansissel/fpm/issues/2087
.. _#2088: https://github.com/jordansissel/fpm/issues/2088
.. _#208: https://github.com/jordansissel/fpm/issues/208
.. _#2092: https://github.com/jordansissel/fpm/issues/2092
.. _#2102: https://github.com/jordansissel/fpm/issues/2102
.. _#2103: https://github.com/jordansissel/fpm/issues/2103
.. _#2104: https://github.com/jordansissel/fpm/issues/2104
.. _#2105: https://github.com/jordansissel/fpm/issues/2105
.. _#2106: https://github.com/jordansissel/fpm/issues/2106
.. _#212: https://github.com/jordansissel/fpm/issues/212
.. _#213: https://github.com/jordansissel/fpm/issues/213
.. _#215: https://github.com/jordansissel/fpm/issues/215
.. _#216: https://github.com/jordansissel/fpm/issues/216
.. _#217: https://github.com/jordansissel/fpm/issues/217
.. _#221: https://github.com/jordansissel/fpm/issues/221
.. _#222: https://github.com/jordansissel/fpm/issues/222
.. _#223: https://github.com/jordansissel/fpm/issues/223
.. _#228: https://github.com/jordansissel/fpm/issues/228
.. _#232: https://github.com/jordansissel/fpm/issues/232
.. _#233: https://github.com/jordansissel/fpm/issues/233
.. _#234: https://github.com/jordansissel/fpm/issues/234
.. _#240: https://github.com/jordansissel/fpm/issues/240
.. _#244: https://github.com/jordansissel/fpm/issues/244
.. _#245: https://github.com/jordansissel/fpm/issues/245
.. _#248: https://github.com/jordansissel/fpm/issues/248
.. _#250: https://github.com/jordansissel/fpm/issues/250
.. _#251: https://github.com/jordansissel/fpm/issues/251
.. _#252: https://github.com/jordansissel/fpm/issues/252
.. _#253: https://github.com/jordansissel/fpm/issues/253
.. _#255: https://github.com/jordansissel/fpm/issues/255
.. _#257: https://github.com/jordansissel/fpm/issues/257
.. _#260: https://github.com/jordansissel/fpm/issues/260
.. _#263: https://github.com/jordansissel/fpm/issues/263
.. _#266: https://github.com/jordansissel/fpm/issues/266
.. _#269: https://github.com/jordansissel/fpm/issues/269
.. _#273: https://github.com/jordansissel/fpm/issues/273
.. _#274: https://github.com/jordansissel/fpm/issues/274
.. _#276: https://github.com/jordansissel/fpm/issues/276
.. _#278: https://github.com/jordansissel/fpm/issues/278
.. _#279: https://github.com/jordansissel/fpm/issues/279
.. _#280: https://github.com/jordansissel/fpm/issues/280
.. _#281: https://github.com/jordansissel/fpm/issues/281
.. _#284: https://github.com/jordansissel/fpm/issues/284
.. _#285: https://github.com/jordansissel/fpm/issues/285
.. _#287: https://github.com/jordansissel/fpm/issues/287
.. _#288: https://github.com/jordansissel/fpm/issues/288
.. _#289: https://github.com/jordansissel/fpm/issues/289
.. _#291: https://github.com/jordansissel/fpm/issues/291
.. _#292: https://github.com/jordansissel/fpm/issues/292
.. _#293: https://github.com/jordansissel/fpm/issues/293
.. _#294: https://github.com/jordansissel/fpm/issues/294
.. _#296: https://github.com/jordansissel/fpm/issues/296
.. _#297: https://github.com/jordansissel/fpm/issues/297
.. _#299: https://github.com/jordansissel/fpm/issues/299
.. _#300: https://github.com/jordansissel/fpm/issues/300
.. _#301: https://github.com/jordansissel/fpm/issues/301
.. _#304: https://github.com/jordansissel/fpm/issues/304
.. _#309: https://github.com/jordansissel/fpm/issues/309
.. _#310: https://github.com/jordansissel/fpm/issues/310
.. _#311: https://github.com/jordansissel/fpm/issues/311
.. _#312: https://github.com/jordansissel/fpm/issues/312
.. _#315: https://github.com/jordansissel/fpm/issues/315
.. _#316: https://github.com/jordansissel/fpm/issues/316
.. _#319: https://github.com/jordansissel/fpm/issues/319
.. _#320: https://github.com/jordansissel/fpm/issues/320
.. _#321: https://github.com/jordansissel/fpm/issues/321
.. _#323: https://github.com/jordansissel/fpm/issues/323
.. _#325: https://github.com/jordansissel/fpm/issues/325
.. _#329: https://github.com/jordansissel/fpm/issues/329
.. _#332: https://github.com/jordansissel/fpm/issues/332
.. _#337: https://github.com/jordansissel/fpm/issues/337
.. _#342: https://github.com/jordansissel/fpm/issues/342
.. _#343: https://github.com/jordansissel/fpm/issues/343
.. _#344: https://github.com/jordansissel/fpm/issues/344
.. _#347: https://github.com/jordansissel/fpm/issues/347
.. _#358: https://github.com/jordansissel/fpm/issues/358
.. _#359: https://github.com/jordansissel/fpm/issues/359
.. _#363: https://github.com/jordansissel/fpm/issues/363
.. _#364: https://github.com/jordansissel/fpm/issues/364
.. _#365: https://github.com/jordansissel/fpm/issues/365
.. _#374: https://github.com/jordansissel/fpm/issues/374
.. _#376: https://github.com/jordansissel/fpm/issues/376
.. _#377: https://github.com/jordansissel/fpm/issues/377
.. _#378: https://github.com/jordansissel/fpm/issues/378
.. _#381: https://github.com/jordansissel/fpm/issues/381
.. _#383: https://github.com/jordansissel/fpm/issues/383
.. _#384: https://github.com/jordansissel/fpm/issues/384
.. _#385: https://github.com/jordansissel/fpm/issues/385
.. _#386: https://github.com/jordansissel/fpm/issues/386
.. _#388: https://github.com/jordansissel/fpm/issues/388
.. _#389: https://github.com/jordansissel/fpm/issues/389
.. _#393: https://github.com/jordansissel/fpm/issues/393
.. _#394: https://github.com/jordansissel/fpm/issues/394
.. _#395: https://github.com/jordansissel/fpm/issues/395
.. _#396: https://github.com/jordansissel/fpm/issues/396
.. _#398: https://github.com/jordansissel/fpm/issues/398
.. _#399: https://github.com/jordansissel/fpm/issues/399
.. _#400: https://github.com/jordansissel/fpm/issues/400
.. _#401: https://github.com/jordansissel/fpm/issues/401
.. _#403: https://github.com/jordansissel/fpm/issues/403
.. _#404: https://github.com/jordansissel/fpm/issues/404
.. _#405: https://github.com/jordansissel/fpm/issues/405
.. _#416: https://github.com/jordansissel/fpm/issues/416
.. _#420: https://github.com/jordansissel/fpm/issues/420
.. _#428: https://github.com/jordansissel/fpm/issues/428
.. _#438: https://github.com/jordansissel/fpm/issues/438
.. _#439: https://github.com/jordansissel/fpm/issues/439
.. _#442: https://github.com/jordansissel/fpm/issues/442
.. _#443: https://github.com/jordansissel/fpm/issues/443
.. _#445: https://github.com/jordansissel/fpm/issues/445
.. _#447: https://github.com/jordansissel/fpm/issues/447
.. _#450: https://github.com/jordansissel/fpm/issues/450
.. _#451: https://github.com/jordansissel/fpm/issues/451
.. _#461: https://github.com/jordansissel/fpm/issues/461
.. _#464: https://github.com/jordansissel/fpm/issues/464
.. _#465: https://github.com/jordansissel/fpm/issues/465
.. _#476: https://github.com/jordansissel/fpm/issues/476
.. _#480: https://github.com/jordansissel/fpm/issues/480
.. _#481: https://github.com/jordansissel/fpm/issues/481
.. _#484: https://github.com/jordansissel/fpm/issues/484
.. _#487: https://github.com/jordansissel/fpm/issues/487
.. _#491: https://github.com/jordansissel/fpm/issues/491
.. _#498: https://github.com/jordansissel/fpm/issues/498
.. _#500: https://github.com/jordansissel/fpm/issues/500
.. _#502: https://github.com/jordansissel/fpm/issues/502
.. _#503: https://github.com/jordansissel/fpm/issues/503
.. _#504: https://github.com/jordansissel/fpm/issues/504
.. _#506: https://github.com/jordansissel/fpm/issues/506
.. _#507: https://github.com/jordansissel/fpm/issues/507
.. _#508: https://github.com/jordansissel/fpm/issues/508
.. _#510: https://github.com/jordansissel/fpm/issues/510
.. _#511: https://github.com/jordansissel/fpm/issues/511
.. _#513: https://github.com/jordansissel/fpm/issues/513
.. _#518: https://github.com/jordansissel/fpm/issues/518
.. _#521: https://github.com/jordansissel/fpm/issues/521
.. _#524: https://github.com/jordansissel/fpm/issues/524
.. _#539: https://github.com/jordansissel/fpm/issues/539
.. _#543: https://github.com/jordansissel/fpm/issues/543
.. _#544: https://github.com/jordansissel/fpm/issues/544
.. _#545: https://github.com/jordansissel/fpm/issues/545
.. _#547: https://github.com/jordansissel/fpm/issues/547
.. _#554: https://github.com/jordansissel/fpm/issues/554
.. _#556: https://github.com/jordansissel/fpm/issues/556
.. _#561: https://github.com/jordansissel/fpm/issues/561
.. _#567: https://github.com/jordansissel/fpm/issues/567
.. _#573: https://github.com/jordansissel/fpm/issues/573
.. _#575: https://github.com/jordansissel/fpm/issues/575
.. _#585: https://github.com/jordansissel/fpm/issues/585
.. _#591: https://github.com/jordansissel/fpm/issues/591
.. _#593: https://github.com/jordansissel/fpm/issues/593
.. _#595: https://github.com/jordansissel/fpm/issues/595
.. _#598: https://github.com/jordansissel/fpm/issues/598
.. _#599: https://github.com/jordansissel/fpm/issues/599
.. _#603: https://github.com/jordansissel/fpm/issues/603
.. _#612: https://github.com/jordansissel/fpm/issues/612
.. _#614: https://github.com/jordansissel/fpm/issues/614
.. _#615: https://github.com/jordansissel/fpm/issues/615
.. _#616: https://github.com/jordansissel/fpm/issues/616
.. _#617: https://github.com/jordansissel/fpm/issues/617
.. _#623: https://github.com/jordansissel/fpm/issues/623
.. _#626: https://github.com/jordansissel/fpm/issues/626
.. _#628: https://github.com/jordansissel/fpm/issues/628
.. _#640: https://github.com/jordansissel/fpm/issues/640
.. _#642: https://github.com/jordansissel/fpm/issues/642
.. _#648: https://github.com/jordansissel/fpm/issues/648
.. _#651: https://github.com/jordansissel/fpm/issues/651
.. _#652: https://github.com/jordansissel/fpm/issues/652
.. _#654: https://github.com/jordansissel/fpm/issues/654
.. _#656: https://github.com/jordansissel/fpm/issues/656
.. _#658: https://github.com/jordansissel/fpm/issues/658
.. _#659: https://github.com/jordansissel/fpm/issues/659
.. _#661: https://github.com/jordansissel/fpm/issues/661
.. _#664: https://github.com/jordansissel/fpm/issues/664
.. _#676: https://github.com/jordansissel/fpm/issues/676
.. _#679: https://github.com/jordansissel/fpm/issues/679
.. _#687: https://github.com/jordansissel/fpm/issues/687
.. _#688: https://github.com/jordansissel/fpm/issues/688
.. _#707: https://github.com/jordansissel/fpm/issues/707
.. _#712: https://github.com/jordansissel/fpm/issues/712
.. _#714: https://github.com/jordansissel/fpm/issues/714
.. _#716: https://github.com/jordansissel/fpm/issues/716
.. _#719: https://github.com/jordansissel/fpm/issues/719
.. _#720: https://github.com/jordansissel/fpm/issues/720
.. _#724: https://github.com/jordansissel/fpm/issues/724
.. _#727: https://github.com/jordansissel/fpm/issues/727
.. _#734: https://github.com/jordansissel/fpm/issues/734
.. _#744: https://github.com/jordansissel/fpm/issues/744
.. _#752: https://github.com/jordansissel/fpm/issues/752
.. _#756: https://github.com/jordansissel/fpm/issues/756
.. _#758: https://github.com/jordansissel/fpm/issues/758
.. _#763: https://github.com/jordansissel/fpm/issues/763
.. _#765: https://github.com/jordansissel/fpm/issues/765
.. _#772: https://github.com/jordansissel/fpm/issues/772
.. _#776: https://github.com/jordansissel/fpm/issues/776
.. _#778: https://github.com/jordansissel/fpm/issues/778
.. _#779: https://github.com/jordansissel/fpm/issues/779
.. _#784: https://github.com/jordansissel/fpm/issues/784
.. _#787: https://github.com/jordansissel/fpm/issues/787
.. _#797: https://github.com/jordansissel/fpm/issues/797
.. _#799: https://github.com/jordansissel/fpm/issues/799
.. _#800: https://github.com/jordansissel/fpm/issues/800
.. _#801: https://github.com/jordansissel/fpm/issues/801
.. _#802: https://github.com/jordansissel/fpm/issues/802
.. _#806: https://github.com/jordansissel/fpm/issues/806
.. _#819: https://github.com/jordansissel/fpm/issues/819
.. _#822: https://github.com/jordansissel/fpm/issues/822
.. _#836: https://github.com/jordansissel/fpm/issues/836
.. _#849: https://github.com/jordansissel/fpm/issues/849
.. _#853: https://github.com/jordansissel/fpm/issues/853
.. _#860: https://github.com/jordansissel/fpm/issues/860
.. _#863: https://github.com/jordansissel/fpm/issues/863
.. _#877: https://github.com/jordansissel/fpm/issues/877
.. _#885: https://github.com/jordansissel/fpm/issues/885
.. _#886: https://github.com/jordansissel/fpm/issues/886
.. _#887: https://github.com/jordansissel/fpm/issues/887
.. _#896: https://github.com/jordansissel/fpm/issues/896
.. _#916: https://github.com/jordansissel/fpm/issues/916
.. _#930: https://github.com/jordansissel/fpm/issues/930
.. _#946: https://github.com/jordansissel/fpm/issues/946
.. _#952: https://github.com/jordansissel/fpm/issues/952
.. _#977: https://github.com/jordansissel/fpm/issues/977
.. _#982: https://github.com/jordansissel/fpm/issues/982
.. _#986: https://github.com/jordansissel/fpm/issues/986


Cli Reference (`docs/cli-reference.rst`)

Command-line Reference

This page documents the command-line flags available in FPM. You can also see this content in your terminal by running fpm --help

General Options

  • -C CHDIR

    • Alternate option spellings: --chdir
    • Change directory to here before searching for files
  • -S PACKAGE_NAME_SUFFIX

    • Alternate option spellings: --package-name-suffix
    • a name suffix to append to package and dependencies.
  • -a ARCHITECTURE

    • Alternate option spellings: --architecture
    • The architecture name. Usually matches 'uname -m'. For automatic values, you can use '-a all' or '-a native'. These two strings will be translated into the correct value for your platform and target package type.
  • -d DEPENDENCY

    • Alternate option spellings: --depends
    • A dependency. This flag can be specified multiple times. Value is usually in the form of: -d 'name' or -d 'name > version'
  • -e

    • Alternate option spellings: --edit
    • Edit the package spec before building.
  • -f

    • Alternate option spellings: --force
    • Force output even if it will overwrite an existing file
  • -m MAINTAINER

    • Alternate option spellings: --maintainer
    • The maintainer of this package.
  • -n NAME

    • Alternate option spellings: --name
    • The name to give to the package
  • -p OUTPUT

    • Alternate option spellings: --package
    • The package file path to output.
  • -s INPUT_TYPE

    • Alternate option spellings: --input-type
    • the package type to use as input (gem, rpm, python, etc)
  • -t OUTPUT_TYPE

    • Alternate option spellings: --output-type
    • the type of package you want to create (deb, rpm, solaris, etc)
  • -v VERSION

    • Alternate option spellings: --version
    • The version to give to the package
  • -x EXCLUDE_PATTERN

    • Alternate option spellings: --exclude
    • Exclude paths matching pattern (shell wildcard globs valid here). If you have multiple file patterns to exclude, specify this flag multiple times.
  • --after-install FILE

    • A script to be run after package installation
  • --after-remove FILE

    • A script to be run after package removal
  • --after-upgrade FILE

    • A script to be run after package upgrade. If not specified, --before-install, --after-install, --before-remove, and --after-remove will behave in a backwards-compatible manner (they will not be upgrade-case aware). Currently only supports deb, rpm and pacman packages.
  • --before-install FILE

    • A script to be run before package installation
  • --before-remove FILE

    • A script to be run before package removal
  • --before-upgrade FILE

    • A script to be run before package upgrade. If not specified, --before-install, --after-install, --before-remove, and --after-remove will behave in a backwards-compatible manner (they will not be upgrade-case aware). Currently only supports deb, rpm and pacman packages.
  • --category CATEGORY

    • (optional) category this package belongs to
  • --config-files CONFIG_FILES

    • Mark a file in the package as being a config file. This uses 'conffiles' in debs and %config in rpm. If you have multiple files to mark as configuration files, specify this flag multiple times. If argument is directory all files inside it will be recursively marked as config files.
  • --conflicts CONFLICTS

    • Other packages/versions this package conflicts with. This flag can be specified multiple times.
  • --debug

    • Enable debug output
  • --debug-workspace

    • Keep any file workspaces around for debugging. This will disable automatic cleanup of package staging and build paths. It will also print which directories are available.
  • --description DESCRIPTION

    • Add a description for this package. You can include '\n' sequences to indicate newline breaks.
  • --directories DIRECTORIES

    • Recursively mark a directory as being owned by the package. Use this flag multiple times if you have multiple directories and they are not under the same parent directory
  • --epoch EPOCH

    • The epoch value for this package. RPM and Debian calls this 'epoch'. FreeBSD calls this 'PORTEPOCH'
  • --exclude-file EXCLUDE_PATH

    • The path to a file containing a newline-sparated list of patterns to exclude from input.
  • --fpm-options-file FPM_OPTIONS_FILE

    • A file that contains additional fpm options. Any fpm flag format is valid in this file. This can be useful on build servers where you want to use a common configuration or inject other parameters from a file instead of from a command-line flag..
  • --inputs INPUTS_PATH

    • The path to a file containing a newline-separated list of files and dirs to use as input.
  • --iteration ITERATION

    • The iteration to give to the package. RPM calls this the 'release'. FreeBSD calls it 'PORTREVISION'. Debian calls this 'debian_revision'
  • --license LICENSE

    • (optional) license name for this package
  • --log LEVEL

    • Set the log level. Values: error, warn, info, debug.
  • --no-auto-depends

    • Do not list any dependencies in this package automatically
  • --no-depends

    • Do not list any dependencies in this package
  • --post-install FILE

    • (DEPRECATED, use --after-install) A script to be run after package installation
  • --post-uninstall FILE

    • (DEPRECATED, use --after-remove) A script to be run after package removal
  • --pre-install FILE

    • (DEPRECATED, use --before-install) A script to be run before package installation
  • --pre-uninstall FILE

    • (DEPRECATED, use --before-remove) A script to be run before package removal
  • --prefix PREFIX

    • A path to prefix files with when building the target package. This may not be necessary for all input packages. For example, the 'gem' type will prefix with your gem directory automatically.
  • --provides PROVIDES

    • What this package provides (usually a name). This flag can be specified multiple times.
  • --replaces REPLACES

    • Other packages/versions this package replaces. Equivalent of rpm's 'Obsoletes'. This flag can be specified multiple times.
  • --source-date-epoch-default SOURCE_DATE_EPOCH_DEFAULT

    • If no release date otherwise specified, use this value as timestamp on generated files to reduce nondeterminism. Reproducible build environments such as dpkg-dev and rpmbuild set this via envionment variable SOURCE_DATE_EPOCH variable to the integer unix timestamp to use in generated archives, and expect tools like fpm to use it as a hint to avoid nondeterministic output. This is a Unix timestamp, i.e. number of seconds since 1 Jan 1970 UTC. See https://reproducible-builds.org/specs/source-date-epoch
  • --source-date-epoch-from-changelog

    • Use release date from changelog as timestamp on generated files to reduce nondeterminism. Experimental; only implemented for gem so far.
  • --template-scripts

    • Allow scripts to be templated. This lets you use ERB to template your packaging scripts (for --after-install, etc). For example, you can do things like <%= name %> to get the package name. For more information, see the fpm wiki: https://github.com/jordansissel/fpm/wiki/Script-Templates
  • --template-value KEY=VALUE

    • Make 'key' available in script templates, so <%= key %> given will be the provided value. Implies --template-scripts
  • --url URI

    • Add a url for this package.
  • --vendor VENDOR

    • (optional) vendor name for this package
  • --verbose

    • Enable verbose output
  • --workdir WORKDIR

    • The directory you want fpm to do its work in, where 'work' is any file copying, downloading, etc. Roughly any scratch space fpm needs to build your package.

apk

This package type has no additional options

cpan

  • --cpan-cpanm-bin CPANM_EXECUTABLE
    • The path to the cpanm executable you wish to run.
  • --[no-]cpan-cpanm-force
    • Pass the --force parameter to cpanm
  • --cpan-mirror CPAN_MIRROR
    • The CPAN mirror to use instead of the default.
  • --[no-]cpan-mirror-only
    • Only use the specified mirror for metadata.
  • --cpan-package-name-prefix NAME_PREFIX
    • Name to prefix the package name with.
  • --cpan-perl-bin PERL_EXECUTABLE
    • The path to the perl executable you wish to run.
  • --cpan-perl-lib-path PERL_LIB_PATH
    • Path of target Perl Libraries
  • --[no-]cpan-sandbox-non-core
    • Sandbox all non-core modules, even if they're already installed
  • --[no-]cpan-test
    • Run the tests before packaging?
  • --[no-]cpan-verbose
    • Produce verbose output from cpanm?

deb

  • --deb-activate EVENT
    • Package activates EVENT trigger
  • --deb-activate-noawait EVENT
    • Package activates EVENT trigger
  • --deb-after-purge FILE
    • A script to be run after package removal to purge remaining (config) files (a.k.a. postrm purge within apt-get purge)
  • --[no-]deb-auto-config-files
    • Init script and default configuration files will be labeled as configuration files for Debian packages.
  • --deb-build-depends DEPENDENCY
    • Add DEPENDENCY as a Build-Depends
  • --deb-changelog FILEPATH
    • Add FILEPATH as debian changelog
  • --deb-compression COMPRESSION
    • The compression type to use, must be one of gz, bzip2, xz, zst, none.
  • --deb-compression-level [0-9]
    • Select a compression level. 0 is none or minimal. 9 is max compression.
  • --deb-config SCRIPTPATH
    • Add SCRIPTPATH as debconf config file.
  • --deb-custom-control FILEPATH
    • Custom version of the Debian control file.
  • --deb-default FILEPATH
    • Add FILEPATH as /etc/default configuration
  • --deb-dist DIST-TAG
    • Set the deb distribution.
  • --deb-field 'FIELD: VALUE'
    • Add custom field to the control file
  • --[no-]deb-generate-changes
    • Generate PACKAGENAME.changes file.
  • --deb-group GROUP
    • The group owner of files in this package
  • --[no-]deb-ignore-iteration-in-dependencies
    • For '=' (equal) dependencies, allow iterations on the specified version. Default is to be specific. This option allows the same version of a package but any iteration is permitted
  • --deb-init FILEPATH
    • Add FILEPATH as an init script
  • --deb-installed-size KILOBYTES
    • The installed size, in kilobytes. If omitted, this will be calculated automatically
  • --deb-interest EVENT
    • Package is interested in EVENT trigger
  • --deb-interest-noawait EVENT
    • Package is interested in EVENT trigger without awaiting
  • --[no-]deb-maintainerscripts-force-errorchecks
  • --deb-meta-file FILEPATH
    • Add FILEPATH to DEBIAN directory
  • --[no-]deb-no-default-config-files
    • Do not add all files in /etc as configuration files by default for Debian packages.
  • --deb-pre-depends DEPENDENCY
    • Add DEPENDENCY as a Pre-Depends
  • --deb-priority PRIORITY
    • The debian package 'priority' value.
  • --deb-recommends PACKAGE
    • Add PACKAGE to Recommends
  • --deb-shlibs SHLIBS
  • --deb-suggests PACKAGE
    • Add PACKAGE to Suggests
  • --deb-systemd FILEPATH
    • Add FILEPATH as a systemd script
  • --[no-]deb-systemd-auto-start
    • Start service after install or upgrade
  • --[no-]deb-systemd-enable
    • Enable service on install or upgrade
  • --deb-systemd-path FILEPATH
    • Relative path to the systemd service directory
  • --[no-]deb-systemd-restart-after-upgrade
    • Restart service after upgrade
  • --deb-templates FILEPATH
    • Add FILEPATH as debconf templates file.
  • --deb-upstart FILEPATH
    • Add FILEPATH as an upstart script
  • --deb-upstream-changelog FILEPATH
    • Add FILEPATH as upstream changelog
  • --[no-]deb-use-file-permissions
    • Use existing file permissions when defining ownership and modes
  • --deb-user USER
    • The owner of files in this package

dir

This package type has no additional options

empty

This package type has no additional options

freebsd

  • --freebsd-origin ABI
    • Sets the FreeBSD 'origin' pkg field
  • --freebsd-osversion VERSION
    • Sets the FreeBSD 'version' pkg field, ie 12 or 13, use '*' for all.

gem

  • --gem-bin-path DIRECTORY
    • The directory to install gem executables
  • --gem-disable-dependency gem_name
    • The gem name to remove from dependency list
  • --[no-]gem-embed-dependencies
    • Should the gem dependencies be installed?
  • --[no-]gem-env-shebang
    • Should the target package have the shebang rewritten to use env?
  • --[no-]gem-fix-dependencies
    • Should the package dependencies be prefixed?
  • --[no-]gem-fix-name
    • Should the target package name be prefixed?
  • --gem-gem PATH_TO_GEM
    • The path to the 'gem' tool (defaults to 'gem' and searches your $PATH)
  • --gem-git-branch GIT_BRANCH
    • When using a git repo as the source of the gem instead of rubygems.org, use this git branch.
  • --gem-git-repo GIT_REPO
    • Use this git repo address as the source of the gem instead of rubygems.org.
  • --gem-package-name-prefix PREFIX
    • Name to prefix the package name with.
  • --gem-package-prefix NAMEPREFIX
    • (DEPRECATED, use --package-name-prefix) Name to prefix the package name with.
  • --[no-]gem-prerelease
    • Allow prerelease versions of a gem
  • --gem-shebang SHEBANG
    • Replace the shebang in the executables in the bin path with a custom string
  • --gem-stagingdir STAGINGDIR
    • The directory where fpm installs the gem temporarily before conversion. Normally a random subdirectory of workdir.
  • --[no-]gem-version-bins
    • Append the version to the bins

npm

  • --npm-bin NPM_EXECUTABLE
    • The path to the npm executable you wish to run.
  • --npm-package-name-prefix PREFIX
    • Name to prefix the package name with.
  • --npm-registry NPM_REGISTRY
    • The npm registry to use instead of the default.

osxpkg

  • --osxpkg-dont-obsolete DONT_OBSOLETE_PATH
    • A file path for which to 'dont-obsolete' in the built PackageInfo. Can be specified multiple times.
  • --osxpkg-identifier-prefix IDENTIFIER_PREFIX
    • Reverse domain prefix prepended to package identifier, ie. 'org.great.my'. If this is omitted, the identifer will be the package name.
  • --osxpkg-ownership OWNERSHIP
    • --ownership option passed to pkgbuild. Defaults to 'recommended'. See pkgbuild(1).
  • --[no-]osxpkg-payload-free
    • Define no payload, assumes use of script options.
  • --osxpkg-postinstall-action POSTINSTALL_ACTION
    • Post-install action provided in package metadata. Optionally one of 'logout', 'restart', 'shutdown'.

p5p

  • --p5p-group GROUP
    • Set the group to GROUP in the prototype file.
  • --[no-]p5p-lint
    • Check manifest with pkglint
  • --p5p-publisher PUBLISHER
    • Set the publisher name for the repository
  • --p5p-user USER
    • Set the user to USER in the prototype files.
  • --[no-]p5p-validate
    • Validate with pkg install
  • --p5p-zonetype ZONETYPE
    • Set the allowed zone types (global, nonglobal, both)

pacman

  • --pacman-compression COMPRESSION
    • The compression type to use, must be one of gz, bzip2, xz, zstd, none.
  • --pacman-group GROUP
    • The group owner of files in this package
  • --pacman-optional-depends PACKAGE
    • Add an optional dependency to the pacman package.
  • --[no-]pacman-use-file-permissions
    • Use existing file permissions when defining ownership and modes
  • --pacman-user USER
    • The owner of files in this package

pear

  • --pear-bin-dir BIN_DIR
    • Directory to put binaries in
  • --pear-channel CHANNEL_URL
    • The pear channel url to use instead of the default.
  • --[no-]pear-channel-update
    • call 'pear channel-update' prior to installation
  • --pear-data-dir DATA_DIR
    • Specify php dir relative to prefix if differs from pear default (pear/data)
  • --pear-package-name-prefix PREFIX
    • Name prefix for pear package
  • --pear-php-bin PHP_BIN
    • Specify php executable path if differs from the os used for packaging
  • --pear-php-dir PHP_DIR
    • Specify php dir relative to prefix if differs from pear default (pear/php)

pkgin

This package type has no additional options

pleaserun

  • --pleaserun-chdir CHDIR
    • The working directory used by the service
  • --pleaserun-name SERVICE_NAME
    • The name of the service you are creating
  • --pleaserun-user USER
    • The user to use for executing this program.

puppet

This package type has no additional options

python

  • --python-bin PYTHON_EXECUTABLE
    • The path to the python executable you wish to run.
  • --[no-]python-dependencies
    • Include requirements defined by the python package as dependencies.
  • --python-disable-dependency python_package_name
    • The python package name to remove from dependency list
  • --[no-]python-downcase-dependencies
    • Should the package dependencies be in lowercase?
  • --[no-]python-downcase-name
    • Should the target package name be in lowercase?
  • --python-easyinstall EASYINSTALL_EXECUTABLE
    • The path to the easy_install executable tool
  • --[no-]python-fix-dependencies
    • Should the package dependencies be prefixed?
  • --[no-]python-fix-name
    • Should the target package name be prefixed?
  • --python-install-bin BIN_PATH
    • (DEPRECATED, does nothing) The path to where python scripts should be installed to.
  • --python-install-data DATA_PATH
    • (DEPRECATED, does nothing) The path to where data should be installed to. This is equivalent to 'python setup.py --install-data DATA_PATH
  • --python-install-lib LIB_PATH
    • (DEPRECATED, does nothing) The path to where python libs should be installed to (default depends on your python installation). Want to find out what your target platform is using? Run this: python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()'
  • --[no-]python-internal-pip
    • Use the pip module within python to install modules - aka 'python -m pip'. This is the recommended usage since Python 3.4 (2014) instead of invoking the 'pip' script
  • --[no-]python-obey-requirements-txt
    • Use a requirements.txt file in the top-level directory of the python package for dependency detection.
  • --python-package-name-prefix PREFIX
    • Name to prefix the package name with.
  • --python-package-prefix NAMEPREFIX
    • (DEPRECATED, use --package-name-prefix) Name to prefix the package name with.
  • --python-pip PIP_EXECUTABLE
    • The path to the pip executable tool. If not specified, easy_install is used instead
  • --python-pypi PYPI_URL
    • PyPi Server uri for retrieving packages.
  • --python-scripts-executable PYTHON_EXECUTABLE
    • (DEPRECATED) Set custom python interpreter in installing scripts. By default distutils will replace python interpreter in installing scripts (specified by shebang) with current python interpreter (sys.executable). This option is equivalent to appending 'build_scripts --executable PYTHON_EXECUTABLE' arguments to 'setup.py install' command.
  • --python-setup-py-arguments setup_py_argument
    • (DEPRECATED) Arbitrary argument(s) to be passed to setup.py
  • --python-trusted-host PYPI_TRUSTED
    • Mark this host or host:port pair as trusted for pip

rpm

  • --rpm-attr ATTRFILE
    • Set the attribute for a file (%attr), e.g. --rpm-attr 750,user1,group1:/some/file
  • --[no-]rpm-auto-add-directories
    • Auto add directories not part of filesystem
  • --rpm-auto-add-exclude-directories DIRECTORIES
    • Additional directories ignored by '--rpm-auto-add-directories' flag
  • --[no-]rpm-autoprov
    • Enable RPM's AutoProv option
  • --[no-]rpm-autoreq
    • Enable RPM's AutoReq option
  • --[no-]rpm-autoreqprov
    • Enable RPM's AutoReqProv option
  • --rpm-changelog FILEPATH
    • Add changelog from FILEPATH contents
  • --rpm-compression none|xz|xzmt|gzip|bzip2
    • Select a compression method. gzip works on the most platforms.
  • --rpm-compression-level [0-9]
    • Select a compression level. 0 is store-only. 9 is max compression.
  • --rpm-defattrdir ATTR
    • Set the default dir mode (%defattr).
  • --rpm-defattrfile ATTR
    • Set the default file mode (%defattr).
  • --rpm-digest md5|sha1|sha256|sha384|sha512
    • Select a digest algorithm. md5 works on the most platforms.
  • --rpm-dist DIST-TAG
    • Set the rpm distribution.
  • --rpm-filter-from-provides REGEX
    • Set %filter_from_provides to the supplied REGEX.
  • --rpm-filter-from-requires REGEX
    • Set %filter_from_requires to the supplied REGEX.
  • --rpm-group GROUP
    • Set the group to GROUP in the %files section. Overrides the group when used with use-file-permissions setting.
  • --[no-]rpm-ignore-iteration-in-dependencies
    • For '=' (equal) dependencies, allow iterations on the specified version. Default is to be specific. This option allows the same version of a package but any iteration is permitted
  • --rpm-init FILEPATH
    • Add FILEPATH as an init script
  • --[no-]rpm-macro-expansion
  • --[no-]rpm-old-perl-dependency-name
    • Use older 'perl' depdency name. Newer Red Hat (and derivatives) use a dependency named 'perl-interpreter'.
  • --rpm-os OS
    • The operating system to target this rpm for. You want to set this to 'linux' if you are using fpm on OS X, for example
  • --rpm-posttrans FILE
    • posttrans script
  • --rpm-pretrans FILE
    • pretrans script
  • --rpm-rpmbuild-define DEFINITION
    • Pass a --define argument to rpmbuild.
  • --[no-]rpm-sign
    • Pass --sign to rpmbuild
  • --rpm-summary SUMMARY
    • Set the RPM summary. Overrides the first line on the description if set
  • --rpm-tag TAG
    • Adds a custom tag in the spec file as is. Example: --rpm-tag 'Requires(post): /usr/sbin/alternatives'
  • --rpm-trigger-after-install '[OPT]PACKAGE: FILEPATH'
  • --rpm-trigger-after-target-uninstall '[OPT]PACKAGE: FILEPATH'
  • --rpm-trigger-before-install '[OPT]PACKAGE: FILEPATH'
  • --rpm-trigger-before-uninstall '[OPT]PACKAGE: FILEPATH'
  • --[no-]rpm-use-file-permissions
    • Use existing file permissions when defining ownership and modes.
  • --rpm-user USER
    • Set the user to USER in the %files section. Overrides the user when used with use-file-permissions setting.
  • --[no-]rpm-verbatim-gem-dependencies
    • When converting from a gem, leave the old (fpm 0.4.x) style dependency names. This flag will use the old 'rubygem-foo' names in rpm requires instead of the redhat style rubygem(foo).
  • --rpm-verifyscript FILE
    • a script to be run on verification

sh

This package type has no additional options

snap

  • --snap-confinement CONFINEMENT
    • Type of confinement to use for this snap.
  • --snap-grade GRADE
    • Grade of this snap.
  • --snap-yaml FILEPATH
    • Custom version of the snap.yaml file.

solaris

  • --solaris-group GROUP
    • Set the group to GROUP in the prototype file.
  • --solaris-user USER
    • Set the user to USER in the prototype files.

tar

This package type has no additional options

virtualenv

  • --virtualenv-find-links PIP_FIND_LINKS
    • If a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory, then look for archives in the directory listing.
  • --[no-]virtualenv-fix-name
    • Should the target package name be prefixed?
  • --virtualenv-install-location DIRECTORY
    • DEPRECATED: Use --prefix instead. Location to which to install the virtualenv by default.
  • --virtualenv-other-files-dir DIRECTORY
    • Optionally, the contents of the specified directory may be added to the package. This is useful if the virtualenv needs configuration files, etc.
  • --virtualenv-package-name-prefix PREFIX
    • Name to prefix the package name with.
  • --virtualenv-pypi PYPI_URL
    • PyPi Server uri for retrieving packages.
  • --virtualenv-pypi-extra-url PYPI_EXTRA_URL
    • PyPi extra-index-url for pointing to your priviate PyPi
  • --[no-]virtualenv-setup-install
    • After building virtualenv run setup.py install useful when building a virtualenv for packages and including their requirements from requirements.txt
  • --[no-]virtualenv-system-site-packages
    • Give the virtual environment access to the global site-packages

zip

This package type has no additional options


Contributing (`docs/contributing.rst`)

Contributing/Issues

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See the Code of Conduct_ for details.

.. _Code of Conduct: https://github.com/jordansissel/fpm/blob/master/CODE_OF_CONDUCT.md

All contributions are welcome: ideas, patches, documentation, bug reports, complaints, and even something you drew up on a napkin :)

It is more important that you are able to contribute and get help if you need it than it is how you contribute or get help.

That said, some points to get started:

  • Have a problem you want FPM to solve for you? You can email the mailing list_, or join the IRC channel #fpm on irc.freenode.org, or email me personally ([email protected])
  • Have an idea or a feature request? File a ticket on github, or email the mailing list, or email me personally ([email protected]) if that is more comfortable.
  • If you think you found a bug, it probably is a bug. File it on github_ or send details to the mailing list_.
  • If you want to send patches, best way is to fork this repo and send me a pull request. If you don't know git, I also accept diff(1) formatted patches - whatever is most comfortable for you.
  • Want to lurk about and see what others are doing? IRC (#fpm on irc.freenode.org) is a good place for this as is the mailing list_.

.. _mailing list: https://groups.google.com/group/fpm-users
.. _github: https://github.com/jordansissel/fpm

Contributing changes by forking from GitHub

First, create a GitHub account if you do not already have one. Log in to
GitHub and go to the main FPM GitHub page.

At the top right, click on the button labeled "Fork". This will put a forked
copy of the main FPM repo into your account. Next, clone your account's GitHub
repo of FPM. For example:

text
$ git clone [email protected]:yourusername/fpm.git

Development Environment

If you don't already have the bundler gem installed, install it now:

text
$ gem install bundler

Now change to the root of the FPM repo and run:

text
$ bundle install

This will install all of the dependencies required for running FPM from source.
Most importantly, you should see the following output from the bundle command
when it lists the FPM gem:

text
...
Using json (1.8.1)
Using fpm (0.4.42) from source at .
Using hitimes (1.2.1)
...

If your system doesn't have bsdtar by default, make sure to install it or some
tests will fail:

text
apt-get install bsdtar || apt install libarchive-tools

yum install bsdtar

You also need these tools:

text
apt-get install lintian cpanminus

Next, run make in root of the FPM repo. If there are any problems (such as
missing dependencies) you should receive an error

At this point, the FPM command should run directly from the code in your cloned
repo. Now simply make whatever changes you want, commit the code, and push
your commit back to master.

If you think your changes are ready to be merged back to the main FPM repo, you
can generate a pull request on the GitHub website for your repo and send it in
for review.

Problems running bundle install?

If you are installing on Mac OS 10.9 (Mavericks) you will need to make sure that
you have the standalone command line tools separate from Xcode:

text
$ xcode-select --install

Finally, click the install button on the prompt that appears.

Editing Documentation

If you want to edit the documentation, here's a quick guide to getting started:

  • Install docker_.

  • All documentation is located in the docs folder. cd into the docs folder and run the following command once::

    make docker-prep

  • Once that is done, run make build whenever you want to build the site. It will generate the html in the _build/html directory.

  • You can use any tool like serve _build/html (npm package) or python -m http.server -d _build/html 5000 to serve the static html on your machine (http://localhost:5000).

.. _docker: https://docs.docker.com/engine/install/

Now you can simply make whatever changes you want, commit the code, and push your commit back to master.

If you think your changes are ready to be merged back to the main FPM repo, you can generate a pull request on the GitHub website for your repo and send it in for review.


Docker (`docs/docker.rst`)

FPM and Docker

Because fpm depends on so many underlying system tools, docker can
alleviate the need to install them locally.

An end user may use a docker container in lieu of installing
locally. And a developer can use docker to run the test suite.

Running FPM inside docker

First, build a container will all the dependencies::

make docker-release-everything

Now, run it as you would the fpm command. Note that you will have to
mount your source directly into the docker volume::

docker run -v $(pwd):/src fpm --help

As a full example::

mkdir /tmp/fpm-test
mkdir /tmp/fpm-test/files
touch /tmp/fpm-test/files/one
touch /tmp/fpm-test/files/two

docker run -v /tmp/fpm-test/files:/src -v /tmp/fpm-test:/out fpm -s dir -t tar -n example -p /out/out.tar .

tar tf /tmp/fpm-test/out.tar

Depending on your needs, you will have to adjust the volume mounts and
relative paths to fit your particular situation.

Running rpsec inside docker

The Makefile provides some targets for testing. They will build a
docker container with the dependencies, and then invoked rspec
inside it. The makefile uses a sentinel file to indicate that the
docker image has been build, and can be reused.

make docker-test-everything

How does this work

The Dockerfile makes heavy use of multistage
builds. This allows the various output containers to build on the same
earlier stages.

There are two base images. A minimal image, which contains
compiled dependencies and ruby. And an everything image which brings
in scripting systems like python and perl. These are split to
allow a smaller minimal image in cases where building scripting
language packages are not needed.

The Dockerfile the argument BASE_ENV to specify what base image to
use. This can be set to either minimal or everything. If
unspecified, it defaults to everything

We want to use the same set of base images for both the rspec
testing, as well as the run time containerization. We do this by using
the TARGET argument to select which container to build.

The makefile encodes this logic with two pattern rules.


Getting Started (`docs/getting-started.rst`)

Getting Started

FPM takes your program and builds packages that can be installed easily on various operating systems.

Understanding the basics of FPM

The fpm command takes in three arguments:

  • The type of sources to include in the package
  • The type of package to output
  • The sources themselves

The source could be a:

  • file OR a directory with various files needed to run the program - dir
  • nodejs (npm) package - npm
  • ruby (gem) package - gem
  • python (using easy_install or a local setup.py) package - python
  • python virtualenv - virtualenv
  • pear package - pear
  • perl (cpan) module - cpan
  • .deb package - deb
  • .rpm package - rpm
  • pacman (.pkg.tar.zst) package - pacman
  • .pkgin package - pkgin
  • package without any files (useful for meta packages) - empty

The target (output package format) could be:

  • A .deb package (for Debian and Debian-based) - deb
  • A .rpm package (for RedHat based) - rpm
  • A .solaris package (for Solaris) - solaris
  • A .freebsd package (for FreeBSD) - freebsd
  • MacOS .pkg files - osxpkg
  • Pacman packages (.pkg.tar.zst) (for Arch Linux and Arch-based) - pacman
  • A puppet module - puppet
  • A p5p module - p5p
  • A self-extracting installer - sh
  • A tarfile that can be extracted into the root of any machine to install the program - tar
  • A zipfile that can be extracted into the root of any machine to install the program - zip
  • A directory that can be copied to the root of any machine to install the program - dir

Given a source and a target, FPM can convert all the source files into a package of the target format.

Using it to package an executable

To simplyify things a bit, let's take an example. Suppose you have a bash script that prints 'Hello, world!' in multiple colors when it is run::

text
--- File: hello-world

#!/usr/bin/env bash

#
# == hello-world 0.1.0 ==
#

echo "Hello, world!" | lolcat

Let's say you even wrote a manpage (manual page) for it::

text
--- File: hello-world.1

.TH HELLO WORLD "1" "July 2021" "hello-world 0.1.0" "User Commands"
.SH NAME
hello-world \- manual page for hello-world 0.1.0
.SH DESCRIPTION
.IP
USAGE: hello-world
.SH "SEE ALSO"
.IP
Website: https://example.com/hello-world
.SH "OTHER"
.IP
Made by You The Amazing Person <you are an amazing person at example dot com>
.IP
This program is distributed under the AGPL 3.0 license.

Now you want to package this script and its manual page and distribute to the world as a .deb file. To do that using FPM, here is the command we need to run::

text
fpm \
  -s dir -t deb \
  -p hello-world-0.1.0-1-any.deb \
  --name hello-world \
  --license agpl3 \
  --version 0.1.0 \
  --architecture all \
  --depends bash --depends lolcat \
  --description "Say hi!" \
  --url "https://example.com/hello-world" \
  --maintainer "You The Amazing Person <you are an amazing person at example dot com>" \
  hello-world=/usr/bin/hello-world hello-world.1=/usr/share/man/man1/hello-world.1

If you have installed FPM, and have the hello-world script in your current directory, you should be able to see a hello-world-0.1.0-1-any.deb file in your current directory after you run this command.

Let's break the command down, option by option:

  • -s dir [required]

    • The -s option tells FPM what sources to use to build the package.
    • In this case [dir], we are telling FPM that we want to build a package from source files that we have on our computer.
  • -t deb [required]

    • The -t option tells FPM what type of package to build (target package).
    • In this case [deb], we are telling FPM that we want to build a .deb package, that can be installed on Debian and Debian-based operating systems, such as Ubuntu.
  • -p hello-world-0.1.0-1-any.deb

    • The -p option tells FPM what to name the package once it has been created.
    • In this case, we name it -<version>--<architecture>.<file extension>, but you can call it whatever you want.
  • --name hello-world

    • The name of the program that FPM is packaging.
    • In this case, it is hello-world.
  • --license agpl3

    • The license the program uses
    • In this case, we use the AGPL 3.0 license (If you have a custom license, use custom instead of AGPL3)
  • --version 0.1.0

    • The version of the program
    • In this case, the version is 0.1.0
  • --architecture all

    • The architecture required to run the program [valid values are: x86_64/amd64, aarch64, native (current architecture), all/noarch/any]
    • In this case, the program is just a bash script, so we can run on all architectures
  • --depends bash --depends lolcat

    • The dependencies the program needs to run
    • In this case, we need bash and lolcat - bash to run the program itself, and lolcat to display the text in multiple colors
  • --description "Say hi!"

    • The program description
    • In this case, it is Say hi!
  • --url "https://example.com/hello-world"

    • The URL to the program``s website or URL to program source
  • --maintainer "You The Amazing Person <you are an amazing person at example dot com>"

    • The name and (optionally) email of the person creating the package
  • hello-world=/usr/bin/hello-world hello-world.1=/usr/share/man/man1/hello-world.1 [required]

    • This is the most important part. It tells FPM which file (relative paths from the current directory) should be installed to which path in the machine.
    • In this case, we want the user to be able to execute the command hello-world from terminal; so we put the hello-world script in the user's PATH, that is, in /usr/bin/. We also want the user to access the manual page using man hello-world, so we put the manpage (hello-world.1) in the /usr/share/man/man1/ directory.

For more detailed documentation about each and every flag (there are some package-type-specific flags that exist as well), run fpm --help.

Using it to package an existing package

We've seen how to package a program if you have an executable, but what if you already have a program that you have not written as an executable script, but in a language like nodejs instead? FPM can help here too. It can take any nodejs package, ruby gem or even a python package and turn it into a deb, rpm, pacman, etc. package. Here are a couple of examples.

Packaging a NodeJS application that's already on NPM

text
.. note::
	This assumes you have nodejs and npm already installed on your machine.

Run the following command::

	fpm -s npm -t <deb/rpm/pacman/solaris/freebsd/osxpkg/tar> <npm-package-name>

E.g.: To package yarn for Arch Linux::

	fpm -s npm -t pacman yarn

This will download the latest ``yarn`` package from npm.com and convert it to a .pkg.tar.zst (pacman) package. It will create a package named โ€˜node-yarn-VERSION_ARCH.debโ€™ with the appropriate version/arch in place. FPM will automatically pick the package name, version, maintainer, section, homepage, and description all from the npm package itself. Nothing for you to worry about :)

Packaging a ruby gem
~~~~~~~~~~~~~~~~~~~~

.. note::
	This assumes you have ruby already installed on your machine.

Run the following command::

	fpm -s gem -t <deb/rpm/pacman/solaris/freebsd/osxpkg/tar> <gem-name>

E.g.: To package FPM using FPM for Debian::

	# FPM-ception :D
	fpm -s gem -t deb fpm

This will download the latest ``fpm`` rubygem from rubygems.org and convert it to a .deb. It will create a package named โ€˜rubygem-fpm-VERSION_ARCH.debโ€™ with the appropriate version/arch in place. FPM will automatically pick the package name, version, maintainer, section, homepage, and description all from the rubygem itself. Nothing for you to worry about :)

Packaging a CPAN module
~~~~~~~~~~~~~~~~~~~~~~~

.. note::
	This assumes you have perl already installed on your machine.

Run the following command package the perl Fennec module for Debian::

	fpm -s cpan -t deb Fennec

This will download Fennec from CPAN and build a Debian package of the Fennec Perl module locally.

By default, FPM believes the following to be true:

* That your local Perl lib path will be the target Perl lib path
* That you want the package name to be prefixed with the word perl
* That the dependencies from CPAN are valid and that the naming scheme for those dependencies are prefixed with perl

If you wish to change any of the above, use the following::

	fpm -t deb -s cpan -โ€“cpan-perl-lib-path /usr/share/perl5 Fennec

	fpm -t deb -s cpan --cpan-package-name-prefix fubar /usr/share/perl5 Fennec

The first command will change the target path to where perl will be. Your local perl install may be /opt/usr/share/perl5.10 but the package will be constructed so that the module will be installed to /usr/share/perl5

The second command will change the prefix of the package, i.e., from perl-Fennec to fubar-Fennec.

Configuration file
-------------------

If you are using FPM in to build packages for multiple targets and keep repeating several options (like version, description, name, license, maintainer, url, architecture, files to package, etc.), you can add a ``.fpm`` file in your working directory, with a list of options as well as arguments that you want to pass to the CLI. Extending the example of the hello-world program, say we want to package it as a .deb and a .rpm. We could create the following .fpm file::

	--- File: .fpm

	-s dir
	--name hello-world
	--license agpl3
	--version 0.1.0
	--architecture all
	--depends bash --depends lolcat
	--description "Say hi!"
	--url "https://example.com/hello-world"
	--maintainer "You The Amazing Person <you are an amazing person at example dot com>"

	hello-world=/usr/bin/hello-world hello-world.1=/usr/share/man/man1/hello-world.1

.. note::
	CLI flags will override those in the ``.fpm`` file.

Meanwhile, we could run the following commands in terminal to build the .deb and .rpm::

	fpm -t deb -p hello-world-0.1.0-1-any.deb

	fpm -t rpm -p hello-world-0.1.0-1-any.rpm

Tada! You will have a .deb (for Debian) and .rpm (for RedHat), with no unnecessary duplication of metadata. You can put any other valid CLI options in the ``.fpm`` file too.

For more detailed information regarding all CLI flags, see the :doc:`CLI reference. <cli-reference>`

---

### Index (`docs/index.rst`)

fpm - packaging made simple
===========================

.. note::
  The documentation here is a work-in-progress; it is by no means extensive. If you want to contribute new docs or report problems, you are invited to do so on `the project issue tracker`_.

Welcome to the fpm documentation!

fpm is a tool which lets you easily create packages for Debian, Ubuntu, Fedora, CentOS, RHEL, Arch Linux, FreeBSD, macOS, and more!

fpm isn't a new packaging system, it's a tool to help you make packages for existing systems with less effort. It does this by offering a command-line interface to allow you to create packages easily. Here are some examples using fpm:

* ``fpm -s npm -t deb express`` -- Make a Debian package for the nodejs `express` library
* ``fpm -s cpan -t rpm Fennec`` -- Make an rpm for the perl Fennec module
* ``fpm -s dir -t pacman -n fancy ~/.zshrc`` -- Put your ~/.zshrc into an Arch Linux pacman package named "fancy"
* ``fpm -s python -t freebsd Django`` -- Create a FreeBSD package containing the Python Django library
* ``fpm -s rpm -t deb mysql.rpm`` -- Convert an rpm to deb

This project has a few important principles which guide development:

* Community: If a newbie has a bad time, it's a bug.
* Engineering: Make it work, make it right, then make it fast.
* Capabilities: If it doesn't do a thing today, we can make it do it tomorrow.

`Install fpm `_ and you'll quickly begin making packages for whatever you need!

You can view the changelog `here`_.

Table of Contents
-----------------

.. toctree::
	:includehidden:

	installation
	getting-started
	packaging-types
	cli-reference
	docker
	contributing
	changelog

.. _here: /changelog.html

.. _the project issue tracker: https://github.com/jordansissel/fpm/issues

---

### Installation (`docs/installation.rst`)

Installation
============

FPM is written in ruby and can be installed using `gem`. For some package formats (like rpm and snap), you will need certain packages installed to build them.

Installing FPM
--------------

.. note::
	You must have ruby installed on your machine before installing fpm. `Here`_ are instructions to install Ruby on your machine.

.. _Here: https://www.ruby-lang.org/en/documentation/installation/

You can install FPM with the ``gem`` tool::

    gem install fpm

To make sure fpm is installed correctly, try running the following command::

    fpm --version

You should get some output like this, although the exact output will depend on which version of FPM you have installed.::

    % fpm --version
    1.17.0

Now you can go on to `using FPM! <getting-started.html>`_

Installing optional dependencies
--------------------------------

.. warning::
	This section may be imperfect; please make sure you are installing the right package for your OS.

Some package formats require other tools to be installed on your machine to be built; especially if you are building a package for another operating system/distribution.

* RPM: rpm/rpm-tools/rpm-build [This dependency might be removed in the future, see `issue #54`_ on github]
* Snap: squashfs/squashfs-tools
* Python: a requirements.txt file is provided to list Python dependencies: `$ pip install -r requirements.txt`

.. _issue #54: https://github.com/jordansissel/fpm/issues/54

.. note::
	You will not be able to build an osxpkg package (.pkg) for MacOS unless you are running MacOS.

Here are instructions to install these dependencies on your machine:

On OSX/macOS::

    brew install rpm squashfs

On Arch Linux and Arch-based systems (Manjaro, EndeavourOS, etc)::

    pacman -S rpm-tools squashfs-tools

On Debian and Debian-based systems (Ubuntu, Linux Mint, Pop!_OS, etc)::

    apt-get install squashfs-tools

On Red Hat systems (Fedora 22 or older, CentOS, Rocky Linux, etc)::

    yum install rpm-build squashfs-tools

On Fedora 23 or newer::

    dnf install rpm-build squashfs-tools

On Oracle Linux 7.x systems::

    yum-config-manager --enable ol7_optional_latest
    yum install rpm-build squashfs-tools

---

### Packaging Types (`docs/packaging-types.rst`)

Packaging Types
===============

.. toctree::
	:includehidden:
	:glob:

	packages/*

---

### Packages Apk (`docs/packages/apk.rst`)

apk - Alpine package format
===========================

Supported Uses in FPM
---------------------

fpm supports using ``apk`` only as an output type. This means you can create ``apk`` packages from input types like ``deb``, ``dir``, or ``npm``

apk-specific command line flags
-------------------------------

.. include:: cli/apk.rst

---

### Packages Cpan (`docs/packages/cpan.rst`)

cpan - Perl packages from CPAN
===============================

Supported Uses in FPM
---------------------

fpm supports using ``cpan`` only as an input type. This means you can convert
``cpan`` input packages to output packages like ``deb``, ``rpm``, and more.

Arguments when used as input type
---------------------------------

Any number of arguments are supported and behave as follows:

* A name to search on MetaCPAN_. If a module is found on MetaCPAN_, it will be downloaded and used when building the package.
* or, a local directory containing a Perl module to build. 

.. _MetaCPAN: https://metacpan.org/

Sample Usage
------------

Let's take the `Regexp::Common <https://metacpan.org/pod/Regexp::Common>`_ Perl module and package it as a deb. We can let fpm do the hard work here of finding the module on cpan and downloading it::

  % fpm -s cpan -t deb Regexp::Common
  Downcasing provides 'perl-Regexp-Common' because deb packages  don't work so good with uppercase names {:level=>:warn}
  Downcasing provides 'perl-Regexp-Common-Entry' because deb packages  don't work so good with uppercase names {:level=>:warn}
  Debian tools (dpkg/apt) don't do well with packages that use capital letters in the name. In some cases it will automatically downcase them, in others it will not. It is confusing. Best to not use any capital letters at all. I have downcased the package name for you just to be safe. {:oldname=>"perl-Regexp-Common", :fixedname=>"perl-regexp-common", :level=>:warn}
  Debian packaging tools generally labels all files in /etc as config files, as mandated by policy, so fpm defaults to this behavior for deb packages. You can disable this default behavior with --deb-no-default-config-files flag {:level=>:warn}
  Created package {:path=>"perl-regexp-common_2017060201_all.deb"}

Fpm did a bunch of nice work for you. First, it searched MetaCPAN_ for Regexp::Common. Then it downloaded the latest version. If you wanted to specify a version, you can use the ``-v`` flag, such as ``-v 2016060201``.

In the example above, a few warning messages appear. Fpm's job is to help you convert packages. In this case, we're converting a Perl module named "Regexp::Common" to a Debian package. In this situation, we need to make sure our Debian package is accepted by Debian's tools! This means fpm will do the following:

* Debian package names appear to all use lowercase names, so fpm does this for you.
* Debian package names also cannot have "::" in the names, so fpm replaces these with a dash "-"

Let's try to use our new package! First, installing it::

  % sudo dpkg -i perl-regexp-common_2017060201_all.deb
  Selecting previously unselected package perl-regexp-common.
  (Reading database ... 81209 files and directories currently installed.)
  Preparing to unpack perl-regexp-common_2017060201_all.deb ...
  Unpacking perl-regexp-common (2017060201) ...
  Setting up perl-regexp-common (2017060201) ...
  Processing triggers for man-db (2.9.1-1) ...

And try to use it. Let's ask Regexp::Common for a regular expression that matches real numbers::

  % perl -MRegexp::Common -e 'print $RE{num}{real}'
  (?:(?i)(?:[-+]?)(?:(?=[.]?[0123456789])(?:[0123456789]*)(?:(?:[.])(?:[0123456789]{0,}))?)(?:(?:[E])(?:(?:[-+]?)(?:[0123456789]+))|))

Nice!

Fun Examples
------------

.. note::
  Do you have any examples you want to share that use the ``cpan`` package type? Share your knowledge here: https://github.com/jordansissel/fpm/issues/new

cpan-specific command line flags
--------------------------------

.. include:: cli/cpan.rst

---

### Packages Deb (`docs/packages/deb.rst`)

deb - Debian package format
===========================

Supported Uses in FPM
---------------------

fpm supports input and output for Debian package (deb). This means you can read a deb and convert it to a different output type (such as a `dir` or `rpm`). It also means you can create a deb package.

Arguments when used as input type
---------------------------------

For the sample command reading a deb file as input and outputting an rpm package::

	fpm -s deb -t rpm file.deb

The argument is used as a file and read as a debian package file.

Sample Usage
------------

Let's create a Debian package of Hashicorp's Terraform. To do this, we'll need to download it and put the files into a Debian package::

    # Download Terraform 1.0.10
    % wget https://releases.hashicorp.com/terraform/1.0.10/terraform_1.0.10_linux_amd64.zip

The Terraform release .zip file contains a single file, `terraform` itself. You can see the files in this zip by using `unzip -l`::

    % unzip -l ~/build/z/terraform_1.0.10_linux_amd64.zip
    Archive:  /home/jls/build/z/terraform_1.0.10_linux_amd64.zip
      Length      Date    Time    Name
    ---------  ---------- -----   ----
    79348596  2021-10-28 07:15   terraform
    ---------                     -------
    79348596                     1 file

We can use fpm to convert this zip file into a debian package with one step::

    % fpm -s zip -t deb --prefix /usr/bin -n terraform -v 1.0.10 terraform_1.0.10_linux_amd64.zip
    Created package {:path=>"terraform_1.0.10_amd64.deb"}

Nice! We just converted a zip file into a debian package. Let's talk through the command-line flags here:

* ``-s zip`` tells fpm to use "zip" as the input type. This allows fpm to read zip files.
* ``-t deb`` tells fpm to output a Debian package.
* ``--prefix /usr/bin`` tells fpm to move all files in the .zip file to the /usr/bin file path. In this case, it results in a single file in the path `/usr/bin/terraform`
* ``-n terraform`` names the package "terraform"
* ``-v 1.0.10`` sets the package version. This is useful to package systems when considering whether a given package is an upgrade, downgrade, or already installed.
* Finally, the last argument, `terraform_1.0.10_linux_amd64.zip`. This is given to the fpm to process as a zip file.

You can inspect the package contents with `dpkg --contents terraform_1.0.10_amd64.deb`::

    % dpkg --contents terraform_1.0.10_amd64.deb
    drwxr-xr-x 0/0               0 2021-11-02 23:33 ./
    drwxr-xr-x 0/0               0 2021-11-02 23:33 ./usr/
    drwxr-xr-x 0/0               0 2021-11-02 23:33 ./usr/share/
    drwxr-xr-x 0/0               0 2021-11-02 23:33 ./usr/share/doc/
    drwxr-xr-x 0/0               0 2021-11-02 23:33 ./usr/share/doc/terraform/
    -rw-r--r-- 0/0             141 2021-11-02 23:33 ./usr/share/doc/terraform/changelog.gz
    drwxr-xr-x 0/0               0 2021-11-02 23:33 ./usr/bin/
    -rwxr-xr-x 0/0        79348596 2021-10-28 07:15 ./usr/bin/terraform

The ``changelog.gz`` file is a recommended Debian practice for packaging. FPM will provide a generated changelog for you, by default. You can provide your own with the ``--deb-changelog`` flag.

Lets install our terraform package and try it out::

    % sudo apt install ./terraform_1.0.10_amd64.deb
    ...

    % dpkg -l terraform
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                     Version           Architecture      Description
    +++-========================-=================-=================-=====================================================
    ii  terraform                1.0.10            amd64             no description given

    % terraform -version
    Terraform v1.0.10
    on linux_amd64

You may remove the package at any time::

    % sudo apt remove terraform
    ...
    Removing terraform (1.0.10) ...


Fun Examples
------------

Hi! The fpm project would love to have any fun examples you have for using this package type. Please consider contributing your ideas by submitting them on the fpm issue tracker: https://github.com/jordansissel/fpm/issues/new

Changing an existing deb
~~~~~~~~~~~~~~~~~~~~~~~~

fpm supports deb as both an input and output type (``-s`` and ``-t`` flags), so you can use this to modify an existing deb.

For example, let's create an deb to use for our example::

  % fpm -s empty -t deb -n example
  Created package {:path=>"example_1.0_amd64.deb"}

Lets say we made a mistake and want to rename the package::

  % fpm -s deb -t deb -n newname example_1.0_amd64.deb
  Created package {:path=>"newname_1.0_amd64.deb"}

And maybe the architecture is wrong. fpm defaulted to amd64 (what fpm calls
"native"), and we really want what Debian calls "all"::

  % fpm -s deb -t deb -a all newname_1.0_amd64.deb
  Created package {:path=>"newname_1.0_all.deb"}

Deb-specific command line flags
-------------------------------

.. include:: cli/deb.rst

---

### Packages Dir (`docs/packages/dir.rst`)

dir - Local Files
=================

Supported Uses in FPM
---------------------

fpm supports using ``dir`` as an input type and output type. This means you can use ``dir`` to put files into other package types (like Debian or Red Hat packages). You can also use this as an output type to extract files from packages.

Arguments when used as input type
---------------------------------

Any number of arguments are supported and behave as follows:

1) A path to a local file or directory will be put into the output package as-is with the same path, contents, and metadata (file owner, modification date, etc)
2) A syntax of "localpath=destinationpath" to copy local paths into the output package with the destination path.

The local file paths are modified by the ``--chdir`` flag. The destination file paths are modified by the ``--prefix`` flag.

Sample Usage
------------

For this example, let's look at packaging the Kubernetes tool, ``kubectl``. The installation for ``kubectl`` recommends downloading a pre-compiled binary. Let's do this and then package it into a Debian package.

First, we download the ``kubectl`` binary, according to the kubernetes documentation for kubectl installation on Linux::

  # Query the latest version of kubectl and store the value in the 'version' variable
  % version="$(curl -L -s https://dl.k8s.io/release/stable.txt)"

  # Download the Linux amd64 binary
  % curl -LO "https://dl.k8s.io/release/${version}/bin/linux/amd64/kubectl"

  # Make it executable
  % chmod 755 kubectl

The above shell will find the latest version of ``kubectl`` and download it. We'll use the file and the version number next to make our package::

  # Create the package that installs kubectl as /usr/bin/kubectl
  % fpm -s dir -t deb -n kubectl -a amd64 -v ${version#v*} kubectl=/usr/bin/kubectl
  Created package {:path=>"kubectl_v1.22.3_amd64.deb"}

.. note::
  We use ``${version#v*}`` in our shell to set the package version. This is
  because Kuberenetes versions have a text that starts with "v" and this is not
  valid in Debian packages. This will turn "v1.2.3" into "1.2.3" for our package.

Now we can check our package to make sure it looks the way we want::

  % dpkg --contents kubectl_1.22.3_amd64.deb
  [ ... output abbreviated for easier reading ... ]
  -rw-r--r-- 0/0        46907392 2021-11-05 20:09 ./usr/bin/kubectl

  % dpkg --field kubectl_1.22.3_amd64.deb Package Version Architecture
  Package: kubectl
  Version: 1.22.3
  Architecture: amd64

And install it to test things and make sure it's what we wanted::

  % sudo dpkg -i kubectl_1.22.3_amd64.deb
  Selecting previously unselected package kubectl.
  (Reading database ... 58110 files and directories currently installed.)
  Preparing to unpack kubectl_1.22.3_amd64.deb ...
  Unpacking kubectl (1.22.3) ...
  Setting up kubectl (1.22.3) ...

And try to use it::

  % which kubectl
  /usr/bin/kubectl

  % kubectl version
  Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.3", GitCommit:"c92036820499fedefec0f847e2054d824aea6cd1", GitTreeState:"clean", BuildDate:"2021-10-27T18:41:28Z", GoVersion:"go1.16.9", Compiler:"gc", Platform:"linux/amd64"}

Cool :)

Fun Examples
------------

.. note::
  Do you have any examples you want to share that use the ``dir`` package type? Share your knowledge here: https://github.com/jordansissel/fpm/issues/new

---

### Packages Empty (`docs/packages/empty.rst`)

empty - A package with no files
===============================

Supported Uses in FPM
---------------------

fpm supports using ``empty`` only as an input type.  

Arguments when used as input type
---------------------------------

Extra arguments are ignored for this type. As an example, where with ``fpm -s dir ...`` the arguments are file paths, ``fpm -s empty`` takes no input arguments because there's no file contents to use.

Sample Usage
------------

The ``empty`` package type is great for creating "meta" packages which are used to group dependencies together.

For example, if you want to make it easier to install a collection of developer tools, you could create a single package that depends on all of your desired developer tools. 

Let's create a Debian package named 'devtools' which installs the following:

* git
* curl
* nodejs

Here's the fpm command to do this::

  % fpm -s empty -t rpm -n devtools -a all -d git -d curl -d nodejs
  Created package {:path=>"devtools-1.0-1.noarch.rpm"}

We can check the dependencies on this package::

  % rpm -qp devtools-1.0-1.noarch.rpm --requires
  curl
  git
  nodejs
  rpmlib(CompressedFileNames) <= 3.0.4-1
  rpmlib(PayloadFilesHavePrefix) <= 4.0-1

And see that there are no files::

  % rpm -ql devtools-1.0-1.noarch.rpm
  (contains no files)


Fun Examples
------------

Hi! The fpm project would love to have any fun examples you have for using this package type. Please consider contributing your ideas by submitting them on the fpm issue tracker: https://github.com/jordansissel/fpm/issues/new

---

### Packages Freebsd (`docs/packages/freebsd.rst`)

freebsd - FreeBSD pkg
===============================

Supported Uses in FPM
---------------------

fpm supports using ``freebsd`` only as an output type. This means you can create ``freebsd`` packages from input types like ``deb``, ``dir``, or ``npm``

freebsd-specific command line flags
-----------------------------------

.. include:: cli/freebsd.rst

---

### Packages Gem (`docs/packages/gem.rst`)

gem - Ruby's rubygem packages
=============================

Supported Uses in FPM
---------------------

fpm supports using ``gem`` only as an input type. This means you can convert
``gem`` input packages to output packages like ``deb``, ``rpm``, and more.

gem-specific command line flags
-------------------------------

.. include:: cli/gem.rst

---

### Packages Npm (`docs/packages/npm.rst`)

npm - Packages for NodeJS
===============================

Supported Uses in FPM
---------------------

fpm supports using ``npm`` only as an input type.

Arguments when used as input type
---------------------------------

Any number of arguments are supported and behave as follows:

* ``name@version`` -- a specific named package at the given version.
* ``name`` -- the name of a node package. In this use, the ``--version`` flag is used to pick the version to download. If no version is given, the latest version of the package is downloaded.

Sample Usage
------------

You'll need ``npm`` installed for this example.

Let's turn the ``ascii-art`` npm package into a Debian package. For this example, we'll pick a specific version, 2.8.5::

  % fpm --debug -s npm -t deb --depends nodejs [email protected]
  Created package {:path=>"node-ascii-art_2.8.5_amd64.deb"}

Fpm uses ``npm`` to download the correct package. Additionally, the package name is given a ``node-`` prefix because this is common in distribution packages to prefix a library with the platform name, such as ``python-foo`` or ``node-foo``.

It also parses the package's ``package.json`` to collect any useful data such as the package name, author, homepage, description, etc::

  % dpkg --field node-ascii-art_2.8.5_amd64.deb Package Version Vendor Homepage Description
  Package: node-ascii-art
  Version: 2.8.5
  Vendor: Abbey Hawk Sparrow <@khrome>
  Homepage: git://github.com/khrome/ascii-art.git
Let's install the package and try to use it::

  % sudo apt-get install ./node-ascii-art_2.8.5_amd64.deb

And now we can use this package::

  % ascii-art text -F Doom "Hello World"
   _   _        _  _          _    _               _      _
  | | | |      | || |        | |  | |             | |    | |
  | |_| |  ___ | || |  ___   | |  | |  ___   _ __ | |  __| |
  |  _  | / _ \| || | / _ \  | |/\| | / _ \ | '__|| | / _` |
  | | | ||  __/| || || (_) | \  /\  /| (_) || |   | || (_| |
  \_| |_/ \___||_||_| \___/   \/  \/  \___/ |_|   |_| \__,_|

Fpm asked ``npm`` where to install things using ``npm prefix -g``. On my system, this caused the package to install to ``/usr/local/lib/node_modules``. You can change the default prefix with the fpm ``--prefix`` flag or by changing the default global prefix in the ``npm`` tool.

Let's try to invoke ``ascii-art`` from node::

  % export NODE_PATH=/usr/local/lib/node_modules
  % node
  > let art = require("ascii-art")
  > art.font("Hello", "Doom", (err, rendered) => console.log(rendered))
   _   _        _  _
  | | | |      | || |
  | |_| |  ___ | || |  ___
  |  _  | / _ \| || | / _ \
  | | | ||  __/| || || (_) |
  \_| |_/ \___||_||_| \___/

Nice :)

Fun Examples
------------

.. note::
  Do you have any examples you want to share that use the ``npm`` package type? Share your knowledge here: https://github.com/jordansissel/fpm/issues/new

npm-specific command line flags
-------------------------------

.. include:: cli/npm.rst

---

### Packages Osxpkg (`docs/packages/osxpkg.rst`)

osxpkg - Apple macOS and OSX packages
=====================================

Supported Uses in FPM
---------------------

fpm supports input and output for Apple's package files. These files typically
end in ".pkg". This means you can read a ``.pkg`` file and convert it to a different
output type (such as a `dir` or `rpm`). It also means you can create a ``.pkg``
package file.

osxpkg-specific command line flags
----------------------------------

.. include:: cli/osxpkg.rst

---

### Packages P5p (`docs/packages/p5p.rst`)

p5p - Oracle Solaris 11 p5p packages
====================================

This package format for the Solaris Image Packaging System (IPS) and should be
useful for OpenSolaris, Solaris 11, and Illumos.

Supported Uses in FPM
---------------------

fpm supports using ``p5p`` only as an output type. This means you can create ``p5p`` packages from input types like ``deb``, ``dir``, or ``npm``

p5p-specific command line flags
-------------------------------

.. include:: cli/p5p.rst

---

### Packages Pacman (`docs/packages/pacman.rst`)

pacman - Arch Linux package format
==================================

Supported Uses in FPM
---------------------

fpm supports input and output for Arch Linux's package format, pacman. This means you can read a pacman and convert it to a different output type (such as a `dir` or `rpm`). It also means you can create a pacman package.

pacman-specific command line flags
----------------------------------

.. include:: cli/pacman.rst

---

### Packages Pear (`docs/packages/pear.rst`)

pear - PHP PEAR Packages
========================

Supported Uses in FPM
---------------------

fpm supports using ``pear`` only as an input type. This means you can convert
``pear`` input packages to output packages like ``deb``, ``rpm``, and more.

pear-specific command line flags
--------------------------------

.. include:: cli/pear.rst

---

### Packages Pkgin (`docs/packages/pkgin.rst`)

pkgin - NetBSD's pkgsrc binary packages
=======================================

Supported Uses in FPM
---------------------

fpm supports using ``pkgin`` only as an output type. This means you can create ``pkgin`` packages from input types like ``deb``, ``dir``, or ``npm``

pkgin-specific command line flags
---------------------------------

.. include:: cli/pkgin.rst

---

### Packages Pleaserun (`docs/packages/pleaserun.rst`)

pleaserun - Pleaserun services
==============================

Pleaserun helps generate service definitions for a variety of service manangers
such as systemd and sysv.

When used as an input, fpm will generate a package that include multiple service
definitions, one for each type (systemd, sysv, etc). At package installation, the package
will attempt to detect the best service manager used on the system and will
install only that definition.

You can learn more on the project website: https://github.com/jordansissel/pleaserun#readme

Supported Uses in FPM
---------------------

fpm supports using ``pleaserun`` only as an input type. This means you can convert
``pleaserun`` input packages to output packages like ``deb``, ``rpm``, and more.

pleaserun-specific command line flags
-------------------------------------

.. include:: cli/pleaserun.rst

---

### Packages Puppet (`docs/packages/puppet.rst`)

puppet - Puppet Manifests (deprecated)
======================================

Note: This package type hasn't been maintained since 2012 and generates puppet
manifests that target Puppet 2.4 or 3.x.

Supported Uses in FPM
---------------------

fpm supports using ``puppet`` only as an output type. This means you can create ``puppet`` packages from input types like ``deb``, ``dir``, or ``npm``

puppet-specific command line flags
----------------------------------

.. include:: cli/puppet.rst

---

### Packages Python (`docs/packages/python.rst`)

python - Python packages, PyPI, etc
===================================

Supported Uses in FPM
---------------------

fpm supports using ``python`` only as an input type. This means you can convert
``python`` input packages to output packages like ``deb``, ``rpm``, and more.

python-specific command line flags
----------------------------------

.. include:: cli/python.rst

---

### Packages Rpm (`docs/packages/rpm.rst`)

rpm - RedHat Package Manager
============================

rpm is the package format used on RedHat Enterprise (RHEL), Fedora, CentOS, and
a number of other Linux distributions.
 
You may be familiar with tools such as `dnf` and `yum` for installing packages from repositories. The package files that these tools install are rpms.

Supported Uses in FPM
---------------------

fpm supports input and output for rpms. This means you can read an rpm and convert it to a different output type (such as a `dir` or `deb`). It also means you can write an rpm.

Arguments when used as input type
---------------------------------

For the sample command reading an rpm as input and outputting a debian package::

	fpm -s rpm -t deb file.rpm

The the argument is used as a file and read as an rpm.

Sample Usage
------------

Create a package with no files but having dependencies::

	% fpm -s empty -t rpm -n example --depends nginx
	Created package {:path=>"example-1.0-1.x86_64.rpm"}

We can now inspect the package with rpm's tools if you wish::

	% rpm -qp example-1.0-1.x86_64.rpm -i
	Name        : example
	Version     : 1.0
	Release     : 1
	Architecture: x86_64
	Install Date: (not installed)
	Group       : default
	Size        : 0
	License     : unknown
	Signature   : (none)
	Source RPM  : example-1.0-1.src.rpm
	Build Date  : Wed 20 Oct 2021 09:43:25 PM PDT
	Build Host  : snickerdoodle.localdomain
	Relocations : /
	Packager    : <jls@snickerdoodle>
	Vendor      : none
	URL         : http://example.com/no-uri-given
	Summary     : no description given
	Description :
	no description given

Fun Examples
------------

Changing an existing RPM
~~~~~~~~~~~~~~~~~~~~~~~~

fpm supports rpm as both an input and output type (`-s` and `-t` flags), so you can use this to modify an existing rpm.

For example, let's create an rpm to use for our example::

  % fpm -s empty -t rpm -n example
  Created package {:path=>"example-1.0-1.x86_64.rpm"}

Lets say we made a mistake and want to rename the package::

  % fpm -s rpm -t rpm -n newname example-1.0-1.x86_64.rpm
  Created package {:path=>"newname-1.0-1.x86_64.rpm"}

And maybe the architecture is wrong. fpm defaulted to x86_64 (what fpm calls
"native"), and we really want what rpm calls "noarch"::

  % fpm -s rpm -t rpm -a noarch newname-1.0-1.x86_64.rpm
  Created package {:path=>"newname-1.0-1.noarch.rpm"}

RPM-specific command line flags
-------------------------------

.. include:: cli/rpm.rst

---

### Packages Sh (`docs/packages/sh.rst`)

sh - Self-managing shell archive
================================

The 'sh' output in fpm will generate a shell script that is, itself, an archive.

The resulting shell script will install the files you provided. You can run the
resulting shell script to see more helpful information.

  # Create an example.sh package
  % fpm -s empty -t sh -n example

  # Get help.
  % ./example.sh -h


Supported Uses in FPM
---------------------

fpm supports using ``sh`` only as an output type. This means you can create ``sh`` packages from input types like ``deb``, ``dir``, or ``npm``

sh-specific command line flags
-------------------------------

.. include:: cli/sh.rst

---

### Packages Snap (`docs/packages/snap.rst`)

snap - Application package files for Linux
==========================================

You can learn more about ``snap`` itself by visiting the website: https://snapcraft.io/about


Supported Uses in FPM
---------------------

fpm supports input and output for snap packages. This means you can read a snap and convert it to a different output type (such as a `dir` or `rpm`). It also means you can create a snap package.

snap-specific command line flags
--------------------------------

.. include:: cli/snap.rst

---

### Packages Solaris (`docs/packages/solaris.rst`)

solaris - Solaris SRV4 package format
=====================================

This package format is typically used in older Solaris versions (Solaris 7, 8,
9, and 10). You may also know them by files with a SUNW prefix and may have file names that end in ".pkg".

If you're using Solaris 11, OpenSolaris, or Illumos, you might want to use `the newer package format, p5p`_. 

.. _the newer package format, p5p: /packages/p5p.html

Supported Uses in FPM
---------------------

fpm supports using ``solaris`` only as an output type. This means you can create ``solaris`` packages from input types like ``deb``, ``dir``, or ``npm``

solaris-specific command line flags
-----------------------------------

.. include:: cli/solaris.rst

---

### Packages Tar (`docs/packages/tar.rst`)

tar - Tape archives aka "tar" files
===================================

Supported Uses in FPM
---------------------

fpm supports input and output for NAME (tar). This means you can read a tar and convert it to a different output type (such as a `dir` or `rpm`). It also means you can create a tar package.

tar-specific command line flags
-------------------------------

.. include:: cli/tar.rst

---

### Packages Virtualenv (`docs/packages/virtualenv.rst`)

virtualenv - Python virtualenv
==============================

Supported Uses in FPM
---------------------

fpm supports using ``virtualenv`` only as an input type. This means you can convert
``virtualenv`` input packages to output packages like ``deb``, ``rpm``, and more.

virtualenv-specific command line flags
--------------------------------------

.. include:: cli/virtualenv.rst

---

### Packages Zip (`docs/packages/zip.rst`)

zip - Zip files
===============

Supported Uses in FPM
---------------------

fpm supports input and output for zip files. This means you can read a zip and convert it to a different output type (such as a `dir` or `rpm`). It also means you can create a zip package.

zip-specific command line flags
-------------------------------

.. include:: cli/zip.rst

---

### Packages Cli Cpan (`docs/packages/cli/cpan.rst`)

* ``--cpan-cpanm-bin CPANM_EXECUTABLE``
    - The path to the cpanm executable you wish to run.
* ``--[no-]cpan-cpanm-force``
    - Pass the --force parameter to cpanm
* ``--cpan-mirror CPAN_MIRROR``
    - The CPAN mirror to use instead of the default.
* ``--[no-]cpan-mirror-only``
    - Only use the specified mirror for metadata.
* ``--cpan-package-name-prefix NAME_PREFIX``
    - Name to prefix the package name with.
* ``--cpan-perl-bin PERL_EXECUTABLE``
    - The path to the perl executable you wish to run.
* ``--cpan-perl-lib-path PERL_LIB_PATH``
    - Path of target Perl Libraries
* ``--[no-]cpan-sandbox-non-core``
    - Sandbox all non-core modules, even if they're already installed
* ``--[no-]cpan-test``
    - Run the tests before packaging?
* ``--[no-]cpan-verbose``
    - Produce verbose output from cpanm?

---

### Packages Cli Deb (`docs/packages/cli/deb.rst`)

* ``--deb-activate EVENT``
    - Package activates EVENT trigger
* ``--deb-activate-noawait EVENT``
    - Package activates EVENT trigger
* ``--deb-after-purge FILE``
    - A script to be run after package removal to purge remaining (config) files (a.k.a. postrm purge within apt-get purge)
* ``--[no-]deb-auto-config-files``
    - Init script and default configuration files will be labeled as configuration files for Debian packages.
* ``--deb-build-depends DEPENDENCY``
    - Add DEPENDENCY as a Build-Depends
* ``--deb-changelog FILEPATH``
    - Add FILEPATH as debian changelog
* ``--deb-compression COMPRESSION``
    - The compression type to use, must be one of gz, bzip2, xz, zst, none.
* ``--deb-compression-level [0-9]``
    - Select a compression level. 0 is none or minimal. 9 is max compression.
* ``--deb-config SCRIPTPATH``
    - Add SCRIPTPATH as debconf config file.
* ``--deb-custom-control FILEPATH``
    - Custom version of the Debian control file.
* ``--deb-default FILEPATH``
    - Add FILEPATH as /etc/default configuration
* ``--deb-dist DIST-TAG``
    - Set the deb distribution.
* ``--deb-field 'FIELD: VALUE'``
    - Add custom field to the control file
* ``--[no-]deb-generate-changes``
    - Generate PACKAGENAME.changes file.
* ``--deb-group GROUP``
    - The group owner of files in this package
* ``--[no-]deb-ignore-iteration-in-dependencies``
    - For '=' (equal) dependencies, allow iterations on the specified version. Default is to be specific. This option allows the same version of a package but any iteration is permitted
* ``--deb-init FILEPATH``
    - Add FILEPATH as an init script
* ``--deb-installed-size KILOBYTES``
    - The installed size, in kilobytes. If omitted, this will be calculated automatically
* ``--deb-interest EVENT``
    - Package is interested in EVENT trigger
* ``--deb-interest-noawait EVENT``
    - Package is interested in EVENT trigger without awaiting
* ``--[no-]deb-maintainerscripts-force-errorchecks``
    - Activate errexit shell option according to lintian. https://lintian.debian.org/tags/maintainer-script-ignores-errors.html
* ``--deb-meta-file FILEPATH``
    - Add FILEPATH to DEBIAN directory
* ``--[no-]deb-no-default-config-files``
    - Do not add all files in /etc as configuration files by default for Debian packages.
* ``--deb-pre-depends DEPENDENCY``
    - Add DEPENDENCY as a Pre-Depends
* ``--deb-priority PRIORITY``
    - The debian package 'priority' value.
* ``--deb-recommends PACKAGE``
    - Add PACKAGE to Recommends
* ``--deb-shlibs SHLIBS``
    - Include control/shlibs content. This flag expects a string that is used as the contents of the shlibs file. See the following url for a description of this file and its format: http://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-shlibs
* ``--deb-suggests PACKAGE``
    - Add PACKAGE to Suggests
* ``--deb-systemd FILEPATH``
    - Add FILEPATH as a systemd script
* ``--[no-]deb-systemd-auto-start``
    - Start service after install or upgrade
* ``--[no-]deb-systemd-enable``
    - Enable service on install or upgrade
* ``--deb-systemd-path FILEPATH``
    - Relative path to the systemd service directory
* ``--[no-]deb-systemd-restart-after-upgrade``
    - Restart service after upgrade
* ``--deb-templates FILEPATH``
    - Add FILEPATH as debconf templates file.
* ``--deb-upstart FILEPATH``
    - Add FILEPATH as an upstart script
* ``--deb-upstream-changelog FILEPATH``
    - Add FILEPATH as upstream changelog
* ``--[no-]deb-use-file-permissions``
    - Use existing file permissions when defining ownership and modes
* ``--deb-user USER``
    - The owner of files in this package

---

### Packages Cli Freebsd (`docs/packages/cli/freebsd.rst`)

* ``--freebsd-origin ABI``
    - Sets the FreeBSD 'origin' pkg field
* ``--freebsd-osversion VERSION``
    - Sets the FreeBSD 'version' pkg field, ie 12 or 13, use '*' for all.

---

### Packages Cli Gem (`docs/packages/cli/gem.rst`)

* ``--gem-bin-path DIRECTORY``
    - The directory to install gem executables
* ``--gem-disable-dependency gem_name``
    - The gem name to remove from dependency list
* ``--[no-]gem-embed-dependencies``
    - Should the gem dependencies be installed?
* ``--[no-]gem-env-shebang``
    - Should the target package have the shebang rewritten to use env?
* ``--[no-]gem-fix-dependencies``
    - Should the package dependencies be prefixed?
* ``--[no-]gem-fix-name``
    - Should the target package name be prefixed?
* ``--gem-gem PATH_TO_GEM``
    - The path to the 'gem' tool (defaults to 'gem' and searches your $PATH)
* ``--gem-git-branch GIT_BRANCH``
    - When using a git repo as the source of the gem instead of rubygems.org, use this git branch.
* ``--gem-git-repo GIT_REPO``
    - Use this git repo address as the source of the gem instead of rubygems.org.
* ``--gem-package-name-prefix PREFIX``
    - Name to prefix the package name with.
* ``--gem-package-prefix NAMEPREFIX``
    - (DEPRECATED, use --package-name-prefix) Name to prefix the package name with.
* ``--[no-]gem-prerelease``
    - Allow prerelease versions of a gem
* ``--gem-shebang SHEBANG``
    - Replace the shebang in the executables in the bin path with a custom string
* ``--gem-stagingdir STAGINGDIR``
    - The directory where fpm installs the gem temporarily before conversion. Normally a random subdirectory of workdir.
* ``--[no-]gem-version-bins``
    - Append the version to the bins

---

### Packages Cli Npm (`docs/packages/cli/npm.rst`)

* ``--npm-bin NPM_EXECUTABLE``
    - The path to the npm executable you wish to run.
* ``--npm-package-name-prefix PREFIX``
    - Name to prefix the package name with.
* ``--npm-registry NPM_REGISTRY``
    - The npm registry to use instead of the default.

---

### Packages Cli Osxpkg (`docs/packages/cli/osxpkg.rst`)

* ``--osxpkg-dont-obsolete DONT_OBSOLETE_PATH``
    - A file path for which to 'dont-obsolete' in the built PackageInfo. Can be specified multiple times.
* ``--osxpkg-identifier-prefix IDENTIFIER_PREFIX``
    - Reverse domain prefix prepended to package identifier, ie. 'org.great.my'. If this is omitted, the identifer will be the package name.
* ``--osxpkg-ownership OWNERSHIP``
    - --ownership option passed to pkgbuild. Defaults to 'recommended'. See pkgbuild(1).
* ``--[no-]osxpkg-payload-free``
    - Define no payload, assumes use of script options.
* ``--osxpkg-postinstall-action POSTINSTALL_ACTION``
    - Post-install action provided in package metadata. Optionally one of 'logout', 'restart', 'shutdown'.

---

### Packages Cli P5p (`docs/packages/cli/p5p.rst`)

* ``--p5p-group GROUP``
    - Set the group to GROUP in the prototype file.
* ``--[no-]p5p-lint``
    - Check manifest with pkglint
* ``--p5p-publisher PUBLISHER``
    - Set the publisher name for the repository
* ``--p5p-user USER``
    - Set the user to USER in the prototype files.
* ``--[no-]p5p-validate``
    - Validate with pkg install
* ``--p5p-zonetype ZONETYPE``
    - Set the allowed zone types (global, nonglobal, both)

---

### Packages Cli Pacman (`docs/packages/cli/pacman.rst`)

* ``--pacman-compression COMPRESSION``
    - The compression type to use, must be one of gz, bzip2, xz, zstd, none.
* ``--pacman-group GROUP``
    - The group owner of files in this package
* ``--pacman-optional-depends PACKAGE``
    - Add an optional dependency to the pacman package.
* ``--[no-]pacman-use-file-permissions``
    - Use existing file permissions when defining ownership and modes
* ``--pacman-user USER``
    - The owner of files in this package

---

### Packages Cli Pear (`docs/packages/cli/pear.rst`)

* ``--pear-bin-dir BIN_DIR``
    - Directory to put binaries in
* ``--pear-channel CHANNEL_URL``
    - The pear channel url to use instead of the default.
* ``--[no-]pear-channel-update``
    - call 'pear channel-update' prior to installation
* ``--pear-data-dir DATA_DIR``
    - Specify php dir relative to prefix if differs from pear default (pear/data)
* ``--pear-package-name-prefix PREFIX``
    - Name prefix for pear package
* ``--pear-php-bin PHP_BIN``
    - Specify php executable path if differs from the os used for packaging
* ``--pear-php-dir PHP_DIR``
    - Specify php dir relative to prefix if differs from pear default (pear/php)

---

### Packages Cli Pleaserun (`docs/packages/cli/pleaserun.rst`)

* ``--pleaserun-chdir CHDIR``
    - The working directory used by the service
* ``--pleaserun-name SERVICE_NAME``
    - The name of the service you are creating
* ``--pleaserun-user USER``
    - The user to use for executing this program.

---

### Packages Cli Python (`docs/packages/cli/python.rst`)

* ``--python-bin PYTHON_EXECUTABLE``
    - The path to the python executable you wish to run.
* ``--[no-]python-dependencies``
    - Include requirements defined by the python package as dependencies.
* ``--python-disable-dependency python_package_name``
    - The python package name to remove from dependency list
* ``--[no-]python-downcase-dependencies``
    - Should the package dependencies be in lowercase?
* ``--[no-]python-downcase-name``
    - Should the target package name be in lowercase?
* ``--python-easyinstall EASYINSTALL_EXECUTABLE``
    - The path to the easy_install executable tool
* ``--[no-]python-fix-dependencies``
    - Should the package dependencies be prefixed?
* ``--[no-]python-fix-name``
    - Should the target package name be prefixed?
* ``--python-install-bin BIN_PATH``
    - (DEPRECATED, does nothing) The path to where python scripts should be installed to.
* ``--python-install-data DATA_PATH``
    - (DEPRECATED, does nothing) The path to where data should be installed to. This is equivalent to 'python setup.py --install-data DATA_PATH
* ``--python-install-lib LIB_PATH``
    - (DEPRECATED, does nothing) The path to where python libs should be installed to (default depends on your python installation). Want to find out what your target platform is using? Run this: python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()'
* ``--[no-]python-internal-pip``
    - Use the pip module within python to install modules - aka 'python -m pip'. This is the recommended usage since Python 3.4 (2014) instead of invoking the 'pip' script
* ``--[no-]python-obey-requirements-txt``
    - Use a requirements.txt file in the top-level directory of the python package for dependency detection.
* ``--python-package-name-prefix PREFIX``
    - Name to prefix the package name with.
* ``--python-package-prefix NAMEPREFIX``
    - (DEPRECATED, use --package-name-prefix) Name to prefix the package name with.
* ``--python-pip PIP_EXECUTABLE``
    - The path to the pip executable tool. If not specified, easy_install is used instead
* ``--python-pypi PYPI_URL``
    - PyPi Server uri for retrieving packages.
* ``--python-scripts-executable PYTHON_EXECUTABLE``
    - (DEPRECATED) Set custom python interpreter in installing scripts. By default distutils will replace python interpreter in installing scripts (specified by shebang) with current python interpreter (sys.executable). This option is equivalent to appending 'build_scripts --executable PYTHON_EXECUTABLE' arguments to 'setup.py install' command.
* ``--python-setup-py-arguments setup_py_argument``
    - (DEPRECATED) Arbitrary argument(s) to be passed to setup.py
* ``--python-trusted-host PYPI_TRUSTED``
    - Mark this host or host:port pair as trusted for pip

---

### Packages Cli Rpm (`docs/packages/cli/rpm.rst`)

* ``--rpm-attr ATTRFILE``
    - Set the attribute for a file (%attr), e.g. --rpm-attr 750,user1,group1:/some/file
* ``--[no-]rpm-auto-add-directories``
    - Auto add directories not part of filesystem
* ``--rpm-auto-add-exclude-directories DIRECTORIES``
    - Additional directories ignored by '--rpm-auto-add-directories' flag
* ``--[no-]rpm-autoprov``
    - Enable RPM's AutoProv option
* ``--[no-]rpm-autoreq``
    - Enable RPM's AutoReq option
* ``--[no-]rpm-autoreqprov``
    - Enable RPM's AutoReqProv option
* ``--rpm-changelog FILEPATH``
    - Add changelog from FILEPATH contents
* ``--rpm-compression none|xz|xzmt|gzip|bzip2``
    - Select a compression method. gzip works on the most platforms.
* ``--rpm-compression-level [0-9]``
    - Select a compression level. 0 is store-only. 9 is max compression.
* ``--rpm-defattrdir ATTR``
    - Set the default dir mode (%defattr).
* ``--rpm-defattrfile ATTR``
    - Set the default file mode (%defattr).
* ``--rpm-digest md5|sha1|sha256|sha384|sha512``
    - Select a digest algorithm. md5 works on the most platforms.
* ``--rpm-dist DIST-TAG``
    - Set the rpm distribution.
* ``--rpm-filter-from-provides REGEX``
    - Set %filter_from_provides to the supplied REGEX.
* ``--rpm-filter-from-requires REGEX``
    - Set %filter_from_requires to the supplied REGEX.
* ``--rpm-group GROUP``
    - Set the group to GROUP in the %files section. Overrides the group when used with use-file-permissions setting.
* ``--[no-]rpm-ignore-iteration-in-dependencies``
    - For '=' (equal) dependencies, allow iterations on the specified version. Default is to be specific. This option allows the same version of a package but any iteration is permitted
* ``--rpm-init FILEPATH``
    - Add FILEPATH as an init script
* ``--[no-]rpm-macro-expansion``
    - install-time macro expansion in %pre %post %preun %postun scripts (see: https://rpm-software-management.github.io/rpm/manual/scriptlet_expansion.html)
* ``--[no-]rpm-old-perl-dependency-name``
    - Use older 'perl' depdency name. Newer Red Hat (and derivatives) use a dependency named 'perl-interpreter'.
* ``--rpm-os OS``
    - The operating system to target this rpm for. You want to set this to 'linux' if you are using fpm on OS X, for example
* ``--rpm-posttrans FILE``
    - posttrans script
* ``--rpm-pretrans FILE``
    - pretrans script
* ``--rpm-rpmbuild-define DEFINITION``
    - Pass a --define argument to rpmbuild.
* ``--[no-]rpm-sign``
    - Pass --sign to rpmbuild
* ``--rpm-summary SUMMARY``
    - Set the RPM summary. Overrides the first line on the description if set
* ``--rpm-tag TAG``
    - Adds a custom tag in the spec file as is. Example: --rpm-tag 'Requires(post): /usr/sbin/alternatives'
* ``--rpm-trigger-after-install '[OPT]PACKAGE: FILEPATH'``
    - Adds a rpm trigger script located in FILEPATH, having 'OPT' options and linking to 'PACKAGE'. PACKAGE can be a comma seperated list of packages. See: https://rpm-software-management.github.io/rpm/manual/triggers.html
* ``--rpm-trigger-after-target-uninstall '[OPT]PACKAGE: FILEPATH'``
    - Adds a rpm trigger script located in FILEPATH, having 'OPT' options and linking to 'PACKAGE'. PACKAGE can be a comma seperated list of packages. See: https://rpm-software-management.github.io/rpm/manual/triggers.html
* ``--rpm-trigger-before-install '[OPT]PACKAGE: FILEPATH'``
    - Adds a rpm trigger script located in FILEPATH, having 'OPT' options and linking to 'PACKAGE'. PACKAGE can be a comma seperated list of packages. See: https://rpm-software-management.github.io/rpm/manual/triggers.html
* ``--rpm-trigger-before-uninstall '[OPT]PACKAGE: FILEPATH'``
    - Adds a rpm trigger script located in FILEPATH, having 'OPT' options and linking to 'PACKAGE'. PACKAGE can be a comma seperated list of packages. See: https://rpm-software-management.github.io/rpm/manual/triggers.html
* ``--[no-]rpm-use-file-permissions``
    - Use existing file permissions when defining ownership and modes.
* ``--rpm-user USER``
    - Set the user to USER in the %files section. Overrides the user when used with use-file-permissions setting.
* ``--[no-]rpm-verbatim-gem-dependencies``
    - When converting from a gem, leave the old (fpm 0.4.x) style dependency names. This flag will use the old 'rubygem-foo' names in rpm requires instead of the redhat style rubygem(foo).
* ``--rpm-verifyscript FILE``
    - a script to be run on verification

---

### Packages Cli Snap (`docs/packages/cli/snap.rst`)

* ``--snap-confinement CONFINEMENT``
    - Type of confinement to use for this snap.
* ``--snap-grade GRADE``
    - Grade of this snap.
* ``--snap-yaml FILEPATH``
    - Custom version of the snap.yaml file.

---

### Packages Cli Solaris (`docs/packages/cli/solaris.rst`)

* ``--solaris-group GROUP``
    - Set the group to GROUP in the prototype file.
* ``--solaris-user USER``
    - Set the user to USER in the prototype files.

---

### Packages Cli Virtualenv (`docs/packages/cli/virtualenv.rst`)

* ``--virtualenv-find-links PIP_FIND_LINKS``
    - If a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory, then look for archives in the directory listing.
* ``--[no-]virtualenv-fix-name``
    - Should the target package name be prefixed?
* ``--virtualenv-install-location DIRECTORY``
    - DEPRECATED: Use --prefix instead.  Location to which to install the virtualenv by default.
* ``--virtualenv-other-files-dir DIRECTORY``
    - Optionally, the contents of the specified directory may be added to the package. This is useful if the virtualenv needs configuration files, etc.
* ``--virtualenv-package-name-prefix PREFIX``
    - Name to prefix the package name with.
* ``--virtualenv-pypi PYPI_URL``
    - PyPi Server uri for retrieving packages.
* ``--virtualenv-pypi-extra-url PYPI_EXTRA_URL``
    - PyPi extra-index-url for pointing to your priviate PyPi
* ``--[no-]virtualenv-setup-install``
    - After building virtualenv run setup.py install useful when building a virtualenv for packages and including their requirements from requirements.txt
* ``--[no-]virtualenv-system-site-packages``
    - Give the virtual environment access to the global site-packages

---

--- METRICS ---
- Files Extracted: 47
- Estimated Token Budget: ~30434 tokens
- Canonical Reference: https://codewiki.google/github.com/jordansissel/fpm