Compare commits
503 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
e69cdca562 | |
|
|
5b9d922c84 | |
|
|
93eaefd383 | |
|
|
4cf32c5bc7 | |
|
|
6115fe4c44 | |
|
|
781108fbf6 | |
|
|
9c78876415 | |
|
|
a066c4447d | |
|
|
e42a069c4f | |
|
|
829b897456 | |
|
|
08e663916d | |
|
|
e15d2c3a1f | |
|
|
249d3b997f | |
|
|
bdbe351796 | |
|
|
45f78973e7 | |
|
|
db535710f7 | |
|
|
6bf2885139 | |
|
|
644e538311 | |
|
|
9c415246f2 | |
|
|
e8cd0920d7 | |
|
|
22d44e1c49 | |
|
|
ef63628054 | |
|
|
e0c3a1fc1a | |
|
|
e1113c24e0 | |
|
|
290fe0741c | |
|
|
b69b7e5787 | |
|
|
feecdfe87b | |
|
|
de7a214bf5 | |
|
|
c6069f5584 | |
|
|
583f7e4ba0 | |
|
|
aa55aaca93 | |
|
|
23e7e0f554 | |
|
|
dd58d6714e | |
|
|
c76917a4e1 | |
|
|
17bc375e0b | |
|
|
42808ab943 | |
|
|
8e54e5ca49 | |
|
|
8b24206e19 | |
|
|
f0e5b8abc0 | |
|
|
b328c15ff6 | |
|
|
010093698a | |
|
|
002b42e98e | |
|
|
bc75218f37 | |
|
|
fcee26e979 | |
|
|
9a77831902 | |
|
|
873bff3820 | |
|
|
1c3cfe741e | |
|
|
6025469d52 | |
|
|
fdfc384e71 | |
|
|
82ddba7a8c | |
|
|
7cc4aa7509 | |
|
|
207bd73577 | |
|
|
7ef007ef5f | |
|
|
3f044a426f | |
|
|
4beb98f193 | |
|
|
2c301c733d | |
|
|
b10350b913 | |
|
|
93ac15729b | |
|
|
08dc21b8f1 | |
|
|
f817f7a5da | |
|
|
f714f4b4f1 | |
|
|
28fea4c930 | |
|
|
b2f2fc6624 | |
|
|
e7e7449815 | |
|
|
862a6863cd | |
|
|
858d1c1419 | |
|
|
98cc060ede | |
|
|
512f4a9eb3 | |
|
|
8acb2f51d7 | |
|
|
468f455862 | |
|
|
e6b83c4788 | |
|
|
13a3c6992e | |
|
|
572cf390a7 | |
|
|
d30e641bb8 | |
|
|
ad4402f3bf | |
|
|
c326b39d95 | |
|
|
e66a359a10 | |
|
|
c028e71206 | |
|
|
0fb0d26152 | |
|
|
b852c59b02 | |
|
|
790f53c766 | |
|
|
d81a1ad1ac | |
|
|
fd06d93533 | |
|
|
e94f56c01e | |
|
|
843c729b16 | |
|
|
18e04a70e1 | |
|
|
e7903804af | |
|
|
6957220642 | |
|
|
bf0aa55655 | |
|
|
5092c5f659 | |
|
|
5960c8c4a7 | |
|
|
eb56972540 | |
|
|
20aa78c72c | |
|
|
ae8205261a | |
|
|
0cba81fbe4 | |
|
|
9d3d96a93d | |
|
|
86be3cc802 | |
|
|
13228bf566 | |
|
|
d0884e8903 | |
|
|
3b2b258020 | |
|
|
847ded9eba | |
|
|
c9d749a3a7 | |
|
|
49093c3533 | |
|
|
e0edc7e559 | |
|
|
b085edc49c | |
|
|
ad6b18a0aa | |
|
|
066b9b561a | |
|
|
18233c334d | |
|
|
d0c139aea4 | |
|
|
31506109ff | |
|
|
f898ef8232 | |
|
|
c9a5cb4628 | |
|
|
ada6012b5b | |
|
|
db06af3c03 | |
|
|
dcbe0425db | |
|
|
df26ed08f7 | |
|
|
906cf8054a | |
|
|
fdd5e559ac | |
|
|
10c8471179 | |
|
|
42f2660a58 | |
|
|
d8bc03a63c | |
|
|
15aaf1cfce | |
|
|
601cfda057 | |
|
|
88c1e6ab0a | |
|
|
72ccedc45d | |
|
|
5b104bccf0 | |
|
|
3ba61bc0bd | |
|
|
8a6460d0d3 | |
|
|
b0ca926d49 | |
|
|
3653f1a10c | |
|
|
63d4ac8dfc | |
|
|
ad2b1a8966 | |
|
|
d9ba0b4545 | |
|
|
56a97c43be | |
|
|
cd7a6855d3 | |
|
|
c6b85be6a2 | |
|
|
ce8fd6cb64 | |
|
|
16c7e280a7 | |
|
|
7d6b5cd58c | |
|
|
ec82bc649b | |
|
|
110419b695 | |
|
|
11175cc47f | |
|
|
c8d364b0ab | |
|
|
3fcaefb9fd | |
|
|
d16b531a2f | |
|
|
6c87589f32 | |
|
|
72b2f26ad3 | |
|
|
bfb192c417 | |
|
|
f168571abf | |
|
|
409a3b27df | |
|
|
788387c0d2 | |
|
|
37f56269c3 | |
|
|
c40f6818f8 | |
|
|
9b32d9a116 | |
|
|
40795d4d85 | |
|
|
7881705985 | |
|
|
5d2b4854d3 | |
|
|
7f4718f9c2 | |
|
|
82284c7a4b | |
|
|
60b4bd30b3 | |
|
|
377fcaf871 | |
|
|
2943d82581 | |
|
|
f5d07520b7 | |
|
|
0dfe21bab7 | |
|
|
b2ba5c4a59 | |
|
|
521d030420 | |
|
|
106828fc12 | |
|
|
0c84173de0 | |
|
|
9b9a1b365f | |
|
|
eb5370d16e | |
|
|
92886d922d | |
|
|
9aa1c1cb64 | |
|
|
7a1302d1e8 | |
|
|
53f669219c | |
|
|
20e754adfb | |
|
|
d819e59a80 | |
|
|
021fc45047 | |
|
|
121989e0a0 | |
|
|
bba3114075 | |
|
|
329b4758a6 | |
|
|
5b8e9fc334 | |
|
|
23c5790ec4 | |
|
|
d5985a5571 | |
|
|
f722c4b3f5 | |
|
|
8437e50fe0 | |
|
|
d43a017736 | |
|
|
c1930fc465 | |
|
|
7b57e92ec4 | |
|
|
9e3f75b628 | |
|
|
309e6b3c18 | |
|
|
052656b480 | |
|
|
809c726944 | |
|
|
d69e648ce0 | |
|
|
62f1418e4a | |
|
|
e1ef157dc3 | |
|
|
db9db670c3 | |
|
|
58ddeda91b | |
|
|
11646b943f | |
|
|
13621c9722 | |
|
|
c6baaf9427 | |
|
|
9efd56c54a | |
|
|
3540cfeb4b | |
|
|
cb24061992 | |
|
|
d6a77bff2a | |
|
|
e8fb21d725 | |
|
|
aecf23801d | |
|
|
c83461caf7 | |
|
|
3e7ba8656b | |
|
|
285c13554f | |
|
|
5bd26ad011 | |
|
|
c4c0b32cfc | |
|
|
97dfed35ae | |
|
|
60de482c2c | |
|
|
48200286c1 | |
|
|
5995c7ac34 | |
|
|
4f51caf8fc | |
|
|
1a980dd3e7 | |
|
|
16f1b4357f | |
|
|
c7e7b18731 | |
|
|
63fdb94347 | |
|
|
0a8bccc511 | |
|
|
2ccf61c01f | |
|
|
720e140d78 | |
|
|
cdf110d730 | |
|
|
2834bb5816 | |
|
|
9fd97d747c | |
|
|
37525ca4b0 | |
|
|
3bb5e99f2a | |
|
|
99c5fcb485 | |
|
|
55f9613c0d | |
|
|
864e41c880 | |
|
|
01b67d747f | |
|
|
541550a74d | |
|
|
60bf90ae3c | |
|
|
dbd8bafb5d | |
|
|
e96dc2729a | |
|
|
4eed9d671b | |
|
|
bf9bcc8e2a | |
|
|
82580bb8e7 | |
|
|
13dde8304e | |
|
|
057a60387f | |
|
|
067f4ccfd0 | |
|
|
2b6e70b6fa | |
|
|
ab4eb18b5f | |
|
|
3965a0fd31 | |
|
|
18c5adcd19 | |
|
|
e3b3f9d8e3 | |
|
|
3e42ff462c | |
|
|
72a925b048 | |
|
|
2a6facbcce | |
|
|
cc0a4e7369 | |
|
|
d69ed14bd8 | |
|
|
d005508e18 | |
|
|
106d7b21e3 | |
|
|
d50f756d0e | |
|
|
c795ed7ef4 | |
|
|
feb53faa14 | |
|
|
292073fc35 | |
|
|
073e4e7b74 | |
|
|
cd7e428d9f | |
|
|
73804ded35 | |
|
|
50ca2bfd05 | |
|
|
3db202a52f | |
|
|
9a16e43e4e | |
|
|
6735f9df69 | |
|
|
b2dd4dadb6 | |
|
|
922d4c5d4f | |
|
|
ca3477b67b | |
|
|
66a4dea525 | |
|
|
6b4b61a3f8 | |
|
|
90d131b075 | |
|
|
204fb1b1ff | |
|
|
c9487a30c0 | |
|
|
7d7b184d63 | |
|
|
e05790fa92 | |
|
|
945ba5b4b0 | |
|
|
b1e956e071 | |
|
|
8a40cd1db7 | |
|
|
cc7610f434 | |
|
|
304619416b | |
|
|
d9ddb21de4 | |
|
|
83b4ad9d65 | |
|
|
d7b466787d | |
|
|
e066e632ed | |
|
|
823b3947fc | |
|
|
a7626cb99b | |
|
|
1c1ff7dc19 | |
|
|
6628f175ff | |
|
|
69cb62ddce | |
|
|
fbbb80fd53 | |
|
|
3895fccec9 | |
|
|
b269c81ebe | |
|
|
62fcf8c230 | |
|
|
e8be82ebdc | |
|
|
82ad8c6c2f | |
|
|
b2c21dd285 | |
|
|
4ff6fd7b91 | |
|
|
b8fc631327 | |
|
|
51067be1a5 | |
|
|
57fb023ee2 | |
|
|
7a4372eaa0 | |
|
|
29c9c13156 | |
|
|
93e73c7ad5 | |
|
|
591c0694d1 | |
|
|
625ad4bb1b | |
|
|
5e4e30ce0e | |
|
|
8d8428db04 | |
|
|
c1c82a45c4 | |
|
|
40dc09925a | |
|
|
294f6180cf | |
|
|
1f2f950581 | |
|
|
900d7560f4 | |
|
|
8f6f285271 | |
|
|
ca02692bcb | |
|
|
0d67ab9e3e | |
|
|
446b49c7c4 | |
|
|
bf54a505ed | |
|
|
2b70a025f4 | |
|
|
880e5512da | |
|
|
fa0d15d581 | |
|
|
cad736ee6c | |
|
|
20e89a6feb | |
|
|
3ab03e495f | |
|
|
3b6a415c35 | |
|
|
c36416d63f | |
|
|
7f5538f76f | |
|
|
0c1ef4e106 | |
|
|
2179b2f762 | |
|
|
2ecfc640a2 | |
|
|
005baa9b98 | |
|
|
1d04b94472 | |
|
|
09fca24748 | |
|
|
68ec00e4cf | |
|
|
40b1f2d741 | |
|
|
07b0be428e | |
|
|
384f54769f | |
|
|
51682db33e | |
|
|
8f2dd4516a | |
|
|
dfaa43a799 | |
|
|
b43c393f4f | |
|
|
b3c20f4e87 | |
|
|
dce029dddb | |
|
|
c7c9043467 | |
|
|
4343397dfb | |
|
|
a996a8a404 | |
|
|
90a7f94067 | |
|
|
fe0ab21476 | |
|
|
8758734009 | |
|
|
c4b3cd863e | |
|
|
58b023c3cc | |
|
|
8d85e0990c | |
|
|
f34bcac521 | |
|
|
19523e1873 | |
|
|
d6ee7e199c | |
|
|
a0b3a1f078 | |
|
|
bfcc2b7d5e | |
|
|
92d134eaa5 | |
|
|
ead229fb06 | |
|
|
8a91a79088 | |
|
|
bd89a51f61 | |
|
|
139793c8b3 | |
|
|
6f07665db0 | |
|
|
03ea0c151b | |
|
|
b7e82d49b4 | |
|
|
a15f60e20f | |
|
|
fcd4e70662 | |
|
|
bab1780b12 | |
|
|
d11567300f | |
|
|
100a825796 | |
|
|
b0fd3d2ef3 | |
|
|
e4ade183c2 | |
|
|
efd05dd93b | |
|
|
e777018424 | |
|
|
c63e6fa89d | |
|
|
b9f4c1e64f | |
|
|
42b7c5acd3 | |
|
|
783b06fe97 | |
|
|
55672427a5 | |
|
|
127b29194a | |
|
|
923ee23636 | |
|
|
8453c61112 | |
|
|
c7393be73f | |
|
|
78853a81c9 | |
|
|
07e7e5399d | |
|
|
4d5b09778e | |
|
|
d6e136b457 | |
|
|
d2a71442c1 | |
|
|
fcd4dfd631 | |
|
|
a8b431bc0b | |
|
|
a3ddf38b84 | |
|
|
fa31f84058 | |
|
|
c2db5985f6 | |
|
|
14c4819e41 | |
|
|
488863b321 | |
|
|
1bda1089a4 | |
|
|
ed5a4356b5 | |
|
|
10585bae35 | |
|
|
2ea5ecf65f | |
|
|
b13f2f0a05 | |
|
|
60b5ecff12 | |
|
|
17cdacb782 | |
|
|
32d526fb14 | |
|
|
5148814866 | |
|
|
b930bcc874 | |
|
|
f393ca6382 | |
|
|
37cc459dd8 | |
|
|
d4d52ef46b | |
|
|
c79bb050a7 | |
|
|
359e4847cb | |
|
|
c364b2a41e | |
|
|
6f6e59e8bd | |
|
|
6dca7cabf0 | |
|
|
b5470f93b8 | |
|
|
859f602f56 | |
|
|
fd7ef05966 | |
|
|
f2e38357a3 | |
|
|
1752f4fcb2 | |
|
|
051c4db507 | |
|
|
59b7721798 | |
|
|
719fec630c | |
|
|
5874236a2b | |
|
|
d72ea6c625 | |
|
|
55f9355e90 | |
|
|
00adf41b20 | |
|
|
7f483848f9 | |
|
|
af305e7a87 | |
|
|
bd39f5886f | |
|
|
4020de0d25 | |
|
|
6fc914097d | |
|
|
b560b0fcce | |
|
|
16401efae9 | |
|
|
023a4d1035 | |
|
|
4a71dd184d | |
|
|
93dacaf0fb | |
|
|
b7ae0d9bde | |
|
|
f47fc82f05 | |
|
|
acb70cc9b0 | |
|
|
b71cc71f05 | |
|
|
00aefaccc8 | |
|
|
e36ee9b319 | |
|
|
c175e3e59a | |
|
|
33ec8690f9 | |
|
|
888b5860a9 | |
|
|
9d9df389a0 | |
|
|
98af0f6787 | |
|
|
4a787359c6 | |
|
|
fe9808f09f | |
|
|
b470c6885f | |
|
|
835f59b58b | |
|
|
4663dc003a | |
|
|
49c5049b7b | |
|
|
0d33ff1f8f | |
|
|
408ea8ae4d | |
|
|
d336bc3002 | |
|
|
10ffb524f8 | |
|
|
e5f35be66c | |
|
|
7a44b4045e | |
|
|
42fae324f7 | |
|
|
b999baf1b9 | |
|
|
9db164ad6e | |
|
|
9b854df26e | |
|
|
098c9b2de5 | |
|
|
0764bbdcd7 | |
|
|
4c17c11904 | |
|
|
ca8aeb951d | |
|
|
e72209b59c | |
|
|
c7839af1f9 | |
|
|
afca45910e | |
|
|
e9a6f63e2e | |
|
|
9af51d7364 | |
|
|
0926aa195e | |
|
|
d9490a520f | |
|
|
4cdab37074 | |
|
|
fc648021e4 | |
|
|
06a7f6947f | |
|
|
33216ad7d7 | |
|
|
2e8583e42e | |
|
|
cda8262bab | |
|
|
b0367de0a2 | |
|
|
40aa7cf5ca | |
|
|
a6f25b9fda | |
|
|
a9401ca0f5 | |
|
|
9ec2b9fde6 | |
|
|
b48397b8b4 | |
|
|
0e9e8f0a43 | |
|
|
441d8e90d3 | |
|
|
5b5d7efb31 | |
|
|
99f5e52fda | |
|
|
5981a29f76 | |
|
|
ab50185c48 | |
|
|
b6ee8799ce | |
|
|
64897df7c7 | |
|
|
1945b83ff7 | |
|
|
6de809631a | |
|
|
060f580b3c | |
|
|
4ba6b89ba0 | |
|
|
40ec0c3576 | |
|
|
8114803a53 | |
|
|
be71a16a40 | |
|
|
8add9bcdd6 | |
|
|
f5984e25e5 | |
|
|
1cef669d07 | |
|
|
454754064f |
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
things:
|
||||
ruby:
|
||||
args:
|
||||
- fpm
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
name: Ruby
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
ruby-version: ['2.7', '3.0', '3.1', '3.4']
|
||||
steps:
|
||||
- run: |
|
||||
sudo apt-get update
|
||||
sudo apt install -y libarchive-tools lintian cpanminus
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby-version }}
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
- run: |
|
||||
if [ ! -z "$RUNNER_DEBUG" ] ; then
|
||||
DEBUG=1 bundle exec rspec -fd
|
||||
else
|
||||
bundle exec rspec
|
||||
fi
|
||||
env:
|
||||
SHELL: /usr/bin/bash
|
||||
|
|
@ -36,3 +36,12 @@ Gemfile.lock
|
|||
|
||||
.rbx
|
||||
.vagrant
|
||||
|
||||
# RubyMine
|
||||
.idea/
|
||||
|
||||
docs/_build
|
||||
docs/.work
|
||||
|
||||
.docker-test-everything
|
||||
.docker-test-minimal
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
# https://blog.readthedocs.com/build-errors-docutils-0-18/
|
||||
version: 2
|
||||
|
||||
build:
|
||||
os: ubuntu-24.04
|
||||
tools:
|
||||
python: "3.13"
|
||||
|
||||
sphinx:
|
||||
configuration: docs/conf.py
|
||||
|
||||
python:
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
32
.travis.yml
32
.travis.yml
|
|
@ -1,32 +0,0 @@
|
|||
os:
|
||||
- linux
|
||||
- osx
|
||||
language: ruby
|
||||
sudo: false
|
||||
rvm:
|
||||
# We use language features of Ruby that are not supported in Ruby 1.9.x or
|
||||
# older.
|
||||
#- 1.8.7
|
||||
#- 1.9.2
|
||||
- 1.9.3
|
||||
- 2.0.0
|
||||
- 2.1.1
|
||||
- 2.2.1
|
||||
before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
|
||||
# dpkg has also gnu-tar and xz as dependencies, these packages are used
|
||||
# by pacman.rb, for example.
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install dpkg ; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then which dpkg-deb || 'dpkg-deb not found'; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then which lintian || echo 'lintian not found'; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then which python || brew install python; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then which easy_install || echo 'easy_install not found'; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then which rpm || brew install rpm ; fi
|
||||
script: bundle exec rspec
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- bsdtar
|
||||
- rpm
|
||||
- lintian
|
||||
- python-setuptools
|
||||
661
CHANGELIST
661
CHANGELIST
|
|
@ -1,661 +0,0 @@
|
|||
1.6.2 (July 1, 2016)
|
||||
- Reduce `json` dependency version to avoid requiring Ruby 2.0 (#1146, #1147;
|
||||
patch by Matt Hoffman)
|
||||
- pacman: skip automatic dependnecies if --no-auto-depends is given (Leo P)
|
||||
- rpm: Fix bug where --rpm-tag was accidentally ignored (#1134, Michal Mach)
|
||||
- deb: Omit certain fields from control file if (Breaks, Depends, Recommends,
|
||||
etc) if there are no values to put in that field. (#1113, TomyLobo)
|
||||
- rpm: remove trailing slash from Prefix for rpm packages (#819, luto)
|
||||
- virtualenv: Now supports being given a requirements.txt as the input. (Nick
|
||||
Griffiths)
|
||||
|
||||
1.6.1 (June 10, 2016)
|
||||
- freebsd: Only load xz support if we are doing a freebsd output. (#1132,
|
||||
#1090, Ketan Padegaonkar)
|
||||
|
||||
1.6.0 (May 25, 2016)
|
||||
- New source: pleaserun. This lets you create packages that will install a
|
||||
system service. An after-install script is used in the package to determine
|
||||
which service platform to target (systemd, upstart, etc). Originated from
|
||||
Aaron Mildenstein's work on solving this problem for Logstash. (#1119,
|
||||
#1112)
|
||||
- New target: Alpine Linux "apk" packages. (#1054, George Lester)
|
||||
- deb: don't append `.conf` to an upstart file if the file name already ends
|
||||
in `.conf`. (#1115, josegonzalez)
|
||||
- freebsd: fix bug where --package flag was ignored. (#1093, Paweł Tomulik)
|
||||
- Improvements to the fpm rake tasks (#1101, Evan Gilman)
|
||||
|
||||
1.5.0 (April 12, 2016)
|
||||
- Arch package support is now available via -s pacman and -t pacman.
|
||||
(#916; wonderful community effort making this happen!)
|
||||
- FreeBSD packages can now be built `-t freebsd`
|
||||
(#1073; huge community effort making this happen!)
|
||||
- You can now set fpm flags and arguments with the FPMOPTS environment
|
||||
variable (#977, mildred)
|
||||
- Using --exclude-file no longer causes a crash. Yay! (#982, wyaeld)
|
||||
- A new rake task is available for folks who want to invoke fpm from rake
|
||||
(#756, pstengel)
|
||||
- On FreeBSD, when tarring, gtar is now used. (#1008, liv3d)
|
||||
- virtualenv: Add --virtualenv-pypi-extra-url flag to specify additional PyPI
|
||||
locations to use when searching for packages (#1012, Paul Krohn)
|
||||
- deb: Init scripts, etc/default, and upstart files are automatically added
|
||||
as config files in a debian package. Disable this behavior with
|
||||
---deb-auto-config-files
|
||||
- deb: Small changes to make lintian complain less about our resulting debs.
|
||||
- deb: New flag --deb-systemd lets you specify a systemd service file to include
|
||||
in your package. (#952, Jens Peter Schroer)
|
||||
- cpan: Add --[no-]cpan-cpanm-force flag to pass --force to cpanm.
|
||||
- rpm: File names with both spaces and symbols should now be packageable.
|
||||
(#946, iwonbigbro)
|
||||
- cpan: Now queries MetaCPAN for package info if we can't find any in the
|
||||
cpan archive we just downloaded. (#849, BaxterStockman)
|
||||
- rpm: You can now specify custom rpm tags at the command line. Be careful,
|
||||
as no validation is done on this before sending to rpmbuild. (#687, vStone)
|
||||
- cpan: Install if the package name given is a local file (#986, mdom)
|
||||
- sh: Metadata now available as env vars for post-install scripts (#1006, Ed Healy)
|
||||
- rpm: No more warning if you don't set an epoch. (#1053, Joseph Frazier)
|
||||
|
||||
|
||||
1.4.0 (July 26, 2015)
|
||||
- Solaris 11 IPS packages 'p5p' now supported `-t p5p`. (Jonathan Craig)
|
||||
- Python Virtualenv is now supported `-t virtualenv` (#930, Simone
|
||||
Margaritelli and Daniel Haskin)
|
||||
- deb: Files in /etc are now by default marked as config files. (#877,
|
||||
Vincent Bernat)
|
||||
- `fpm --help` output now includes a list of supported package types (#896,
|
||||
Daniel Haskin)
|
||||
- cpan: --[no-]cpan-sandbox-non-core flag to make non-core module sandboxing
|
||||
optional during packaging (#752, Matt Sharpe)
|
||||
- rpm: Add --rpm-dist flag for specifically setting the target distribution
|
||||
of an rpm. (Adam Lamar)
|
||||
- rpm: Fix a crash if --before-upgrade or --after-upgrade were used. (#822,
|
||||
Dave Anderson)
|
||||
- deb: Ensure maintainer scripts have shebang lines (#836, Wesley Spikes)
|
||||
- deb: Fix bug in maintainer scripts where sometimes we would write an empty
|
||||
shell function. Empty functions aren't valid in shell. (Wesley Spikes)
|
||||
- Fix symlink copying bug (#863, Pete Fritchman)
|
||||
- python: Default to https for pypi queries (Timothy Sutton)
|
||||
- New flag --exclude-file for providing a file containing line-delimited
|
||||
exclusions (Jamie Lawrence)
|
||||
- python: new flag --python-disable-dependency to disable specific python
|
||||
dependencies (Ward Vandewege)
|
||||
- python: ensure we avoid wheel packages for now until fpm better supports them.
|
||||
(#885, Matt Callaway)
|
||||
- deb: Add support for installation states "abort-remove" and "abort-install"
|
||||
(#887, Daniel Haskin)
|
||||
- If PATH isn't set, and we need it, tell the user (#886, Ranjib Dey)
|
||||
- cpan: --[no-]cpan-test now works correctly (#853, Matt Schreiber)
|
||||
- deb-to-rpm: some improved support for config file knowledge passing from
|
||||
deb to rpm packages (Daniel Haskin)
|
||||
|
||||
1.3.3 (December 11, 2014)
|
||||
- The fpm project now uses Contributor Covenant. You can read more about this on
|
||||
the website: http://contributor-covenant.org/
|
||||
- npm: Fix bug causing all `-s npm` attempts to fail due to a missing method.
|
||||
This bug was introduced in 1.3.0. (#800, #806; Jordan Sissel)
|
||||
- rpm: fix bug in rpm input causing a crash if the input rpm did not have any triggers
|
||||
(#801, #802; Ted Elwartowski)
|
||||
|
||||
1.3.2 (November 4, 2014)
|
||||
- deb: conversion from another deb will automatically use any changelog found in
|
||||
the source deb (Jordan Sissel)
|
||||
|
||||
1.3.1 (November 4, 2014)
|
||||
- deb: fix md5sums generation such that `dpkg -V` now works (#799, Matteo Panella)
|
||||
- rpm: Use maximum compression when choosing xz (#797, Ashish Kulkarni)
|
||||
|
||||
1.3.0 (October 25, 2014)
|
||||
- Fixed a bunch of Ruby 1.8.7-related bugs. (Jordan Sissel)
|
||||
- cpan: Fix bug in author handling (#744, Leon Weidauer)
|
||||
- cpan: Better removal of perllocal.pod (#763, #443, #510, Mathias Lafeldt)
|
||||
- rpm: Use lstat calls instead of stat, so we don't follow symlinks (#765, Shrijeet Paliwal)
|
||||
- rpm and deb: Now supports script actions on upgrades. This adds two new flags:
|
||||
--before-upgrade and --after-upgrade. (#772, #661; Daniel Haskin)
|
||||
- rpm: Package triggers are now supported. New flags: --rpm-trigger-before-install,
|
||||
--rpm-trigger-after-install, --rpm-trigger-before-uninstall,
|
||||
--rpm-trigger-after-target-uninstall. (#626, Maxime Caumartin)
|
||||
- rpm: Add --rpm-init flag; similar to --deb-init. (Josh Dolitsky)
|
||||
- sh: Skip installation if already installed for the given version. If forced,
|
||||
the old installation is renamed. (#776, Chris Gerber)
|
||||
- deb: Allow Vendor field to be omitted now by specifying `--vendor ""` (#778, Nate Brown)
|
||||
- general: Add --log=level flag for setting log level. Levels are error, warn, info, debug. (Jordan SIssel)
|
||||
- cpan: Check for Build.PL first before Makefile.PL (#787, Daniel Jay Haskin)
|
||||
- dir: Don't follow symlinks when copying files (#658, Jordan Sissel)
|
||||
- deb: Automatically provide a 'changes' file in debs because lintian
|
||||
complains if they are missing. (#784, Jordan Sissel)
|
||||
- deb: Fix and warn for package names that have spaces (#779, Grantlyk)
|
||||
- npm: Automatically set the prefix to `npm prefix -g` (#758, Brady Wetherington and Jordan Sissel)
|
||||
|
||||
1.2.0 (July 25, 2014)
|
||||
- rpm: Add --rpm-verifyscript for adding a custom rpm verify script to
|
||||
your package. (Remi Hakim)
|
||||
- Allow the -p flag to target a directory for writing the output package
|
||||
(#656, Jordan Sissel)
|
||||
- Add --debug-workspace which skips any workspace cleanup to let users debug things
|
||||
if they break. (#720, #734; Jordan Sissel)
|
||||
- rpm: Add --rpm-attr for controlling attribute settings per file. This setting
|
||||
will likely be removed in the future once rpmbuild is no longer needed.
|
||||
(#719)
|
||||
- deb: Add --deb-meta-file to add arbitrary files to the control dir (#599, Dan Brown)
|
||||
- deb: Add --deb-interest and --deb-activate for adding package triggers (#595, Dan Brown)
|
||||
- cpan: Fix small bug in handling empty metadata fields (#712, Mathias Lafeldt)
|
||||
- rpm: Fix bug when specifying both --architecture and --rpm-os (#707, #716; Alan Ivey)
|
||||
- gem: Fix bug where --gem-version-bins is given but package has no bins (#688, Jan Vansteenkiste)
|
||||
- deb: Set permissions correct on the package's internals. Makes lintian happier. (Jan Vansteenkiste)
|
||||
- rpm: rpmbuild's _tmppath now respects --workdir (#714, Jordan Sissel)
|
||||
- gem/rpm: Add --rpm-verbatim-gem-dependencies to use old-style (fpm 0.4.x)
|
||||
rpm gem dependencies (#724, Jordan Sissel)
|
||||
- gem/rpm: Fix bug for gem pessimistic constraints when converting to rpm (Tom Duckering)
|
||||
- python: Fix small bug with pip invocations (#727, Dane Knecht)
|
||||
|
||||
1.1.0 (April 23, 2014)
|
||||
- New package type: zip, for converting to and from zip files (Jordan Sissel)
|
||||
- New package type: sh, a self-extracting package installation shell archive. (#651, Chris Gerber)
|
||||
- 'fpm --version' will now emit the version of fpm.
|
||||
- rpm: supports packaging fifo files (Adam Stephens)
|
||||
- deb: Add --deb-use-file-permissions (Adam Stephens)
|
||||
- cpan: Improve how fpm tries to find cpan artifacts for download (#614, Tim Nicholas)
|
||||
- gem: Add --gem-disable-dependency for removing one or more specific rubygem
|
||||
dependencies from the automatically-generated list (#598, Derek Olsen)
|
||||
- python: Add --python-scripts-executable for setting a custom interpreter to
|
||||
use for the hashbang line at the top of may python package scripts.
|
||||
(#628, Vladimir Rutsky)
|
||||
- Allow absolute paths with --directories even when --prefix is used (Vladimir Rutsky)
|
||||
- dir: Now correctly identifies hardlinked files and creates a package correctly
|
||||
with that knowledge (#365, #623, #659; Vladimir Rutsky)
|
||||
- rpm: Add --rpm-auto-add-exclude-directories for excluding directories
|
||||
from the --rpm-auto-add-directories behavior (#640, Vladimir Rutsky)
|
||||
- general: --config-files now accepts directories and will recursively mark any
|
||||
files within as config files inside the package (#642, Vladimir Rutsky)
|
||||
- general: If you specify a --config-files path that doesn't exist, you will
|
||||
now get an error. (#654, Alan Franzoni)
|
||||
- python: Support --python-pypi when using --python-pip (#652, David Lindquist)
|
||||
- deb: Tests now try to make packages ensure we don't upset lintian (#648, Sam Crang)
|
||||
- rpm: Fix architecture targeting (#676, Rob Kinyon)
|
||||
- rpm: Allow --rpm-user and --rpm-group to override the user/group even if
|
||||
--rpm-use-file-permissions is enabled. (#679, Jordan Sissel)
|
||||
- gem: Add --gem-version-bins for appending the gem version to the file name
|
||||
of executable scripts a rubygem may install. (Jan Vansteenkiste)
|
||||
- python: Attempt to provide better error messages for known issues in python
|
||||
environments (#664, Jordan Sissel)
|
||||
|
||||
1.0.2 (January 10, 2013)
|
||||
- rpm: No longer converts - to _ in dependency strings (#603, Bulat
|
||||
Shakirzyanov)
|
||||
- Handle Darwin/OSX tar invocations (now tries 'gnutar' and 'gtar'). (Jordan
|
||||
Sissel)
|
||||
- Process $HOME/.fpm, and $PWD/.fpm in the correct order and allow CLI flags
|
||||
to override fpm config file settings. (#615, Jordan Sissel)
|
||||
- Don't leave empty gem bin paths in packages that don't need them (#612,
|
||||
Jordan Sissel)
|
||||
- deb: Make --deb-compression=gz work correctly (#616, #617; Evan Krall,
|
||||
Jason Yan)
|
||||
|
||||
1.0.1 (December 7, 2013)
|
||||
- deb: Correctly handle --config-files given with a leading / (Jordan Sissel)
|
||||
|
||||
1.0.0 (December 5, 2013)
|
||||
- Config file of flags is now supported. Searches for $HOME/.fpm and
|
||||
$PWD/.fpm. If both exist, $HOME is loaded first so $PWD can override.
|
||||
(Pranay Kanwar)
|
||||
- pkgin: Basic support for SmartOS/pkgsrc's pkgin format. (#567, Brian Akins)
|
||||
- cpan: catch more cases of perllocal.pod and delete them
|
||||
(#510, Jordan Sissel)
|
||||
- cpan: Correctly support module version selection (#518, Matt Sharpe)
|
||||
- cpan: include builddeps in PERL5LIB when running cpan tests
|
||||
(#500, Matt Sharpe)
|
||||
- cpan: Avoid old system perl modules when doing module builds
|
||||
(#442, #513; Matt Sharpe)
|
||||
- python: safer gathering of python module dependencies.
|
||||
- python: better handling of unicode strings in python package metadata
|
||||
(#575, Bruno Renié)
|
||||
- cpan: Support 'http_proxy' env var. (#491, Patrick Cable)
|
||||
- deb: --deb-user and --deb-group both default to 'root' now
|
||||
(#504, Pranay Kanwar)
|
||||
- deb: convert '>' to '>>' in deb version constraints
|
||||
(#503, #439, Pranay Kanwar)
|
||||
- deb: Warn if epoch is set. Just so you know what's going on, since
|
||||
the default filename doesn't include the epoch. (#502, Pranay Kanwar)
|
||||
- deb,rpm: --config-files is now recursive if you give it a directory.
|
||||
This seems to be the most expected behavior by users.
|
||||
(#171, #506; Pranay Kanwar)
|
||||
- dir: Respect -C when using path mapping (#498, #507; Pranay Kanwar)
|
||||
- rpm: Add --rpm-ignore-iteration-in-dependencies to let you to depend
|
||||
on any release (aka iteration) of the same version of a package.
|
||||
(#364, #508; Pranay Kanwar)
|
||||
- dir: Handle copying of special files when possible
|
||||
(#347, #511, #539, #561; Pranay Kanwar)
|
||||
- rpm: Don't mistake symlinks as actual directories (#521, Nathan Huff)
|
||||
- npm: Choose an alternate npm registry with --npm-registry (#445, #524;
|
||||
Matt Sharpe)
|
||||
- cpan: Choose an alternate cpan server with --cpan-mirror. Additionally, you
|
||||
can use --cpan-mirror-only to only use this mirror for metadata queries.
|
||||
(#524, Matt Sharpe)
|
||||
- deb: Fix broken --deb-changelog flag (#543, #544; Tray Torrance)
|
||||
- deb: When --deb-upstart is given, automatically create an upstart-sysv
|
||||
symlink /etc/init.d/<name> to /lib/init/upstart-job (#545, Igor Galić)
|
||||
- rpm: Fix bug when generating spec file listings on files with strange
|
||||
characters in the names. (#547, Chris Chandler)
|
||||
- dir: Fix bug where the new directory mapping feature would cause you not
|
||||
to be able to select files with '=' in the name for packaging.
|
||||
(#556, #554; Pranay Kanwar)
|
||||
- python: Fix some unicode string issues in package metadata
|
||||
(#575, Bruno Renié)
|
||||
- gem-rpm: Now respects the --gem-package-name-prefix when generating the
|
||||
'rubygem(name)' provides statement (#585, Stepan Stipl)
|
||||
- deb: Downcase and replace underscores with dashes in 'provides' list.
|
||||
(#591, Eric Connell)
|
||||
- deb: Fix a lintian complaint about md5sums permissions (#593, Sam Crang)
|
||||
- cpan: Modules with 'MYMETA' files are now supported (#573, Michael Donlon)
|
||||
|
||||
0.4.42 (July 23, 2013)
|
||||
- dir: make source=destination mappings behave the same way 'rsync -a' does
|
||||
with respect to source and destination paths.
|
||||
|
||||
0.4.41 (July 17, 2013)
|
||||
- cpan: handle cases where modules don't specify a license
|
||||
- deb: support multiple init scripts (#487, patch by Kristian Glass)
|
||||
|
||||
0.4.40 (July 12, 2013)
|
||||
- dir: supports mapping one path to another.
|
||||
You set mappings by using 'source=destination' syntax. For example:
|
||||
% fpm -s dir -t deb -n example /home/jls/.zshrc=/etc/skel/
|
||||
The key above is the '=' symbol. The result of the above will be a package
|
||||
containing only /etc/skel/.zshrc
|
||||
For more, see https://github.com/jordansissel/fpm/wiki/Source:-dir#mapping
|
||||
- python: the default scripts location is now chosen by python itself. The
|
||||
previous default was "/usr/bin" and was not a good default. (#480)
|
||||
- rpm: config files should have attributes (#484, patch by adamcstephens)
|
||||
- python: correctly log the python setup.py exit code (#481, patch by Derek
|
||||
Ludwig)
|
||||
|
||||
0.4.39 (June 27, 2013)
|
||||
- cpan: support more complex dependency specifications (reported by Mabi
|
||||
Knittel)
|
||||
|
||||
0.4.38 (June 24, 2013)
|
||||
- cpan: fpm's cpan code now works under ruby 1.8.7
|
||||
- python: fix a bug in dependency handling (#461, Pranay Kanwar)
|
||||
- pear: Added --pear-data-dir flag (#465, Zsolt Takács)
|
||||
- cpan: fix a bug with some clean up on certain 64bit systems
|
||||
- gem: improve detection of the gem bin install path (#476, Tray Torrance)
|
||||
- rpm: fix bug when calling using --rpm-use-file-permissions
|
||||
(#464, Rich Horwood)
|
||||
|
||||
0.4.37 (May 30, 2013)
|
||||
- deb: fix creation failures on OS X (#450, patch by Anthony Scalisi and
|
||||
Matthew M. Boedicker)
|
||||
- deb: you can now set --deb-build-depends. This is generally for extremely
|
||||
rare use cases. (#451, patch by torrancew)
|
||||
- perl: add --cpan-perl-lib-path for a custom perl library installation path
|
||||
(#447, patch by Brett Gailey)
|
||||
|
||||
0.4.36 (May 15, 2013)
|
||||
- pear: only do channel-discover if necessary (#438, patch by Hatt)
|
||||
- cpan: now supports cpan modules that use Module::Build
|
||||
- cpan: --no-cpan-test now skips tests for build/configure dependencies
|
||||
- rpm: Add --rpm-defattrfile and --rpm-defattrdir flags (#428, patch
|
||||
by phrawzty)
|
||||
|
||||
0.4.35 -- was not announced
|
||||
|
||||
0.4.34 (May 7, 2013)
|
||||
- Now supports CPAN - Perl mongers rejoice! For example:
|
||||
'fpm -s cpan -t deb DBI'
|
||||
- deb: fixed some additional complaints by lintian (#420, patch by Pranay
|
||||
Kanwar)
|
||||
- rpm: add flags --rpm-autoreqprov, --rpm-autoreq, and --rpm-autoprov
|
||||
to tell rpm to enable that feature in the rpm spec. (#416, patch by Adam
|
||||
Stephens)
|
||||
|
||||
0.4.33 (April 9, 2013)
|
||||
- Now supports npm, the node package manager. For example:
|
||||
'fpm -s npm -t deb express'
|
||||
|
||||
0.4.32 (April 9, 2013)
|
||||
- COMPATIBILITY WARNING: rpm: The default epoch is now nothing because this
|
||||
aligns more closely with typical rpm packages in the real world. This
|
||||
decision was reached in #381. If you need the previous behavior, you
|
||||
must now specify '--epoch 1' (#388, patch by Pranay Kanwar)
|
||||
- python: new flag --python-obey-requirements-txt which makes a
|
||||
requirements.txt file from the python package used for the package
|
||||
dependencies instead of the usual setup.py dependencies. The default
|
||||
behavior without this flag is to respect setup.py. (#384)
|
||||
- deb: new flag --deb-shlibs to specify the content of the 'shlibs' file
|
||||
in the debian package (#405, patch by Aman Gupta)
|
||||
- deb: fixed a few lintian errors (empty conffiles, md5sums on symlinks, etc)
|
||||
- Add '-f' / '--force' flag to force overwriting an existing package output
|
||||
path (#385, Timothy Sutton)
|
||||
- New flag: --no-auto-depends flag to skip any automatic dependencies
|
||||
that would normally be added by gem, python, deb, and rpms input packages.
|
||||
(#386, #374; patch by Pranay Kanwar)
|
||||
- gem: Use 'gem' command to download gems and read gem package information.
|
||||
(#389, #394, #378, #233; patches by Pranay Kanwar and Chris Roberts)
|
||||
- rpm: dashes are now replaced with underscores in rpm version strings
|
||||
(#395, #393, #399; patches by Jeff Terrace and Richard Guest)
|
||||
- python: Only use the first line of a license; some python packages (like
|
||||
'requests') embed their full license copy into the license field. For
|
||||
the sake of sanity and function with most packaging systems, fpm only
|
||||
uses the first line of that license.
|
||||
- rpm: Add new 'none' option to --rpm-compression to disable compression
|
||||
entirely. (#398, patch by Richard Guest)
|
||||
- deb: Make dependencies using the '!=' operator represented as "Breaks"
|
||||
in the deb package (previously used "Conflicts"). (#400)
|
||||
- deb: Add md5sums to the debian packages which improves correctness
|
||||
of the package. (#403, #401; patch by Pranay Kanwar)
|
||||
- rpm: Convert all '!=' dependency operators to 'Conflicts'. Previously,
|
||||
this only applied to packages converting from python to rpm.
|
||||
(#404, #396; patch by Pranay Kanwar)
|
||||
|
||||
0.4.31 (March 21, 2013)
|
||||
- rpm: new flag --rpm-use-file-permissions which try to create an rpm
|
||||
that has file ownership/modes that exactly mirror how they are on
|
||||
the filesystem at package time. (#377, patch by Paul Rhodes)
|
||||
- general: remove empty directories only when they match the exclude
|
||||
pattern (#323, patch by Pranay Kanwar)
|
||||
|
||||
0.4.30 (March 21, 2013)
|
||||
- Solaris: --solaris-user and --solaris-group flags to specify
|
||||
the owner of files in a package. (#342, patch by Derek Olsen)
|
||||
- rpm: (bug fix) epoch of 0 is permitted now (#343, patch by Ben Hughes)
|
||||
- pear: add flags --pear-bin-dir --pear-php-bin --pear-php-dir (#358, patch
|
||||
by Zsolt Takács)
|
||||
- New 'source' type: empty. Allows you to create packages without any files
|
||||
in them (sometimes called 'meta packages'). Useful when you want to have
|
||||
one package be simply dependencies or when you want to spoof a package
|
||||
you don't want installed, etc. (#359, 349; patch by Pranay Kanwar)
|
||||
- solaris: Add --solaris-user and --solaris-group flags (#342, Patch by Derek
|
||||
Olsen)
|
||||
- gem: new flag --env-shebang; default true (disable with --no-env-shebang).
|
||||
Lets you disable #! (shebang) mangling done by gem installation. (#363,
|
||||
patch by Grier Johnson)
|
||||
- deb: fix bug on changelog handling (#376, patch by mbakke)
|
||||
- rpm: fix --rpm-rpmbuild-define (#383, patch by Eric Merritt)
|
||||
|
||||
0.4.29 (January 22, 2013)
|
||||
- Copy links literally, not what they point at (#337, patch by Dane Knecht)
|
||||
|
||||
0.4.28 (January 21, 2013)
|
||||
- Fix a dependency on the 'cabin' gem. (#344, reported by Jay Buffington)
|
||||
|
||||
0.4.27 (January 16, 2013)
|
||||
- Make all fpm output go through the logger (#329; patch by jaybuff)
|
||||
- New package type: osxpkg, for building packages installable on OS X. (#332,
|
||||
patch by Timothy Sutton)
|
||||
- Fix crash bug when converting rpms to something else (#316, #325; patch by
|
||||
rtucker-mozilla)
|
||||
- deb: Add --deb-field for setting a custom field in the control file.
|
||||
For more information on this setting, see section 5.7 "User-defined fields"
|
||||
of the debian policy manual:
|
||||
http://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.7
|
||||
- deb: Add --deb-recommends and --deb-suggests (#285, #310; patch by Pranay
|
||||
Kanwar)
|
||||
- python to rpm: convert "!=" dependency operators in python to "Conflicts"
|
||||
in rpm. (#263, #312; patch by Pranay Kanwar)
|
||||
- python: fix bug - ignore blank lines in requirements.txt (#312, patch by
|
||||
Pranay Kanwar)
|
||||
|
||||
0.4.26 (December 27, 2012)
|
||||
- rpm: add --rpm-sign flag to sign packages using the 'rpmbuild --sign' flag.
|
||||
(#311, Patch by Pranay Kanwar)
|
||||
- rpm: fix flag ordering when calling rpmbuild (#309, #315, patch by Trotter
|
||||
Cashion)
|
||||
- deb: re-enable "Predepends" support (#319, #320, patch by Pranay Kanwar)
|
||||
- rpm: fix default 'rpm os' value (#321, 314, 309)
|
||||
|
||||
0.4.25 (December 7, 2012)
|
||||
- Added --deb-changelog and --rpm-changelog support flags. Both take a path to
|
||||
a changelog file. Both must be valid changelog formats for their respective
|
||||
package types. (#300, patch by Pranay Kanwar)
|
||||
- deb: Multiple "provides" are now supported. (#301, patch by Pranay Kanwar)
|
||||
- rpm: Added --rpm-os flag to set the OS target for the rpm. This lets you build
|
||||
rpms for linux on OS X and other platforms (with --rpm-os linux). (#309)
|
||||
- rpm: Avoid platform-dependent commands in the %install phase (#309, fixes
|
||||
'cp -d' on OSX)
|
||||
- python: ignore comments in requirements.txt (#304, patch by Pranay Kanwar)
|
||||
- Fixed warning 'already initialized constant' (#274)
|
||||
|
||||
0.4.24 (November 30, 2012)
|
||||
- Don't include an empty url in rpm spec (#296, #276; patch by Pranay Kanwar)
|
||||
- Don't require extra parameters if you use --inputs (#278, #297; Patch by
|
||||
Pranay Kanwar)
|
||||
- python: supports requirements.txt now for dependency information.
|
||||
- python: supports pip now. Use '--python-pip path/to/pip' to have fpm use
|
||||
it instead of easy_install.
|
||||
- solaris: package building works again (#216, #299, patch by Pierre-Yves
|
||||
Ritschard)
|
||||
|
||||
0.4.23 (November 26, 2012)
|
||||
- The --directories flag is now recursive when the output package is rpm.
|
||||
This makes all directories under a given path as owned by the package
|
||||
so they'll be removed when the package is uninstalled (#245, #293, #294,
|
||||
patch by Justin Ellison)
|
||||
- Add fpm version info to '--help' output (#281)
|
||||
- gem to rpm: Use 'rubygem(gemname)' for dependencies (#284, patch by
|
||||
Jan Vansteenkiste)
|
||||
- Fix a bug in gem version mangling (#292, #291; patch by Pranay Kanwar)
|
||||
- Fix compatibility with Python 2.5 (#279, patch by Denis Bilenko)
|
||||
|
||||
0.4.22 (November 15, 2012)
|
||||
- Add --no-depends flag for creating packages with no dependencies listed
|
||||
(#289, patch by Brett Gailey)
|
||||
- Fix a bug where blank lines were present in a debian control file.
|
||||
(#288, patch by Andrew Bunday)
|
||||
|
||||
0.4.21 (November 8, 2012)
|
||||
- gem: remove restriction on expected gem names (#287)
|
||||
- add --directory flag; lets you mark a directory as being owned by a
|
||||
package. (#260, #245, patch by ajf8)
|
||||
- deb: don't include a version in the Provides field (#280)
|
||||
- gem: if the version is '1.1' make it imply '1.1.0' (#269, patch by
|
||||
Radim Marek)
|
||||
|
||||
0.4.20 (October 5, 2012)
|
||||
- python: only specify --install-{scripts,lib,data} flags to setup.py if
|
||||
they were given on the command line to fpm. Fixes #273.
|
||||
|
||||
0.4.19 (September 26, 2012)
|
||||
- Escape '%' characters in file names (#266, #222. Patch by John Wittkoski)
|
||||
|
||||
0.4.18 (September 25, 2012)
|
||||
- Fix regression in rpm building where the epoch in was missing in the rpm,
|
||||
but prior fpm versions defaulted it to 1. This caused rpms built with newer
|
||||
fpms to appear "older" than older rpms. Tests added to ensure this regression
|
||||
is caught prior to future releases! (Reported by eliklein)
|
||||
|
||||
0.4.17 (September 12, 2012)
|
||||
- Remove accidental JSON warning when using '-s python'
|
||||
|
||||
0.4.16 (September 6, 2012)
|
||||
- Fix compatibility with Ruby 1.8.7 (broken in 0.4.15)
|
||||
|
||||
0.4.15 (September 6, 2012)
|
||||
- pear: support custom channels with --pear-channel <channel> (#207)
|
||||
Example: fpm -s pear -t deb --pear-channel pear.drush.org drush
|
||||
- permit literal '\n' in --description, fpm will replace with a newline
|
||||
character. Example: fpm --description "line one\nline two" (#251)
|
||||
- improve error messaging when trying to output a package to a directory that
|
||||
doesn't exist (#244)
|
||||
- deb: convert '>' and '<' dependency operators to the correct '>>' and '<<'
|
||||
debian version operators (#250, patch by Thomas Meson).
|
||||
- deb: add --deb-priority flag (#232) for setting the debian 'priority'
|
||||
value for your package.
|
||||
- add --template-value. Used to expose arbitrary values to script templates.
|
||||
If you do --template-value hello=world, in your template you can do
|
||||
<%= hello %> to get 'world' to show up in your maintainer scripts.
|
||||
- python: add --python-install-data flag to set the --install-data option to
|
||||
setup.py (#255, patch by Thomas Meson)
|
||||
- Reject bad dependency flags (ones containing commas) and offer alternative.
|
||||
(#257)
|
||||
- Try to copy a file if hardlinking fails with permission problems (#253,
|
||||
patch by Jacek Lach)
|
||||
- Make --exclude, if a directory, include itself and any children, recursive.
|
||||
(#248)
|
||||
|
||||
0.4.14 (August 24, 2012)
|
||||
- rpm: Replace newlines with space in any license setting. (#252)
|
||||
|
||||
0.4.13 (August 14, 2012)
|
||||
- Make --exclude accept path prefixes as well. If you have a files in
|
||||
'usr/share/man' in your package, you can now exclude all of a subdir
|
||||
by doing '--exclude usr/share/man'
|
||||
|
||||
0.4.12 (August 10, 2012)
|
||||
- Fix a major bug introduced in 0.4.11 that caused all deb packages to
|
||||
contain empty maintainer scripts if not otherwise specified, which made
|
||||
apt/dpkg quite unhappy
|
||||
|
||||
0.4.11 (August 7, 2012)
|
||||
- Fix some symlink handling to prevent links from being followed during
|
||||
cleanup (#228, patch by sbuss)
|
||||
- rpm: 'vendor' in rpm spec is now omitted if empty or nil. This fixes a bug
|
||||
where rpmbuild fails due to empty 'Vendor' tag if you convert rpm to rpm.
|
||||
- internal: remove empty directories marked by --exclude (#205, patch by
|
||||
jimbrowne)
|
||||
- dir: don't try to set utime on symlinks (#234, #240, patch by ctgswallow)
|
||||
- rpm: relocatable rpms now supported when using the '--prefix' flag.
|
||||
Example: fpm -s dir -t rpm --prefix /usr/local -n example /etc/motd
|
||||
(patch by jkoppe)
|
||||
- deb: --deb-compression flag: Support different compression methods.
|
||||
Default continues to be gzip.
|
||||
- new flag: --template-scripts. This lets you write script templates for
|
||||
--after-install, etc. Templates are ERB, so you can do things like
|
||||
'<%= name %>' to get the package name in the script, etc.
|
||||
- warn on command invocations that appear to have stray flags to try and
|
||||
help users who have complex command lines that are failling.
|
||||
|
||||
0.4.10 (May 25, 2012)
|
||||
- Fix python package support for python3 (#212, patch by Slezhuk Evgeniy)
|
||||
- Preserve file metadata (time, owner, etc) when copying with the dir
|
||||
package. (#217, patch by Marshall T. Vandegrift)
|
||||
- Missing executables will now error more readably in fpm.
|
||||
- Fix gem and python 'version' selection (#215, #204)
|
||||
- Dependencies using '!=' will now map to 'Conflicts' in deb packages. (#221,
|
||||
patch by Sven Fischer)
|
||||
- Allow setting default user/group for files in rpm packages (#208, patch by
|
||||
Jason Rogers). Note: This adds --user and --group flags to effect this.
|
||||
These flags may go away in the future, but if they do, they will be
|
||||
- In python packages set 'install-data' correctly. (#223, patch by Jamie
|
||||
Scheinblum)
|
||||
|
||||
0.4.9 (April 25, 2012)
|
||||
- Fix --prefix support when building gems (#213, patch by Jan Vansteenkiste)
|
||||
|
||||
0.4.8 (April 25, 2012)
|
||||
- RPM: use 'noreplace' option for config files (#194, patch by Steve Lum)
|
||||
- Python: Fix bug around exact dependency versions (#206, patch by Lars van
|
||||
de Kerkhof)
|
||||
- Gem->RPM: Make 'provides' "rubygem(thegemname)" instead of "rubygem-thegemname"
|
||||
- Fix oddity where Ruby would complain about constant redefinition (#198,
|
||||
patch by Marcus Vinicius Ferreira)
|
||||
|
||||
0.4.7 skipped.
|
||||
|
||||
0.4.6 (April 10, 2012)
|
||||
- Work around more problems in RPM with respect to file listing (#202)
|
||||
|
||||
0.4.5 (April 3, 2012)
|
||||
- Fix gem->rpm conversion where the '~>' rubygem version operator (#193,
|
||||
patch by antoncohen)
|
||||
- Escape filenames RPM install process (permits files with spaces, dollar signs, etc)
|
||||
(#196, reported by pspiertz)
|
||||
|
||||
0.4.4 (March 30, 2012)
|
||||
- Fix a bug in gem bin_dir handling (Calen Pennington)
|
||||
- The --config-files flag should work again (Brian Akins)
|
||||
- Fix syntax error when using --deb-pre-depends (Andrew Bennett)
|
||||
- Make --exclude work again (#185, #186) (Calen Pennington)
|
||||
- Fix file listing so that rpm packages don't declare ownership on / and
|
||||
/usr, etc.
|
||||
- make --deb-custom-control to work again (Tor Arne Vestbø)
|
||||
- Add --rpm-digest flag to allow selection of the rpm 'file name' digest
|
||||
algorithm. Default is 'md5' since it works on the most rpm systems.
|
||||
- Reimplement old behavior assuming "." as the input when using '-s dir' and
|
||||
also setting -C (#187)
|
||||
- Set BuildRoot on rpm to work around an rpmbuild bug(?) on CentOS 5 (#191)
|
||||
- Add --rpm-compression flag to allow selection of the rpm payload
|
||||
compression. Default is 'gzip' since it works on the most rpm systems
|
||||
- Specs now pass on ubuntu/32bit systems (found by travis-ci.org's test runner)
|
||||
- Improve default values of iteration and epoch (#190)
|
||||
- Make FPM::Package#files list only 'leaf' nodes (files, empty directories,
|
||||
symlinks, etc).
|
||||
|
||||
0.4.3 (March 21, 2012)
|
||||
- Fix bug in python packaging when invoked with a relative path to a setup.py
|
||||
(Reported by Thomas Meson, https://github.com/jordansissel/fpm/pull/180)
|
||||
|
||||
0.4.2 (March 21, 2012)
|
||||
- Set default temporary directory to /tmp
|
||||
(https://github.com/jordansissel/fpm/issues/174)
|
||||
- Improve symlink handling (patch by Aleix Conchillo Flaqué, pull/177))
|
||||
- Python package support changes (thanks to input by Luke Macken):
|
||||
* New flag: --python-install-bin. Sets the location for python package
|
||||
scripts (default: /usr/bin)
|
||||
* New flag: --python-install-lib. Sets the location for the python
|
||||
package to install libs to, default varies by system. Usually something
|
||||
like /usr/lib/python2.7/site-packages.
|
||||
* Fix up --prefix support
|
||||
* Improve staged package installation
|
||||
|
||||
0.4.1 (March 19, 2012)
|
||||
- Fix fpm so it works in ruby 1.8 again.
|
||||
Tests run, and passing:
|
||||
rvm 1.8.7,1.9.2,1.9.3 do bundle exec rspec
|
||||
|
||||
0.4.0 (March 18, 2012)
|
||||
- Complete rewrite of pretty much everything.
|
||||
* Otherwise, the 'fpm' command functionality should be the same
|
||||
* Please let me know if something broke!
|
||||
- Now has an API (see examples/api directory)
|
||||
- Also has a proper test suite
|
||||
- Updated the rpm spec generator to disable all the ways I've found rpmbuild
|
||||
to molest packages. This means that fpm-generated rpms will no longer
|
||||
strip libraries, move files around, randomly mutate jar files, etc.
|
||||
- Add --license and --vendor settings (via Pieter Loubser)
|
||||
- python support: try to name python packages sanely. Some pypi packages
|
||||
are literally called 'python-foo' so make sure we generate packages named
|
||||
'python-foo' and not 'python-python-foo' (via Thomas Meson)
|
||||
- rpm support: Add --rpm-rpmbuild-define for passing a --define flag to rpmbuild
|
||||
(via Naresh V)
|
||||
- PHP pear source support (fpm -s pear ...) (via Andrew Gaffney)
|
||||
|
||||
0.3.10 (Oct 10, 2011)
|
||||
- Allow taking a list of files/inputs on stdin with '-' or with the --inputs
|
||||
flag. (Matt Patterson)
|
||||
- (python) pass -U to easy_install (Khalid Goudeaux)
|
||||
- (debian) quote paths in md5sum calls (Matt Patterson)
|
||||
- (debian) quiet stderr from dpkg --print-architecture
|
||||
|
||||
0.3.9 (Sep 8, 2011)
|
||||
- Fix bug in 'dir' source that breaks full paths
|
||||
- Added a bunch of tests (yaay)
|
||||
|
||||
0.3.8 and earlier: I have not kept this file up to date very well... Sorry :(
|
||||
|
||||
0.2.29 (May 20, 2011)
|
||||
- Add 'tar' source support. Useful for binary releases to repackage as rpms
|
||||
and debs. Example:
|
||||
fpm -s tar -t rpm -n firefox -v 4.0.1 \
|
||||
--prefix /opt/firefox/4.0.1 firefox-4.0.1.tar.bz2
|
||||
|
||||
0.2.28 (May 18, 2011)
|
||||
- Use --replaces as "Obsoletes" in rpms.
|
||||
|
||||
0.2.27 (May 18, 2011)
|
||||
- If present, DEBEMAIL and DEBFULLNAME environment variables will be used as
|
||||
the default maintainer. Previously the default was simply <$user@$hostname>
|
||||
https://github.com/jordansissel/fpm/issues/37
|
||||
- Add '--replaces' flag for specifying packages replaced by the one you are
|
||||
building. This only functions in .deb packages now until I find a suitable
|
||||
synonym in RPM.
|
||||
- Add --python-bin and --python-easyinstall flags. This lets you choose specific
|
||||
python and easy_install tools to use when building. Default is simply
|
||||
'python' and 'easy_install' respectively.
|
||||
- Add support for ~/.fpmrc - The format of this file is the same as the flags.
|
||||
One flag per line. https://github.com/jordansissel/fpm/issues/38
|
||||
Example:
|
||||
--python-bin=/usr/bin/python2.7
|
||||
--python-easyinstall=/usr/bin/easy_install2.7
|
||||
|
||||
0.2.26 and earlier
|
||||
No changelist tracked. My bad, yo.
|
||||
|
|
@ -0,0 +1,739 @@
|
|||
Release Notes and Change Log
|
||||
============================
|
||||
|
||||
1.17.0 (October 2, 2025)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* python: Support modern Python project features: pyproject.toml, wheels, etc. Now, any project that can be built or installed with ``pip`` can be packaged by fpm. Previously, fpm relied on a long-deprecated features in setup.py to see a python project's metadata such as name, version, and dependencies. Fpm now uses python's package tools to identify the project's name, version, dependencies, and other information. (`#2104`_, `#2105`_, `#2040`_, `#1982`_, `#2029`_; Jordan Sissel, cwegener, amdei, gmabey)
|
||||
* dir: When copying files, only use hardlinks if the original files were also hardlinks. (`#2103`_, `#2102`_; Michael Telatynski, Matthew Rathbone, Jordan Sissel). :w
|
||||
Related: https://github.com/electron-userland/electron-builder/issues/5721
|
||||
* deb: bug fix: when a file given with ``--config-files <path>`` copied into the package, fpm was forgetting to mark the file as being a config file in the package, aka Debian "conffiles" (`#2027`_, `#1823`_; Alexandr Zarubkin, Kientz Arnaud)
|
||||
* pacman: Now can build packages with aarch64 and arm7hf architecture (`#2017`_; Markson Hon)
|
||||
* rpm: Paths with '{' and '}' characters can now be included in rpms (`#2088`_ `#2087`_; Jordan Sissel, Manish2481983)
|
||||
* docs: Updated urls which pointed at rpm documentation (`#2092`_, `#2011`_, `#2054`_; André Kelpe, Natanael Arndt)
|
||||
* Ruby 3.4.0 no longer gives warnings related to `ostruct` (`#2106`_, also `#2104`_ and `#2103`_; Jordan Sissel)
|
||||
|
||||
1.16.0 (December 8, 2024)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* deb: Add support for zstd compression (`#2009`_, `#2084`_; Ștefan Rusu)
|
||||
* deb: Add compression level setting, ``--deb-compression-level`` (`#2036`_; Hugo Beauzée-Luyssen)
|
||||
* rpm: Generate an empty rpm changelog if none is given. This should help cases where ``rpmlint`` would complain about missing a changelog entry in the rpm. (`#2041`_; Gordon Bleux)
|
||||
* deb: When converting from an rpm, remove package information that is not valid on Debian systems. (`#2053`_, `#1627`; Jordan Stopford, Jamesits)
|
||||
* python: Fix bug when PYTHONPATH has spaces in it (`#2062`_; Kristof Willaert)
|
||||
* deb: You can now choose a different systemd directory with ``--deb-systemd-path`` (`#2063`_; Reinier Schoof)
|
||||
* freebsd: OS version can now be specified with ``--freebsd-osversion``: (`#2064`_; David Newhall II)
|
||||
* freebsd: Improve the 'architecture' value used by fpm to generate freebsd packages (`#2064`_, `#1880`_; David Newhall II, Matthew R Kasun)
|
||||
* deb: Timer units can be given to ``--deb-systemd`` now (`#2065`_, `#1978`_; phillipp, Robert Schneider)
|
||||
* rpm: When converting cpan packages, use newer ``perl-interpreter`` dependency name. To use the old dependency name ``perl``, use the flag ``--rpm-old-perl-dependency-name`` (`#2066`_, `#2085`_; Kevin Duret, Nicholas Hubbard, William N. Braswell, Jr., Jordan Sissel))
|
||||
* Some errors now correctly print just an error message instead of dumping a ruby stack trace (`#2067`_; Jordan Sissel)
|
||||
* python: Support modules which download as zip files (`#2068`_, `#2074`_, `#2072`_; Matt Ezell, hussainbani, hbani)
|
||||
* rpm: Fix rpm build failures on Fedora 41 (`#2082`_, `#2076`_; Wayne Heaney, Antheas Kapenekakis, Romain Geissler)
|
||||
|
||||
|
||||
1.15.1 (January 31, 2023)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Ruby 3.2.0 now supported. This fixes error 'undefined method exists? for File' '(`#1981`_, `#1988`_; Nicholas Hubbard, romulasry)
|
||||
|
||||
1.15.0 (November 13, 2022)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* New flag ``--fpm-options-file path/to/file`` which allows you to specify additional fpm flags in an external file of your choosing. (`#1905`_, `#1902`_, `#1827`_; Jordan Sissel, Will Furnell, hjpotter92)
|
||||
* deb: Periods are now accepted in package names (`#1899`_; C. Cooke)
|
||||
* Fix bug where fpm would crash if ``--workdir`` pointed at a path that didn't
|
||||
exist. (`#1959`_; Jordan Sissel)
|
||||
* osxpkg: this package format now supports the fpm ``--prefix`` flag(`#1909`_, `#1908`_; Jordan Sissel, mcataga)
|
||||
* cpan: Fix bug where fpm would fail on certain Perl modules due to their source tarball structure (`#1940`_; Nicholas Hubbard, William N. Braswell, Jr.)
|
||||
* cpan: Fix crash on certain CPAN modules where the author field was blank (`#1942`_, `#1937`_, `#1523`_, `#1528`_; Nicholas Hubbard, William N. Braswell, Jr.)
|
||||
* deb: The distribution field of the debian changelog and changes files will now use the value set by ``--deb-dist`` (default is "unstable") (`#1934`_; Chabert Loïc)
|
||||
* python: Fix errors in how fpm invoked ``pip``. Previously, fpm would use pip's ``--build`` flag, but this was removed a while ago, and fpm is now aware! (`#1896`_, `#1831`_, `#1893`_, `#1916`_; Jordan Sissel, Svyatogor Chuykov)
|
||||
* pleaserun: Add ``--pleaserun-user`` flag. (`#1912`_; Evgeny Stambulchik)
|
||||
* deb: The default ``--deb-priority`` is now "optional" instead of "extra" (`#1913`_; Chris Novakovic)
|
||||
* Enable installation of fpm on older versions of ruby. This change removed ``git`` rubygem dependency. (`#1946`_, `#1923`_; Jordan Sissel, Andreas Wirooks, Ruslan Kuprieiev, jamshid, Lorenzo Castellino, Sam Hughes)
|
||||
* Enable operation of fpm on very old versions of ruby (as old as Ruby 1.9.3). This changed removed ``json`` rubygem dependency. (`#1950`_, `#1949`_, `#1741`_, `#1264`_, `#1798`_, `#1800`_, `#1784`_; Jordan Sissel and many others)
|
||||
* Fix bug where subprocesses could hang waiting for input (`#1955`_, `#1519`_, `#1522`_; Nicholas Hubbard, William N. Braswell, Jr.)
|
||||
* Update Dockerfile to use ubuntu:20.04 (`#1935`_; Gnought)
|
||||
* internal: Fix a code typo (`#1948`_; Nicholas Hubbard)
|
||||
* internal tests: Support newer versions of lintian (`#1939`_, `#1907`_; Jordan Sissel)
|
||||
* Improve support for Ruby 3.1.0 and newer that would previously crash with an error mentioning Psych::DisallowedClass (`#1898`_, `#1895`_; Jordan Sissel, Alexandre ZANNI)
|
||||
* Improve support for Ruby 3.1.0 and newer that changed the API for ERB (`#1897`_; Jordan Sissel)
|
||||
|
||||
1.14.2 (March 30, 2022)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* deb: fix bug causing ``--deb-compression none`` to invoke ``tar`` incorrectly (`#1879`_; John Howard)
|
||||
* rpm: Better support for paths that have spaces and mixed quotation marks in them. (`#1882`_, `#1886`_, `#1385`_; John Bollinger and Jordan Sissel)
|
||||
* pacman: Fix typo preventing the use of ``--pacman-compression xz`` (`#1876`_; mszprejda)
|
||||
* docs: All supported package types now have dedicated documentation pages. Some pages are small stubs and would benefit from future improvement. (`#1884`_; mcandre, Jordan Sissel)
|
||||
* docs: Small but lovely documentation fixes (`#1875`_ by Corey Quinn, `#1864`_ by Geoff Beier)
|
||||
* Fixed mistake causing the test suite to fail when ``rake`` wasn't available. (`#1877`_; Jordan Sissel)
|
||||
|
||||
1.14.1 (November 10, 2021)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fix a bug that impacted fpm api usage (from other ruby programs) that caused an error "NameError: uninitialized constant FPM::Package::CPAN" when trying to output a Deb package. (`#1854`_, `#1856`_; Karol Bucek, Jordan Sissel)
|
||||
|
||||
1.14.0 (November 9, 2021)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* python: Use pip by default for fetching Python packages. This matches the Python 3 "installation" docs which recommend calling pip as ``python -m pip`` where ``python`` depends on ``--python-bin`` (default "python"). Previous default was to use `easy_install` which is no longer available on many newer systems. To use easy_install, you can set ``--no-python-internal-pip`` to revert this pip default. Further, you can specify your own pip path instead of using ``python -m pip`` with the ``--python-pip /path/to/pip`` flag. (`#1820`_, `#1821`_; Jordan Sissel)
|
||||
* python: Support extras_require build markers in python packages (`#1307`_, `#1816`_; Joris Vandermeersch)
|
||||
* freebsd: Fix bug which caused fpm to generate incorrect FreeBSD packages "missing leading `/`" (`#1811`_, `#1812`_, `#1844`_, `#1832`_, `#1845`_; Vlastimil Holer, Clayton Wong, Markus Ueberall, Jordan Sissel)
|
||||
* deb: In order to only allow fpm to create valid packages, fpm now rejects packages with invalid "provides" (``--provides``) values. (`#1829`_, `#1825`_; Jordan Sissel, Peter Teichman)
|
||||
* deb: Only show a warning about /etc and config files if there are files in /etc (`#1852`_, `#1851`_; Jordan Sissel)
|
||||
|
||||
* rpm: replace dash with underscore in rpm's "Release" field aka what fpm calls ``--iteration``. (`#1834`_, `#1833`_; Jordan Sissel)
|
||||
* empty: `fpm -s empty ...` now defaults to "all" architecture instead of "native". (`#1850`_, `#1846`_; Jordan Sissel)
|
||||
* Significant documentation improvements rewriting most of the documentation. New overview pages, full CLI flag listing, and new sections dedicated package types (rpm, cpan, deb, etc). (`#1815`_, `#1817`_, `#1838`_; Vedant K, Jordan Sissel)
|
||||
* Typo fixes in documentation are always appreciated! (`#1842`_; Clayton Wong)
|
||||
* fpm can now (we hope!) now be tested more easily from docker (`#1818`_, `#1682`_, `#1453`_; @directionless, Jordan Sissel, Douglas Muth)
|
||||
|
||||
1.13.1 (July 6, 2021)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
* deb: The `--provides` flag now allows for versions. Previously, fpm would
|
||||
remove the version part of a provides field when generating deb packages.
|
||||
(`#1788`_, `#1803`_; Jordan Sissel, Phil Schwartz, tympanix)
|
||||
* osxpkg: Update documentation to include installing `rpm` tools on OSX
|
||||
(`#1797`_; allen joslin)
|
||||
|
||||
1.13.0 (June 19, 2021)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Apple M1 users should now work (`#1772`_, `#1785`_, `#1786`_; Jordan Sissel)
|
||||
* Removed `ffi` ruby library as a dependency. This should make it easier to support a wider range of Ruby versions (Ruby 2.2, 3.0, etc) and platforms (like arm64, Apple M1, etc) in the future. (`#1785`_, `#1786`_; Jordan Sissel)
|
||||
* Now uses the correct architecture synonym for ARM 64 systems. Debian uses `arm64` as a synonym for what other systems call `aarch64` (linux kernel, RPM, Arch Linux). (`#1775`_; Steve Kamerman)
|
||||
* Docs: Fix a typo in an example (`#1785`_; Zoe O'Connell)
|
||||
* rpm: File paths can now contain single-quote characters (`#1774`_; Jordan Sissel)
|
||||
* rpm: Use correct SPEC syntax when using --after-upgrade or similar features (`#1761`_; Jo Vandeginste. Robert Fielding)
|
||||
* Ruby 3.0 support: Added `rexml` as a runtime dependency. In Ruby 2.0, `rexml` came by default, but in Ruby 3.0, `rexml` is now a bundled gem and some distributiosn do not include it by default. (`#1794`_; Jordan Sissel)
|
||||
* Fix error "git: not found (Git::GitExecuteError)". Now loads `git` library only when using git features. (`#1753`_, `#1748`_, `#1751`_, `#1766`_; Jordan Sissel, Cameron Nemo, Jason Rogers, Luke Short)
|
||||
* deb: Fix syntax error in `postinst` (`--after-install`) script. (`#1752`_, `#1749`_, `#1764`_; rmanus, Adam Mohammed, Elliot Murphy, kimw, Jordan Sissel)
|
||||
* deb: --deb-compression now uses the same compression and file suffix on the control.tar file (`#1760`_; Philippe Poilbarbe)
|
||||
|
||||
|
||||
1.12.0 (January 19, 2021)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* Pin ffi dependency to ruby ffi 1.12.x to try keeping fpm compatible with older/abandoned rubies like 2.0 and 2.1. (`#1709`_; Matt Patterson)
|
||||
* deb: New flag to add 'set -e' to all scripts. `--deb-maintainerscripts-force-errorchecks` which defaults to off. (`#1697`_; Andreas Ulm)
|
||||
* deb: Fix bug when converting rubygems to debs where certain constraints like `~>1` would generate a deb dependency that couldn't be satisfied. (`#1699`_; Vlastimil Holer)
|
||||
* deb: Fix error 'uninitialized constant FPM::Package::Deb::Zlib' (`#1739`_, `#1740`_; Federico Lancerin)
|
||||
* python: Prepend to PYTHONPATH instead of replacing it. This should help on platforms that rely heavily on PYTHONPATH, such as NixOSX (`#1711`_, `#1710`_; anarg)
|
||||
* python: Add `--python-trusted-host` flag which passes `--trusted-host` flag to `pip` (`#1737`_; Vladimir Ponarevsky)
|
||||
* Documentation improvements (`#1724`_, `#1738`_, `#1667`_, `#1636`_)
|
||||
* Dockerfile updated to Alpine 3.12 (`#1745`_; Cameron Nemo)
|
||||
* Remove the 'backports' deprecation warning (`#1727`_; Jose Galvez)
|
||||
* sh: Performance improvement when printing package metadata (`#1729`_; James Logsdon, Ed Healy)
|
||||
* rpm: Add support for `xzmt` compression (multithreaded xz compressor) to help when creating very large packages (several gigabytes). (`#1447`_, `#1419`_; amnobc)
|
||||
* rpm: Add `--rpm-macro-expansion` flag to enable macro expansion in scripts during rpmbuild. See https://rpm.org/user_doc/scriptlet_expansion.html for more details. (`#1642`_; juliantrzeciak)
|
||||
* deb: use correct control.tar filename (`#1668`_; Mike Perham)
|
||||
|
||||
1.11.0 (January 30, 2019)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* snap: Snap packages can now be created! (`#1490`_; kyrofa)
|
||||
* Fix an installation problem where a dependency (childprocess) fails to install correctly. (#1592; Jordan Sissel)
|
||||
|
||||
1.10.2 (July 3, 2018)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* cpan: Fix a crash where fpm would crash trying to parse a perl version string (`#1515`_, `#1514`; Jordan Sissel, William N. Braswell, Jr)
|
||||
|
||||
1.10.1 (July 3, 2018)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* cpan: Fixes some package building by setting PERL5LIB correctly (`#1509`_, `#1511`_; William N. Braswell, Jr)
|
||||
* cpan: Adds `--[no-]cpan-verbose` flag which, when set, runs `cpanm` with the `--verbose` flag (`#1511`_; William N. Braswell, Jr)
|
||||
|
||||
1.10.0 (May 21, 2018)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* Pin `ruby-xz` dependency to one which allows Ruby versions older than 2.3.0 (`#1494`_; Marat Sharafutdinov)
|
||||
* Documentation improvements: `#1488`_; Arthur Burkart. `#1384`_; Justin Kolberg. `#1452`_; Anatoli Babenia.
|
||||
* python: Improve support for the `~=` dependency comparison. (`#1482`_; Roman Vasilyev)
|
||||
* deb: Add `--deb-generate-changes` flag to have fpm output a `.changes` file (`#1492`_; Spida)
|
||||
* deb: Add `--deb-dist` flag to set the target distribution (similar to `--rpm-dist`). (`#1492`_; Spida)
|
||||
* apk: Make --before-install, --before-upgrade, and --after-upgrade work correctly. (`#1422`_; Charles R. Portwood II)
|
||||
* rpm: add `xzmt` for multithreaded xz compression (Amnon BC)
|
||||
* rpm: fix shell function name `install` conflicting with `install` program. In
|
||||
postinst (after-install), the function is now called `_install` to avoid
|
||||
conflicting with `/usr/bin/install` (`#1434`_; Torsten Schmidt)
|
||||
* rpm: Allow binary "arch dependent" files in noarch rpms (Jordan Sissel)
|
||||
* - deb: --config-files ? (`#1440`_, `#1443`_; NoBodyCam)
|
||||
* FPM source repo now contains a Brewfile for use with Homebrew.
|
||||
* FPM source repo has a Dockerfile for invoking fpm with docker. (`#1484`_, ;Allan Lewis
|
||||
|
||||
1.9.3 (September 11, 2017)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* fix a bug when coyping a symlink using path mapping would result in the link creating a directory to hold think. (`#1395`_; Nemanja Boric)
|
||||
|
||||
1.9.2 (July 29, 2017)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* rpm: Fix `--config-files` handling (`#1390`_, `#1391`_; Jordan Sissel)
|
||||
|
||||
1.9.1 (July 28, 2017) happy sysadmin day!
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* Documentation improvements: `#1291`_; Pablo Castellano. `#1321`_; ge-fa. `#1309`_; jesusbagpuss. `#1349`_; Perry Stole. `#1352`_, Jordan Sissel. `#1384`_; Justin Kolberg.
|
||||
* Testing improvements: `#1320`_; Rob Young. `#1266`_; Ryan Parman. `#1374`_; Thiago Figueiró.
|
||||
* Fix bug so fpm can now copy symlinks correctly (`#1348`_; ServiusHack)
|
||||
* apk: Improve performance (`#1358`_; Jan Delgado)
|
||||
* cpan: Fix crash when CPAN query returns a version value that was a number and fpm was expecting a string. (`#1344`_, `#1343`_; liger1978)
|
||||
* cpan: Fix MetaCPAN searches to use v1 of MetaCPAN's API. The v0 API is no longer provided by MetaCPAN. (`#1341`_, `#1339`_; Bob Bell)
|
||||
* cpan: Have perl modules implicitly "provide" (`--provides`) capabilities. (`#1340`_; Bob Bell. `#1345`_; liger1978)
|
||||
* cpan: Now transforms perl version values like "5.008001" to "5.8.1" (`#1342`_; Bob Bell)
|
||||
* cpan: Use `>=` ("this version or newer") for package dependencies instead of `=` ("exactly this version"). (`#1338`_; Bob Bell)
|
||||
* deb: Add `--deb-after-purge` flag for running a script after `apt-get purge` is run. (Alexander Weidinger)
|
||||
* deb: fix bug when using `--deb-upstart` would use the wrong file name (`#1325`_, `#1287`_; vbakayev)
|
||||
* deb: New flags `--deb-interest-noawait` and `--deb-activate-nowait`. (`#1225`_, `#1359`_; Philippe Poilbarbe)
|
||||
* dir: Remove a debug statement that would put fpm into a debug prompt (`#1293`_, `#1259`_; Joseph Anthony Pasquale Holsten)
|
||||
* dir: When using `path mapping`_ (`a=b` syntax), and `a` is a symlink, use the path `b` as the symlink, not `b/a` (`#1253`_, Nemanja Boric)
|
||||
* gem: Can now make reproducible_builds_ when building a deb (`-s gem -t deb`). See the `Deterministic output`_ docs.
|
||||
* gem: Add `--gem-embed-dependencies` flag to include in the output package all dependent gems of the target. For example, `fpm -s gem -t rpm --gem-embed-dependencies rails` will create a single `rails` rpm that includes active_support, active_record, etc.
|
||||
* pleaserun: Add more flags (`--pleaserun-chdir`, `--pleaserun-user`, etc) to allow more customization of pleaserun services. (`#1311`_; Paulo Sousa)
|
||||
* python: Add `--python-setup-py-arguments` flag for passing arbitrary flags to `python setup.py install` (`#1120`_, `#1376`_; Ward Vandewege, Joseph Anthony Pasquale Holsten)
|
||||
* rpm: --config-files can now copy files from outside of the package source. This means you can do things like `fpm -s gem -t rpm --config-files etc/my/config` and have `etc/my/config` come from the local filesystem. (`#860`_, `#1379`_; jakerobinson, Joseph Anthony Pasquale Holsten)
|
||||
* tar: Only create `.scripts` directory if there are scripts to include (`#1123`_, `#1374`_; Thiago Figueiró)
|
||||
* virtualenv: Add `--virtualenv-find-links` flag which appends `--find-links` to the `pip install` command.
|
||||
* virtualenv: documentation improvements (Nick Griffiths)
|
||||
* virtualenv: Make `--prefix` useful and deprecate `--virtualenv-install-location` (`#1262`_; Nick Griffiths)
|
||||
* zip: fix bug in output where the temporary directory would be included in the file listing (`#1313`_, `#1314`_; Bob Vincent)
|
||||
* Other: Remove unused archive-tar-minitar as a dependency of fpm (`#1355`_; Diego Martins)
|
||||
* Other: Add stud as a runtime dependency (`#1354`_; Elan Ruusamäe)
|
||||
|
||||
.. _reproducible_builds: https://reproducible-builds.org/
|
||||
.. _path mapping: source/dir.html#path-mapping
|
||||
.. _Deterministic output: source/gem.html
|
||||
|
||||
1.9.0 (July 28, 2017)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Yanked offline. I forgot some dependency changes. Hi.
|
||||
|
||||
1.8.1 (February 7, 2017)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Pin archive-tar-minitar library to version 0.5.2 to work around a problem breaking `gem install fpm`
|
||||
|
||||
1.8.0 (December 28, 2016)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* virtualenv: Add `--virtualenv-setup-install` flag to run `setup.py install` after pip finishes installing things. (`#1218`_; John Stowers)
|
||||
* virtualenv: Add `--virtualenv-system-site-package` flag which creates the virtualenv in a way that allows it to use the system python packages. (`#1218`_; John Stowers)
|
||||
* cpan: Fix bug preventing some perl modules from being installed (`#1236`_, `#1241`_; Richard Grainger)
|
||||
* rpm: Documentation improvements (`#1242`_; Nick Griffiths)
|
||||
|
||||
1.7.0 (November 28, 2016)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* virtualenv: Fix a bug where `pip` might be run incorrectly (`#1210`_; Nico Griffiths)
|
||||
* FreeBSD: --architecture (-a) flag now sets FreeBSD package ABI (`#1196`_; Matt Sharpe)
|
||||
* perl/cpan: Fix bug and now local modules can be packaged (`#1202`_, `#1203`_; liger1978)
|
||||
* perl/cpan: Add support for `http_proxy` environment variable and improve how fpm queries CPAN for package information. (`#1206`_, `#1208`_; liger1978)
|
||||
* Fix crash for some users (`#1231`_, `#1148`_; Jose Diaz-Gonzalez)
|
||||
* Documentation now published on fpm.readthedocs.io. This is a work-in progress. Contributions welcome! <3 (`#1237`_, Jordan Sissel)
|
||||
* deb: Can now read bz2-compressed debian packages. (`#1213`_; shalq)
|
||||
* pleaserun: New flag --pleaserun-chdir for setting the working directory of a service. (`#1235`_; Claus F. Strasburger)
|
||||
|
||||
1.6.3 (September 15, 2016)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fix bug in fpm's release that accidentally included a few `.pyc` files (`#1191`_)
|
||||
|
||||
1.6.2 (July 1, 2016)
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
* Reduce `json` dependency version to avoid requiring Ruby 2.0 (`#1146`_, `#1147`_; patch by Matt Hoffman)
|
||||
* pacman: skip automatic dependencies if --no-auto-depends is given (Leo P)
|
||||
* rpm: Fix bug where --rpm-tag was accidentally ignored (`#1134`_, Michal Mach)
|
||||
* deb: Omit certain fields from control file if (Breaks, Depends, Recommends, etc) if there are no values to put in that field. (`#1113`_, TomyLobo)
|
||||
* rpm: remove trailing slash from Prefix for rpm packages (`#819`_, luto)
|
||||
* virtualenv: Now supports being given a requirements.txt as the input. (Nick Griffiths)
|
||||
|
||||
1.6.1 (June 10, 2016)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
* freebsd: Only load xz support if we are doing a freebsd output. (`#1132`_, `#1090`_, Ketan Padegaonkar)
|
||||
|
||||
1.6.0 (May 25, 2016)
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
* New source: pleaserun. This lets you create packages that will install a system service. An after-install script is used in the package to determine which service platform to target (systemd, upstart, etc). Originated from Aaron Mildenstein's work on solving this problem for Logstash. (`#1119`_, `#1112`_)
|
||||
* New target: Alpine Linux "apk" packages. (`#1054`_, George Lester)
|
||||
* deb: don't append `.conf` to an upstart file if the file name already ends in `.conf`. (`#1115`_, josegonzalez)
|
||||
* freebsd: fix bug where --package flag was ignored. (`#1093`_, Paweł Tomulik)
|
||||
* Improvements to the fpm rake tasks (`#1101`_, Evan Gilman)
|
||||
|
||||
1.5.0 (April 12, 2016)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Arch package support is now available via -s pacman and -t pacman. (`#916`_; wonderful community effort making this happen!)
|
||||
* FreeBSD packages can now be built `-t freebsd` (`#1073`_; huge community effort making this happen!)
|
||||
* You can now set fpm flags and arguments with the FPMOPTS environment variable (`#977`_, mildred)
|
||||
* Using --exclude-file no longer causes a crash. Yay! (`#982`_, wyaeld)
|
||||
* A new rake task is available for folks who want to invoke fpm from rake (`#756`_, pstengel)
|
||||
* On FreeBSD, when tarring, gtar is now used. (`#1008`_, liv3d)
|
||||
* virtualenv: Add --virtualenv-pypi-extra-url flag to specify additional PyPI locations to use when searching for packages (`#1012`_, Paul Krohn)
|
||||
* deb: Init scripts, etc/default, and upstart files are automatically added as config files in a debian package. Disable this behavior with ---deb-auto-config-files
|
||||
* deb: Small changes to make lintian complain less about our resulting debs.
|
||||
* deb: New flag --deb-systemd lets you specify a systemd service file to include in your package. (`#952`_, Jens Peter Schroer)
|
||||
* cpan: Add --[no-]cpan-cpanm-force flag to pass --force to cpanm.
|
||||
* rpm: File names with both spaces and symbols should now be packageable. (`#946`_, iwonbigbro)
|
||||
* cpan: Now queries MetaCPAN for package info if we can't find any in the cpan archive we just downloaded. (`#849`_, BaxterStockman)
|
||||
* rpm: You can now specify custom rpm tags at the command line. Be careful, as no validation is done on this before sending to rpmbuild. (`#687`_, vStone)
|
||||
* cpan: Install if the package name given is a local file (`#986`_, mdom)
|
||||
* sh: Metadata now available as env vars for post-install scripts (`#1006`_, Ed Healy)
|
||||
* rpm: No more warning if you don't set an epoch. (`#1053`_, Joseph Frazier)
|
||||
|
||||
|
||||
1.4.0 (July 26, 2015)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
* Solaris 11 IPS packages 'p5p' now supported `-t p5p`. (Jonathan Craig)
|
||||
* Python Virtualenv is now supported `-t virtualenv` (`#930`_, Simone Margaritelli and Daniel Haskin)
|
||||
* deb: Files in /etc are now by default marked as config files. (`#877`_, Vincent Bernat)
|
||||
* `fpm --help` output now includes a list of supported package types (`#896`_, Daniel Haskin)
|
||||
* cpan: --[no-]cpan-sandbox-non-core flag to make non-core module sandboxing optional during packaging (`#752`_, Matt Sharpe)
|
||||
* rpm: Add --rpm-dist flag for specifically setting the target distribution of an rpm. (Adam Lamar)
|
||||
* rpm: Fix a crash if --before-upgrade or --after-upgrade were used. (`#822`_, Dave Anderson)
|
||||
* deb: Ensure maintainer scripts have shebang lines (`#836`_, Wesley Spikes)
|
||||
* deb: Fix bug in maintainer scripts where sometimes we would write an empty shell function. Empty functions aren't valid in shell. (Wesley Spikes)
|
||||
* Fix symlink copying bug (`#863`_, Pete Fritchman)
|
||||
* python: Default to https for pypi queries (Timothy Sutton)
|
||||
* New flag --exclude-file for providing a file containing line-delimited exclusions (Jamie Lawrence)
|
||||
* python: new flag --python-disable-dependency to disable specific python dependencies (Ward Vandewege)
|
||||
* python: ensure we avoid wheel packages for now until fpm better supports them. (`#885`_, Matt Callaway)
|
||||
* deb: Add support for installation states "abort-remove" and "abort-install" (`#887`_, Daniel Haskin)
|
||||
* If PATH isn't set, and we need it, tell the user (`#886`_, Ranjib Dey)
|
||||
* cpan: --[no-]cpan-test now works correctly (`#853`_, Matt Schreiber)
|
||||
* deb-to-rpm: some improved support for config file knowledge passing from deb to rpm packages (Daniel Haskin)
|
||||
|
||||
1.3.3 (December 11, 2014)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* The fpm project now uses Contributor Covenant. You can read more about this on the website: http://contributor-covenant.org/
|
||||
* npm: Fix bug causing all `-s npm` attempts to fail due to a missing method. This bug was introduced in 1.3.0. (`#800`_, `#806`_; Jordan Sissel)
|
||||
* rpm: fix bug in rpm input causing a crash if the input rpm did not have any triggers (`#801`_, `#802`_; Ted Elwartowski)
|
||||
|
||||
1.3.2 (November 4, 2014)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* deb: conversion from another deb will automatically use any changelog found in the source deb (Jordan Sissel)
|
||||
|
||||
1.3.1 (November 4, 2014)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* deb: fix md5sums generation such that `dpkg -V` now works (`#799`_, Matteo Panella)
|
||||
* rpm: Use maximum compression when choosing xz (`#797`_, Ashish Kulkarni)
|
||||
|
||||
1.3.0 (October 25, 2014)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fixed a bunch of Ruby 1.8.7-related bugs. (Jordan Sissel)
|
||||
* cpan: Fix bug in author handling (`#744`_, Leon Weidauer)
|
||||
* cpan: Better removal of perllocal.pod (`#763`_, `#443`_, `#510`_, Mathias Lafeldt)
|
||||
* rpm: Use lstat calls instead of stat, so we don't follow symlinks (`#765`_, Shrijeet Paliwal)
|
||||
* rpm and deb: Now supports script actions on upgrades. This adds two new flags: --before-upgrade and --after-upgrade. (`#772`_, `#661`_; Daniel Haskin)
|
||||
* rpm: Package triggers are now supported. New flags: --rpm-trigger-before-install, --rpm-trigger-after-install, --rpm-trigger-before-uninstall, --rpm-trigger-after-target-uninstall. (`#626`_, Maxime Caumartin)
|
||||
* rpm: Add --rpm-init flag; similar to --deb-init. (Josh Dolitsky)
|
||||
* sh: Skip installation if already installed for the given version. If forced, the old installation is renamed. (`#776`_, Chris Gerber)
|
||||
* deb: Allow Vendor field to be omitted now by specifying `--vendor ""` (`#778`_, Nate Brown)
|
||||
* general: Add --log=level flag for setting log level. Levels are error, warn, info, debug. (Jordan SIssel)
|
||||
* cpan: Check for Build.PL first before Makefile.PL (`#787`_, Daniel Jay Haskin)
|
||||
* dir: Don't follow symlinks when copying files (`#658`_, Jordan Sissel)
|
||||
* deb: Automatically provide a 'changes' file in debs because lintian complains if they are missing. (`#784`_, Jordan Sissel)
|
||||
* deb: Fix and warn for package names that have spaces (`#779`_, Grantlyk)
|
||||
* npm: Automatically set the prefix to `npm prefix -g` (`#758`_, Brady Wetherington and Jordan Sissel)
|
||||
|
||||
1.2.0 (July 25, 2014)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
* rpm: Add --rpm-verifyscript for adding a custom rpm verify script to your package. (Remi Hakim)
|
||||
* Allow the -p flag to target a directory for writing the output package (`#656`_, Jordan Sissel)
|
||||
* Add --debug-workspace which skips any workspace cleanup to let users debug things if they break. (`#720`_, `#734`_; Jordan Sissel)
|
||||
* rpm: Add --rpm-attr for controlling attribute settings per file. This setting will likely be removed in the future once rpmbuild is no longer needed. (`#719`_)
|
||||
* deb: Add --deb-meta-file to add arbitrary files to the control dir (`#599`_, Dan Brown)
|
||||
* deb: Add --deb-interest and --deb-activate for adding package triggers (`#595`_, Dan Brown)
|
||||
* cpan: Fix small bug in handling empty metadata fields (`#712`_, Mathias Lafeldt)
|
||||
* rpm: Fix bug when specifying both --architecture and --rpm-os (`#707`_, `#716`_; Alan Ivey)
|
||||
* gem: Fix bug where --gem-version-bins is given but package has no bins (`#688`_, Jan Vansteenkiste)
|
||||
* deb: Set permissions correct on the package's internals. Makes lintian happier. (Jan Vansteenkiste)
|
||||
* rpm: rpmbuild's _tmppath now respects --workdir (`#714`_, Jordan Sissel)
|
||||
* gem/rpm: Add --rpm-verbatim-gem-dependencies to use old-style (fpm 0.4.x) rpm gem dependencies (`#724`_, Jordan Sissel)
|
||||
* gem/rpm: Fix bug for gem pessimistic constraints when converting to rpm (Tom Duckering)
|
||||
* python: Fix small bug with pip invocations (`#727`_, Dane Knecht)
|
||||
|
||||
1.1.0 (April 23, 2014)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* New package type: zip, for converting to and from zip files (Jordan Sissel)
|
||||
* New package type: sh, a self-extracting package installation shell archive. (`#651`_, Chris Gerber)
|
||||
* 'fpm --version' will now emit the version of fpm.
|
||||
* rpm: supports packaging fifo files (Adam Stephens)
|
||||
* deb: Add --deb-use-file-permissions (Adam Stephens)
|
||||
* cpan: Improve how fpm tries to find cpan artifacts for download (`#614`_, Tim Nicholas)
|
||||
* gem: Add --gem-disable-dependency for removing one or more specific rubygem dependencies from the automatically-generated list (`#598`_, Derek Olsen)
|
||||
* python: Add --python-scripts-executable for setting a custom interpreter to use for the hashbang line at the top of may python package scripts. (`#628`_, Vladimir Rutsky)
|
||||
* Allow absolute paths with --directories even when --prefix is used (Vladimir Rutsky)
|
||||
* dir: Now correctly identifies hardlinked files and creates a package correctly with that knowledge (`#365`_, `#623`_, `#659`_; Vladimir Rutsky)
|
||||
* rpm: Add --rpm-auto-add-exclude-directories for excluding directories from the --rpm-auto-add-directories behavior (`#640`_, Vladimir Rutsky)
|
||||
* general: --config-files now accepts directories and will recursively mark any files within as config files inside the package (`#642`_, Vladimir Rutsky)
|
||||
* general: If you specify a --config-files path that doesn't exist, you will now get an error. (`#654`_, Alan Franzoni)
|
||||
* python: Support --python-pypi when using --python-pip (`#652`_, David Lindquist)
|
||||
* deb: Tests now try to make packages ensure we don't upset lintian (`#648`_, Sam Crang)
|
||||
* rpm: Fix architecture targeting (`#676`_, Rob Kinyon)
|
||||
* rpm: Allow --rpm-user and --rpm-group to override the user/group even if --rpm-use-file-permissions is enabled. (`#679`_, Jordan Sissel)
|
||||
* gem: Add --gem-version-bins for appending the gem version to the file name of executable scripts a rubygem may install. (Jan Vansteenkiste)
|
||||
* python: Attempt to provide better error messages for known issues in python environments (`#664`_, Jordan Sissel)
|
||||
|
||||
1.0.2 (January 10, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* rpm: No longer converts - to _ in dependency strings (`#603`_, Bulat Shakirzyanov)
|
||||
* Handle Darwin/OSX tar invocations (now tries 'gnutar' and 'gtar'). (Jordan Sissel)
|
||||
* Process $HOME/.fpm, and $PWD/.fpm in the correct order and allow CLI flags to override fpm config file settings. (`#615`_, Jordan Sissel)
|
||||
* Don't leave empty gem bin paths in packages that don't need them (`#612`_, Jordan Sissel)
|
||||
* deb: Make --deb-compression=gz work correctly (`#616`_, `#617`_; Evan Krall, Jason Yan)
|
||||
|
||||
1.0.1 (December 7, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* deb: Correctly handle --config-files given with a leading / (Jordan Sissel)
|
||||
|
||||
1.0.0 (December 5, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Config file of flags is now supported. Searches for $HOME/.fpm and $PWD/.fpm. If both exist, $HOME is loaded first so $PWD can override. (Pranay Kanwar)
|
||||
* pkgin: Basic support for SmartOS/pkgsrc's pkgin format. (`#567`_, Brian Akins)
|
||||
* cpan: catch more cases of perllocal.pod and delete them (`#510`_, Jordan Sissel)
|
||||
* cpan: Correctly support module version selection (`#518`_, Matt Sharpe)
|
||||
* cpan: include builddeps in PERL5LIB when running cpan tests (`#500`_, Matt Sharpe)
|
||||
* cpan: Avoid old system perl modules when doing module builds (`#442`_, `#513`_; Matt Sharpe)
|
||||
* python: safer gathering of python module dependencies.
|
||||
* python: better handling of unicode strings in python package metadata (`#575`_, Bruno Renié)
|
||||
* cpan: Support 'http_proxy' env var. (`#491`_, Patrick Cable)
|
||||
* deb: --deb-user and --deb-group both default to 'root' now (`#504`_, Pranay Kanwar)
|
||||
* deb: convert '>' to '>>' in deb version constraints (`#503`_, `#439`_, Pranay Kanwar)
|
||||
* deb: Warn if epoch is set. Just so you know what's going on, since the default filename doesn't include the epoch. (`#502`_, Pranay Kanwar)
|
||||
* deb,rpm: --config-files is now recursive if you give it a directory. This seems to be the most expected behavior by users. (`#171`_, `#506`_; Pranay Kanwar)
|
||||
* dir: Respect -C when using path mapping (`#498`_, `#507`_; Pranay Kanwar)
|
||||
* rpm: Add --rpm-ignore-iteration-in-dependencies to let you to depend on any release (aka iteration) of the same version of a package. (`#364`_, `#508`_; Pranay Kanwar)
|
||||
* dir: Handle copying of special files when possible (`#347`_, `#511`_, `#539`_, `#561`_; Pranay Kanwar)
|
||||
* rpm: Don't mistake symlinks as actual directories (`#521`_, Nathan Huff)
|
||||
* npm: Choose an alternate npm registry with --npm-registry (`#445`_, `#524`_; Matt Sharpe)
|
||||
* cpan: Choose an alternate cpan server with --cpan-mirror. Additionally, you can use --cpan-mirror-only to only use this mirror for metadata queries. (`#524`_, Matt Sharpe)
|
||||
* deb: Fix broken --deb-changelog flag (`#543`_, `#544`_; Tray Torrance)
|
||||
* deb: When --deb-upstart is given, automatically create an upstart-sysv symlink /etc/init.d/<name> to /lib/init/upstart-job (`#545`_, Igor Galić)
|
||||
* rpm: Fix bug when generating spec file listings on files with strange characters in the names. (`#547`_, Chris Chandler)
|
||||
* dir: Fix bug where the new directory mapping feature would cause you not to be able to select files with '=' in the name for packaging. (`#556`_, `#554`_; Pranay Kanwar)
|
||||
* python: Fix some unicode string issues in package metadata (`#575`_, Bruno Renié)
|
||||
* gem-rpm: Now respects the --gem-package-name-prefix when generating the 'rubygem(name)' provides statement (`#585`_, Stepan Stipl)
|
||||
* deb: Downcase and replace underscores with dashes in 'provides' list. (`#591`_, Eric Connell)
|
||||
* deb: Fix a lintian complaint about md5sums permissions (`#593`_, Sam Crang)
|
||||
* cpan: Modules with 'MYMETA' files are now supported (`#573`_, Michael Donlon)
|
||||
|
||||
0.4.42 (July 23, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* dir: make source=destination mappings behave the same way 'rsync -a' does with respect to source and destination paths.
|
||||
|
||||
0.4.41 (July 17, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* cpan: handle cases where modules don't specify a license
|
||||
* deb: support multiple init scripts (`#487`_, patch by Kristian Glass)
|
||||
|
||||
0.4.40 (July 12, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* dir: supports mapping one path to another. You set mappings by using 'source=destination' syntax. For example: % fpm -s dir -t deb -n example /home/jls/.zshrc=/etc/skel/ The key above is the '=' symbol. The result of the above will be a package containing only /etc/skel/.zshrc For more, see https://github.com/jordansissel/fpm/wiki/Source:-dir#mapping
|
||||
* python: the default scripts location is now chosen by python itself. The previous default was "/usr/bin" and was not a good default. (`#480`_)
|
||||
* rpm: config files should have attributes (`#484`_, patch by adamcstephens)
|
||||
* python: correctly log the python setup.py exit code (`#481`_, patch by Derek Ludwig)
|
||||
|
||||
0.4.39 (June 27, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* cpan: support more complex dependency specifications (reported by Mabi Knittel)
|
||||
|
||||
0.4.38 (June 24, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* cpan: fpm's cpan code now works under ruby 1.8.7
|
||||
* python: fix a bug in dependency handling (`#461`_, Pranay Kanwar)
|
||||
* pear: Added --pear-data-dir flag (`#465`_, Zsolt Takács)
|
||||
* cpan: fix a bug with some clean up on certain 64bit systems
|
||||
* gem: improve detection of the gem bin install path (`#476`_, Tray Torrance)
|
||||
* rpm: fix bug when calling using --rpm-use-file-permissions (`#464`_, Rich Horwood)
|
||||
|
||||
0.4.37 (May 30, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
* deb: fix creation failures on OS X (`#450`_, patch by Anthony Scalisi and Matthew M. Boedicker)
|
||||
* deb: you can now set --deb-build-depends. This is generally for extremely rare use cases. (`#451`_, patch by torrancew)
|
||||
* perl: add --cpan-perl-lib-path for a custom perl library installation path (`#447`_, patch by Brett Gailey)
|
||||
|
||||
0.4.36 (May 15, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
* pear: only do channel-discover if necessary (`#438`_, patch by Hatt)
|
||||
* cpan: now supports cpan modules that use Module::Build
|
||||
* cpan: --no-cpan-test now skips tests for build/configure dependencies
|
||||
* rpm: Add --rpm-defattrfile and --rpm-defattrdir flags (`#428`_, patch by phrawzty)
|
||||
|
||||
0.4.35 -- was not announced
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
0.4.34 (May 7, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
* Now supports CPAN - Perl mongers rejoice! For example: 'fpm -s cpan -t deb DBI'
|
||||
* deb: fixed some additional complaints by lintian (`#420`_, patch by Pranay Kanwar)
|
||||
* rpm: add flags --rpm-autoreqprov, --rpm-autoreq, and --rpm-autoprov to tell rpm to enable that feature in the rpm spec. (`#416`_, patch by Adam Stephens)
|
||||
|
||||
0.4.33 (April 9, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Now supports npm, the node package manager. For example: 'fpm -s npm -t deb express'
|
||||
|
||||
0.4.32 (April 9, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* COMPATIBILITY WARNING: rpm: The default epoch is now nothing because this aligns more closely with typical rpm packages in the real world. This decision was reached in `#381`_. If you need the previous behavior, you must now specify '--epoch 1' (`#388`_, patch by Pranay Kanwar)
|
||||
* python: new flag --python-obey-requirements-txt which makes a requirements.txt file from the python package used for the package dependencies instead of the usual setup.py dependencies. The default behavior without this flag is to respect setup.py. (`#384`_)
|
||||
* deb: new flag --deb-shlibs to specify the content of the 'shlibs' file in the debian package (`#405`_, patch by Aman Gupta)
|
||||
* deb: fixed a few lintian errors (empty conffiles, md5sums on symlinks, etc)
|
||||
* Add '-f' / '--force' flag to force overwriting an existing package output path (`#385`_, Timothy Sutton)
|
||||
* New flag: --no-auto-depends flag to skip any automatic dependencies that would normally be added by gem, python, deb, and rpms input packages. (`#386`_, `#374`_; patch by Pranay Kanwar)
|
||||
* gem: Use 'gem' command to download gems and read gem package information. (`#389`_, `#394`_, `#378`_, `#233`_; patches by Pranay Kanwar and Chris Roberts)
|
||||
* rpm: dashes are now replaced with underscores in rpm version strings (`#395`_, `#393`_, `#399`_; patches by Jeff Terrace and Richard Guest)
|
||||
* python: Only use the first line of a license; some python packages (like 'requests') embed their full license copy into the license field. For the sake of sanity and function with most packaging systems, fpm only uses the first line of that license.
|
||||
* rpm: Add new 'none' option to --rpm-compression to disable compression entirely. (`#398`_, patch by Richard Guest)
|
||||
* deb: Make dependencies using the '!=' operator represented as "Breaks" in the deb package (previously used "Conflicts"). (`#400`_)
|
||||
* deb: Add md5sums to the debian packages which improves correctness of the package. (`#403`_, `#401`_; patch by Pranay Kanwar)
|
||||
* rpm: Convert all '!=' dependency operators to 'Conflicts'. Previously, this only applied to packages converting from python to rpm. (`#404`_, `#396`_; patch by Pranay Kanwar)
|
||||
|
||||
0.4.31 (March 21, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* rpm: new flag --rpm-use-file-permissions which try to create an rpm that has file ownership/modes that exactly mirror how they are on the filesystem at package time. (`#377`_, patch by Paul Rhodes)
|
||||
* general: remove empty directories only when they match the exclude pattern (`#323`_, patch by Pranay Kanwar)
|
||||
|
||||
0.4.30 (March 21, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Solaris: --solaris-user and --solaris-group flags to specify the owner of files in a package. (`#342`_, patch by Derek Olsen)
|
||||
* rpm: (bug fix) epoch of 0 is permitted now (`#343`_, patch by Ben Hughes)
|
||||
* pear: add flags --pear-bin-dir --pear-php-bin --pear-php-dir (`#358`_, patch by Zsolt Takács)
|
||||
* New 'source' type: empty. Allows you to create packages without any files in them (sometimes called 'meta packages'). Useful when you want to have one package be simply dependencies or when you want to spoof a package you don't want installed, etc. (`#359`_, 349; patch by Pranay Kanwar)
|
||||
* solaris: Add --solaris-user and --solaris-group flags (`#342`_, Patch by Derek Olsen)
|
||||
* gem: new flag --env-shebang; default true (disable with --no-env-shebang). Lets you disable #! (shebang) mangling done by gem installation. (`#363`_, patch by Grier Johnson)
|
||||
* deb: fix bug on changelog handling (`#376`_, patch by mbakke)
|
||||
* rpm: fix --rpm-rpmbuild-define (`#383`_, patch by Eric Merritt)
|
||||
|
||||
0.4.29 (January 22, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Copy links literally, not what they point at (`#337`_, patch by Dane Knecht)
|
||||
|
||||
0.4.28 (January 21, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fix a dependency on the 'cabin' gem. (`#344`_, reported by Jay Buffington)
|
||||
|
||||
0.4.27 (January 16, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Make all fpm output go through the logger (`#329`_; patch by jaybuff)
|
||||
* New package type: osxpkg, for building packages installable on OS X. (`#332`_, patch by Timothy Sutton)
|
||||
* Fix crash bug when converting rpms to something else (`#316`_, `#325`_; patch by rtucker-mozilla)
|
||||
* deb: Add --deb-field for setting a custom field in the control file. For more information on this setting, see section 5.7 "User-defined fields" of the debian policy manual: http://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.7
|
||||
* deb: Add --deb-recommends and --deb-suggests (`#285`_, `#310`_; patch by Pranay Kanwar)
|
||||
* python to rpm: convert "!=" dependency operators in python to "Conflicts" in rpm. (`#263`_, `#312`_; patch by Pranay Kanwar)
|
||||
* python: fix bug - ignore blank lines in requirements.txt (`#312`_, patch by Pranay Kanwar)
|
||||
|
||||
0.4.26 (December 27, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* rpm: add --rpm-sign flag to sign packages using the 'rpmbuild --sign' flag. (`#311`_, Patch by Pranay Kanwar)
|
||||
* rpm: fix flag ordering when calling rpmbuild (`#309`_, `#315`_, patch by Trotter Cashion)
|
||||
* deb: re-enable "Predepends" support (`#319`_, `#320`_, patch by Pranay Kanwar)
|
||||
* rpm: fix default 'rpm os' value (`#321`_, 314, 309)
|
||||
|
||||
0.4.25 (December 7, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Added --deb-changelog and --rpm-changelog support flags. Both take a path to a changelog file. Both must be valid changelog formats for their respective package types. (`#300`_, patch by Pranay Kanwar)
|
||||
* deb: Multiple "provides" are now supported. (`#301`_, patch by Pranay Kanwar)
|
||||
* rpm: Added --rpm-os flag to set the OS target for the rpm. This lets you build rpms for linux on OS X and other platforms (with --rpm-os linux). (`#309`_)
|
||||
* rpm: Avoid platform-dependent commands in the %install phase (`#309`_, fixes 'cp -d' on OSX)
|
||||
* python: ignore comments in requirements.txt (`#304`_, patch by Pranay Kanwar)
|
||||
* Fixed warning 'already initialized constant' (`#274`_)
|
||||
|
||||
0.4.24 (November 30, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Don't include an empty url in rpm spec (`#296`_, `#276`_; patch by Pranay Kanwar)
|
||||
* Don't require extra parameters if you use --inputs (`#278`_, `#297`_; Patch by Pranay Kanwar)
|
||||
* python: supports requirements.txt now for dependency information.
|
||||
* python: supports pip now. Use '--python-pip path/to/pip' to have fpm use it instead of easy_install.
|
||||
* solaris: package building works again (`#216`_, `#299`_, patch by Pierre-Yves Ritschard)
|
||||
|
||||
0.4.23 (November 26, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* The --directories flag is now recursive when the output package is rpm. This makes all directories under a given path as owned by the package so they'll be removed when the package is uninstalled (`#245`_, `#293`_, `#294`_, patch by Justin Ellison)
|
||||
* Add fpm version info to '--help' output (`#281`_)
|
||||
* gem to rpm: Use 'rubygem(gemname)' for dependencies (`#284`_, patch by Jan Vansteenkiste)
|
||||
* Fix a bug in gem version mangling (`#292`_, `#291`_; patch by Pranay Kanwar)
|
||||
* Fix compatibility with Python 2.5 (`#279`_, patch by Denis Bilenko)
|
||||
|
||||
0.4.22 (November 15, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Add --no-depends flag for creating packages with no dependencies listed (`#289`_, patch by Brett Gailey)
|
||||
* Fix a bug where blank lines were present in a debian control file. (`#288`_, patch by Andrew Bunday)
|
||||
|
||||
0.4.21 (November 8, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* gem: remove restriction on expected gem names (`#287`_)
|
||||
* add --directory flag; lets you mark a directory as being owned by a package. (`#260`_, `#245`_, patch by ajf8)
|
||||
* deb: don't include a version in the Provides field (`#280`_)
|
||||
* gem: if the version is '1.1' make it imply '1.1.0' (`#269`_, patch by Radim Marek)
|
||||
|
||||
0.4.20 (October 5, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* python: only specify --install-{scripts,lib,data} flags to setup.py if they were given on the command line to fpm. Fixes `#273`_.
|
||||
|
||||
0.4.19 (September 26, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Escape '%' characters in file names (`#266`_, `#222`_. Patch by John Wittkoski)
|
||||
|
||||
0.4.18 (September 25, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fix regression in rpm building where the epoch in was missing in the rpm, but prior fpm versions defaulted it to 1. This caused rpms built with newer fpms to appear "older" than older rpms. Tests added to ensure this regression is caught prior to future releases! (Reported by eliklein)
|
||||
|
||||
0.4.17 (September 12, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Remove accidental JSON warning when using '-s python'
|
||||
|
||||
0.4.16 (September 6, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fix compatibility with Ruby 1.8.7 (broken in 0.4.15)
|
||||
|
||||
0.4.15 (September 6, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* pear: support custom channels with --pear-channel <channel> (`#207`_) Example: fpm -s pear -t deb --pear-channel pear.drush.org drush
|
||||
* permit literal '\n' in --description, fpm will replace with a newline character. Example: fpm --description "line one\nline two" (`#251`_)
|
||||
* improve error messaging when trying to output a package to a directory that doesn't exist (`#244`_)
|
||||
* deb: convert '>' and '<' dependency operators to the correct '>>' and '<<' debian version operators (`#250`_, patch by Thomas Meson).
|
||||
* deb: add --deb-priority flag (`#232`_) for setting the debian 'priority' value for your package.
|
||||
* add --template-value. Used to expose arbitrary values to script templates. If you do --template-value hello=world, in your template you can do <%= hello %> to get 'world' to show up in your maintainer scripts.
|
||||
* python: add --python-install-data flag to set the --install-data option to setup.py (`#255`_, patch by Thomas Meson)
|
||||
* Reject bad dependency flags (ones containing commas) and offer alternative. (`#257`_)
|
||||
* Try to copy a file if hardlinking fails with permission problems (`#253`_, patch by Jacek Lach)
|
||||
* Make --exclude, if a directory, include itself and any children, recursive. (`#248`_)
|
||||
|
||||
0.4.14 (August 24, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* rpm: Replace newlines with space in any license setting. (`#252`_)
|
||||
|
||||
0.4.13 (August 14, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Make --exclude accept path prefixes as well. If you have a files in 'usr/share/man' in your package, you can now exclude all of a subdir by doing '--exclude usr/share/man'
|
||||
|
||||
0.4.12 (August 10, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fix a major bug introduced in 0.4.11 that caused all deb packages to contain empty maintainer scripts if not otherwise specified, which made apt/dpkg quite unhappy
|
||||
|
||||
0.4.11 (August 7, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fix some symlink handling to prevent links from being followed during cleanup (`#228`_, patch by sbuss)
|
||||
* rpm: 'vendor' in rpm spec is now omitted if empty or nil. This fixes a bug where rpmbuild fails due to empty 'Vendor' tag if you convert rpm to rpm.
|
||||
* internal: remove empty directories marked by --exclude (`#205`_, patch by jimbrowne)
|
||||
* dir: don't try to set utime on symlinks (`#234`_, `#240`_, patch by ctgswallow)
|
||||
* rpm: relocatable rpms now supported when using the '--prefix' flag. Example: fpm -s dir -t rpm --prefix /usr/local -n example /etc/motd (patch by jkoppe)
|
||||
* deb: --deb-compression flag: Support different compression methods. Default continues to be gzip.
|
||||
* new flag: --template-scripts. This lets you write script templates for --after-install, etc. Templates are ERB, so you can do things like '<%= name %>' to get the package name in the script, etc.
|
||||
* warn on command invocations that appear to have stray flags to try and help users who have complex command lines that are failling.
|
||||
|
||||
0.4.10 (May 25, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fix python package support for python3 (`#212`_, patch by Slezhuk Evgeniy)
|
||||
* Preserve file metadata (time, owner, etc) when copying with the dir package. (`#217`_, patch by Marshall T. Vandegrift)
|
||||
* Missing executables will now error more readably in fpm.
|
||||
* Fix gem and python 'version' selection (`#215`_, `#204`_)
|
||||
* Dependencies using '!=' will now map to 'Conflicts' in deb packages. (`#221`_, patch by Sven Fischer)
|
||||
* Allow setting default user/group for files in rpm packages (`#208`_, patch by Jason Rogers). Note: This adds --user and --group flags to effect this. These flags may go away in the future, but if they do, they will be
|
||||
* In python packages set 'install-data' correctly. (`#223`_, patch by Jamie Scheinblum)
|
||||
|
||||
0.4.9 (April 25, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fix --prefix support when building gems (`#213`_, patch by Jan Vansteenkiste)
|
||||
|
||||
0.4.8 (April 25, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* RPM: use 'noreplace' option for config files (`#194`_, patch by Steve Lum)
|
||||
* Python: Fix bug around exact dependency versions (`#206`_, patch by Lars van de Kerkhof)
|
||||
* Gem->RPM: Make 'provides' "rubygem(thegemname)" instead of "rubygem-thegemname"
|
||||
* Fix oddity where Ruby would complain about constant redefinition (`#198`_, patch by Marcus Vinicius Ferreira)
|
||||
|
||||
0.4.7 skipped.
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
0.4.6 (April 10, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Work around more problems in RPM with respect to file listing (`#202`_)
|
||||
|
||||
0.4.5 (April 3, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fix gem->rpm conversion where the '~>' rubygem version operator (`#193`_, patch by antoncohen)
|
||||
* Escape filenames RPM install process (permits files with spaces, dollar signs, etc) (`#196`_, reported by pspiertz)
|
||||
|
||||
0.4.4 (March 30, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fix a bug in gem bin_dir handling (Calen Pennington)
|
||||
* The --config-files flag should work again (Brian Akins)
|
||||
* Fix syntax error when using --deb-pre-depends (Andrew Bennett)
|
||||
* Make --exclude work again (`#185`_, `#186`_) (Calen Pennington)
|
||||
* Fix file listing so that rpm packages don't declare ownership on / and /usr, etc.
|
||||
* make --deb-custom-control to work again (Tor Arne Vestbø)
|
||||
* Add --rpm-digest flag to allow selection of the rpm 'file name' digest algorithm. Default is 'md5' since it works on the most rpm systems.
|
||||
* Reimplement old behavior assuming "." as the input when using '-s dir' and also setting -C (`#187`_)
|
||||
* Set BuildRoot on rpm to work around an rpmbuild bug(?) on CentOS 5 (`#191`_)
|
||||
* Add --rpm-compression flag to allow selection of the rpm payload compression. Default is 'gzip' since it works on the most rpm systems
|
||||
* Specs now pass on ubuntu/32bit systems (found by travis-ci.org's test runner)
|
||||
* Improve default values of iteration and epoch (`#190`_)
|
||||
* Make FPM::Package#files list only 'leaf' nodes (files, empty directories, symlinks, etc).
|
||||
|
||||
0.4.3 (March 21, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fix bug in python packaging when invoked with a relative path to a setup.py (Reported by Thomas Meson, https://github.com/jordansissel/fpm/pull/180)
|
||||
|
||||
0.4.2 (March 21, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Set default temporary directory to /tmp (https://github.com/jordansissel/fpm/issues/174)
|
||||
* Improve symlink handling (patch by Aleix Conchillo Flaqué, pull/177))
|
||||
* Python package support changes (thanks to input by Luke Macken):
|
||||
|
||||
* New flag: --python-install-bin. Sets the location for python package scripts (default: /usr/bin)
|
||||
* New flag: --python-install-lib. Sets the location for the python package to install libs to, default varies by system. Usually something like /usr/lib/python2.7/site-packages.
|
||||
* Fix up --prefix support
|
||||
* Improve staged package installation
|
||||
|
||||
0.4.1 (March 19, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Fix fpm so it works in ruby 1.8 again. Tests run, and passing: rvm 1.8.7,1.9.2,1.9.3 do bundle exec rspec
|
||||
|
||||
0.4.0 (March 18, 2012)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
* Complete rewrite of pretty much everything.
|
||||
|
||||
* Otherwise, the 'fpm' command functionality should be the same
|
||||
* Please let me know if something broke!
|
||||
|
||||
* Now has an API (see examples/api directory)
|
||||
* Also has a proper test suite
|
||||
* Updated the rpm spec generator to disable all the ways I've found rpmbuild to be weird about packages. This means that fpm-generated rpms will no longer strip libraries, move files around, randomly mutate jar files, etc.
|
||||
* Add --license and --vendor settings (via Pieter Loubser)
|
||||
* python support: try to name python packages sanely. Some pypi packages are literally called 'python-foo' so make sure we generate packages named 'python-foo' and not 'python-python-foo' (via Thomas Meson)
|
||||
* rpm support: Add --rpm-rpmbuild-define for passing a --define flag to rpmbuild (via Naresh V)
|
||||
* PHP pear source support (fpm -s pear ...) (via Andrew Gaffney)
|
||||
|
||||
0.3.10 (Oct 10, 2011)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
* Allow taking a list of files/inputs on stdin with '-' or with the --inputs flag. (Matt Patterson)
|
||||
* (python) pass -U to easy_install (Khalid Goudeaux)
|
||||
* (debian) quote paths in md5sum calls (Matt Patterson)
|
||||
* (debian) quiet stderr from dpkg --print-architecture
|
||||
|
||||
0.3.9 (Sep 8, 2011)
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
* Fix bug in 'dir' source that breaks full paths
|
||||
* Added a bunch of tests (yaay)
|
||||
|
||||
0.3.8 and earlier: I have not kept this file up to date very well... Sorry :(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
0.2.29 (May 20, 2011)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
* Add 'tar' source support. Useful for binary releases to repackage as rpms and debs. Example::
|
||||
|
||||
fpm -s tar -t rpm -n firefox -v 4.0.1 --prefix /opt/firefox/4.0.1 firefox-4.0.1.tar.bz2
|
||||
|
||||
0.2.28 (May 18, 2011)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
* Use --replaces as "Obsoletes" in rpms.
|
||||
|
||||
0.2.27 (May 18, 2011)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
* If present, DEBEMAIL and DEBFULLNAME environment variables will be used as the default maintainer. Previously the default was simply <$user@$hostname> https://github.com/jordansissel/fpm/issues/37
|
||||
* Add '--replaces' flag for specifying packages replaced by the one you are building. This only functions in .deb packages now until I find a suitable synonym in RPM.
|
||||
* Add --python-bin and --python-easyinstall flags. This lets you choose specific python and easy_install tools to use when building. Default is simply 'python' and 'easy_install' respectively.
|
||||
* Add support for ~/.fpmrc - The format of this file is the same as the flags. One flag per line. https://github.com/jordansissel/fpm/issues/38. Example::
|
||||
|
||||
--python-bin=/usr/bin/python2.7
|
||||
--python-easyinstall=/usr/bin/easy_install2.7
|
||||
|
||||
0.2.26 and earlier
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
No changelist tracked. My bad, yo.
|
||||
|
|
@ -1,13 +1,46 @@
|
|||
# Contributor Code of Conduct
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
||||
## Our Pledge
|
||||
|
||||
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
||||
## Our Standards
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at jls@semicomplete.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: https://contributor-covenant.org
|
||||
[version]: https://contributor-covenant.org/version/1/4/
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ llasram
|
|||
sbuss
|
||||
Brett Gailey (github: dnbert)
|
||||
Daniel Haskin (github: djhaskin987)
|
||||
Richard Grainger (github: liger1978)
|
||||
seph (github: directionless)
|
||||
|
||||
If you have contributed (bug reports, feature requests, help in IRC, blog
|
||||
posts, code, etc) and aren't listed here, please let me know if you wish to be
|
||||
|
|
|
|||
|
|
@ -0,0 +1,107 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
|
||||
# Are we running against the minimal container, or the everything
|
||||
# container? Minimal is mostly the compiled package tools. Everything
|
||||
# pulls in scripting langauges.
|
||||
ARG BASE_ENV=everything
|
||||
|
||||
# Are we running tests, or a release? Tests build and run against the
|
||||
# CWD, where release will use the downloaded gem.
|
||||
ARG TARGET=test
|
||||
|
||||
# Container to throw an error if called with a bare `docker build .`
|
||||
FROM ubuntu:20.04 as error
|
||||
RUN <<EOF
|
||||
printf '\n\n\n%s\n\n\n' "Hey! Use buildkit. See the Makefile or docs"
|
||||
false
|
||||
EOF
|
||||
|
||||
# Base container is used for various release and test things
|
||||
FROM ubuntu:20.04 as minimal-base
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG TZ=Etc/UTC
|
||||
# Runtime deps. Build deps go in the build or test containers
|
||||
# hadolint ignore=DL3009
|
||||
RUN <<EOF
|
||||
apt-get update
|
||||
apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
'ruby=*' \
|
||||
'ruby-dev=*' \
|
||||
'libarchive-tools=*' \
|
||||
'cpio=*' \
|
||||
'debsigs=*' \
|
||||
'pacman=*' \
|
||||
'rpm=*' \
|
||||
'squashfs-tools=*' \
|
||||
'xz-utils=*' \
|
||||
'zip=*' \
|
||||
'gcc=*' \
|
||||
'libc6-dev=*' \
|
||||
'make=*' \
|
||||
'lintian=*' \
|
||||
'git=*'
|
||||
useradd -ms /bin/bash fpm
|
||||
EOF
|
||||
|
||||
# everything container includes all the scripting languages. These
|
||||
# greatly embiggen the underlying docker container, so they're
|
||||
# conditionalized.
|
||||
FROM minimal-base as everything-base
|
||||
RUN <<EOF
|
||||
apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
'cpanminus=*' \
|
||||
'npm=*' \
|
||||
'perl=*' \
|
||||
'python3-pip=*'
|
||||
pip3 --no-cache-dir install 'setuptools>=45' 'wheel>=0.34' 'virtualenv>=20' 'virtualenv-tools3>=2'
|
||||
update-alternatives --install /usr/bin/python python /usr/bin/python3 10
|
||||
EOF
|
||||
|
||||
# hadolint ignore=DL3006
|
||||
FROM ${BASE_ENV}-base as base
|
||||
RUN <<EOF
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
apt-get clean
|
||||
EOF
|
||||
|
||||
# Run tests against the current working directory. This is a bit
|
||||
# orthogonal to the container release process, but it has a lot of
|
||||
# same dependancies, so we reuse it. This uses COPY to allow rspect to
|
||||
# initall the gems, but runtime usage expects you to mount a volume
|
||||
# into /src
|
||||
FROM base AS test
|
||||
# installing ffi here is a bit of an optimization for how COPY and layer reuse works
|
||||
RUN gem install --no-document ffi:*
|
||||
USER fpm
|
||||
WORKDIR /origsrc
|
||||
ENV HOME=/origsrc
|
||||
ENV BUNDLE_PATH=/origsrc/.bundle
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN <<EOF
|
||||
# Install a specific version of bundler
|
||||
install -d -o fpm /origsrc
|
||||
gem install -v "$(grep -A1 '^BUNDLED WITH' Gemfile.lock | tail -1)" bundler:*
|
||||
bundle install
|
||||
EOF
|
||||
|
||||
CMD ["bundle", "exec", "rspec"]
|
||||
|
||||
# build a container from a released gem. install build deps here, so
|
||||
# we can omit them from the final release package
|
||||
FROM base AS build
|
||||
ENV GEM_PATH=/fpm
|
||||
ENV PATH="/fpm/bin:${PATH}"
|
||||
# hadolint ignore=DL3028
|
||||
RUN gem install --no-document --install-dir=/fpm fpm
|
||||
|
||||
FROM base as release
|
||||
COPY --from=build /fpm /fpm
|
||||
ENV GEM_PATH=/fpm
|
||||
ENV PATH="/fpm/bin:${PATH}"
|
||||
USER fpm
|
||||
WORKDIR /src
|
||||
ENTRYPOINT ["/fpm/bin/fpm"]
|
||||
|
||||
# This target is to help docker buildkit in resolving things.
|
||||
# hadolint ignore=DL3006
|
||||
FROM ${TARGET}
|
||||
2
LICENSE
2
LICENSE
|
|
@ -1,6 +1,6 @@
|
|||
(This is an MIT-style license)
|
||||
|
||||
Copyright (c) 2011-2016 Jordan Sissel and contributors.
|
||||
Copyright (c) 2011-2021 Jordan Sissel and contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
22
Makefile
22
Makefile
|
|
@ -49,3 +49,25 @@ install: $(GEM)
|
|||
.PHONY:
|
||||
clean:
|
||||
rm -rf package-*/ *.rpm *.deb *.gz *.tar *.gem .yardoc/
|
||||
|
||||
publish-docs:
|
||||
$(MAKE) -C docs publish
|
||||
|
||||
release-prep: package
|
||||
rm -f docs/changelog_links.rst docs/cli-reference.rst
|
||||
make -C docs build package-type-cli
|
||||
|
||||
# Testing in docker.
|
||||
# The dot file is a sentinal file that will built a docker image, and tag it.
|
||||
# The normal make target runs said image, mounting CWD against it.
|
||||
SECONDARY: .docker-test-minimal .docker-test-everything
|
||||
.docker-test-%: Gemfile.lock fpm.gemspec Dockerfile
|
||||
DOCKER_BUILDKIT=1 docker build -t fpm-test-$* --build-arg BASE_ENV=$* --build-arg TARGET=test .
|
||||
touch "$@"
|
||||
|
||||
docker-test-%: .docker-test-%
|
||||
docker run -v `pwd`:/src fpm-test-$*
|
||||
|
||||
docker-release-%:
|
||||
DOCKER_BUILDKIT=1 docker build -t fpm --build-arg BASE_ENV=$* --build-arg TARGET=release --squash .
|
||||
|
||||
|
|
|
|||
53
NOTES.md
53
NOTES.md
|
|
@ -1,53 +0,0 @@
|
|||
|
||||
# Debian notes
|
||||
|
||||
## C libraries
|
||||
|
||||
Linux seems to require 'ldconfig' runs after shared libraries are installed. I
|
||||
haven't bothered digging into why, but many debian C library packages run
|
||||
ldconfig as a postinstall step.
|
||||
|
||||
I'd like to avoid postinstall actions, so this needs research to see if this is
|
||||
possible.
|
||||
|
||||
## Ruby
|
||||
|
||||
rubygems on Debian/Ubuntu is not very recent in most cases, and some gems have
|
||||
a requirement of rubygems >= a version you have available.
|
||||
|
||||
Further, debian blocks 'gem update --system' which you can get around by doing:
|
||||
|
||||
% gem install rubygems-update
|
||||
% ruby /var/lib/gems/1.8/gems/rubygems-update-1.3.1/bin/update_rubygems
|
||||
|
||||
I recommend packaging 'rubygems-update' (fpm -s gem -t deb rubygems-update) and
|
||||
possibly running the update_rubygems as a postinstall, even though I don't like
|
||||
postinstalls. I haven't looked yet to see what is required to mimic (if
|
||||
possible) the actions of that script simply in a tarball.
|
||||
|
||||
## Python
|
||||
|
||||
http://www.debian.org/doc/packaging-manuals/python-policy/ap-packaging_tools.html
|
||||
|
||||
Debian python packages all rely on some form of python-central or
|
||||
python-support (different tools that do similar/same things? I don't know)
|
||||
|
||||
As I found, disabling postinst scripts in Debian causes Python to stop working.
|
||||
The postinst scripts generally look like this:
|
||||
|
||||
if which update-python-modules >/dev/null 2>&1; then
|
||||
update-python-modules SOMEPACKAGENAME.public
|
||||
fi
|
||||
|
||||
I don't believe in postinst scripts, and I also feel like requiring a
|
||||
postinstall step to make a python module work is quite silly - though I'm sure
|
||||
(I hope) Debian had good reason.
|
||||
|
||||
So, I'm going to try working on a howto for recommended ways to build python
|
||||
packages with fpm in debian. It will likely require a one-time addition to
|
||||
site.py (/usr/lib/python2.6/site.py) or some other PYTHONPATH hackery, though
|
||||
I don't know just yet.
|
||||
|
||||
It will also require special setup.py invocations as Debian has patched distutils to
|
||||
install python packages, by default, to a place that requires again the
|
||||
python-central/support tools to run to make them work.
|
||||
228
README.md
228
README.md
|
|
@ -1,228 +0,0 @@
|
|||
# Effing Package Management
|
||||
|
||||
[](https://travis-ci.org/jordansissel/fpm)
|
||||
|
||||
## Preface
|
||||
|
||||
Package maintainers work hard and take a lot of shit. You can't please
|
||||
everyone. So, if you're a maintainer: Thanks for maintaining packages!
|
||||
|
||||
## What is fpm?
|
||||
|
||||
It helps you build packages quickly and easily (Packages like RPM and DEB
|
||||
formats).
|
||||
|
||||
FUNDAMENTAL PRINCIPLE: IF FPM IS NOT HELPING YOU MAKE PACKAGES EASILY, THEN
|
||||
THERE IS A BUG IN FPM.
|
||||
|
||||
Here is a presentation I gave on fpm at BayLISA: <http://goo.gl/sWs3Z> (I
|
||||
included speaker notes you can read, too)
|
||||
|
||||
At BayLISA in April 2011, I gave a talk about fpm. At the end, I asked "What
|
||||
can I package for you?"
|
||||
|
||||
Someone asked for memcached.
|
||||
|
||||
Google for 'memcached', download the source, unpack, ./configure, make, make
|
||||
install, fpm, deploy.
|
||||
|
||||
In 60 seconds, starting from nothing, I had both an RPM and a .DEB of memcached
|
||||
ready to deploy, and I didn't need to know how to use rpmbuild, rpm specfiles,
|
||||
dh\_make, debian control files, etc.
|
||||
|
||||
## Backstory
|
||||
|
||||
Sometimes packaging is done wrong (because you can't do it right for all
|
||||
situations), but small tweaks can fix it.
|
||||
|
||||
And sometimes, there isn't a package available for the tool you need.
|
||||
|
||||
And sometimes if you ask "How do I get python 3 on CentOS 5?" some unhelpful
|
||||
trolls will tell you to "Use another distro"
|
||||
|
||||
Further, a job switches have me flipping between Ubuntu and CentOS. These use
|
||||
two totally different package systems with completely different packaging
|
||||
policies and support tools. Learning both was painful and confusing. I want to
|
||||
save myself (and you) that pain in the future.
|
||||
|
||||
It should be easy to say "here's my install dir and here's some dependencies;
|
||||
please make a package"
|
||||
|
||||
## The Solution - FPM
|
||||
|
||||
I want a simple way to create packages without all the bullshit. In my own
|
||||
infrastructure, I have no interest in Debian policy and RedHat packaging
|
||||
guidelines - I have interest in my group's own style culture and have a very strong
|
||||
interest in getting work done.
|
||||
|
||||
(This is not to say that you can't create packages with FPM that obey Debian or
|
||||
RedHat policies, you can and should if that is what you desire)
|
||||
|
||||
The goal of FPM is to be able to easily build platform-native packages.
|
||||
|
||||
* Creating packages easily (deb, rpm, etc)
|
||||
* Tweaking existing packages (removing files, changing metadata/dependencies)
|
||||
* Stripping pre/post/maintainer scripts from packages
|
||||
|
||||
## System packages
|
||||
|
||||
Many Linux distros do not ship ruby C headers or a compiler by default, and
|
||||
you'll need that to install fpm.
|
||||
|
||||
```
|
||||
# deb based distributions:
|
||||
apt-get install ruby-dev gcc make
|
||||
# rpm ones:
|
||||
yum install ruby-devel gcc make
|
||||
```
|
||||
|
||||
Additional packages will be required depending on the source and target package
|
||||
types (rpmbuild for rpm, etc.). FPM will show the commands that are required
|
||||
which you must map to your distribution's package names.
|
||||
|
||||
## Get with the download
|
||||
|
||||
You can install fpm with gem:
|
||||
|
||||
gem install fpm
|
||||
|
||||
(On OS X, you may also need gnutar: `brew install gnu-tar`.)
|
||||
|
||||
Building a package might look something like this:
|
||||
|
||||
fpm -s <source type> -t <target type> [list of sources]...
|
||||
|
||||
"Source type" is what your package is coming from; a directory (dir), a rubygem
|
||||
(gem), an rpm (rpm), a python package (python), a php pear module (pear), etc.
|
||||
|
||||
"Target type" is what your output package form should be. Most common are "rpm"
|
||||
and "deb" but others exist (solaris, etc)
|
||||
|
||||
You have two options for learning to run FPM:
|
||||
|
||||
1. If you're impatient, just scan through `fpm --help`; you'll need various
|
||||
options, and they're reasonably straightforward. Impatient learning is
|
||||
totally welcome, and if you run into issues, ask questions in #fpm on
|
||||
freenode irc or on fpm-users@googlegroups.com!
|
||||
1. [The wiki](https://github.com/jordansissel/fpm/wiki) has explanations and
|
||||
examples. If you run into problems, I welcome you to ask questions in #fpm
|
||||
on freenode irc or on fpm-users@googlegroups.com!
|
||||
|
||||
## Things that are in the works or should work:
|
||||
|
||||
Sources:
|
||||
|
||||
* gem (even autodownloaded for you)
|
||||
* python modules (autodownload for you)
|
||||
* pear (also downloads for you)
|
||||
* directories
|
||||
* tar(.gz) archives
|
||||
* rpm
|
||||
* deb
|
||||
* node packages (npm)
|
||||
* pacman (ArchLinux) packages
|
||||
|
||||
Targets:
|
||||
|
||||
* deb
|
||||
* rpm
|
||||
* solaris
|
||||
* tar
|
||||
* directories
|
||||
* Mac OS X `.pkg` files (`osxpkg`)
|
||||
* pacman (ArchLinux) packages
|
||||
|
||||
## Need Help or Want to Contribute?
|
||||
|
||||
All contributions are welcome: ideas, patches, documentation, bug reports,
|
||||
complaints, and even something you drew up on a napkin.
|
||||
|
||||
It is more important to me that you are able to contribute and get help if you
|
||||
need it..
|
||||
|
||||
That said, some basic guidelines, which you are free to ignore :)
|
||||
|
||||
* Have a problem you want fpm to solve for you? You can email the
|
||||
[mailing list](http://groups.google.com/group/fpm-users), or
|
||||
join the IRC channel #fpm on irc.freenode.org, or email me personally
|
||||
(jls@semicomplete.com)
|
||||
* Have an idea or a feature request? File a ticket on
|
||||
[GitHub](https://github.com/jordansissel/fpm/issues), or email the
|
||||
[mailing list](http://groups.google.com/group/fpm-users), or email
|
||||
me personally (jls@semicomplete.com) if that is more comfortable.
|
||||
* If you think you found a bug, it probably is a bug. File it on
|
||||
[GitHub](https://github.com/jordansissel/fpm/issues) or send details to
|
||||
the [mailing list](http://groups.google.com/group/fpm-users).
|
||||
* 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](http://groups.google.com/group/fpm-users)
|
||||
|
||||
### Contributing by forking from GitHub
|
||||
|
||||
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.md](CODE_OF_CONDUCT.md).
|
||||
|
||||
First, create a GitHub account if you do not already have one. Log in to
|
||||
GitHub and go to [the main fpm GitHub page](https://github.com/jordansissel/fpm).
|
||||
|
||||
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:
|
||||
|
||||
$ git clone git@github.com:yourusername/fpm.git
|
||||
|
||||
If you don't already have the bundler gem installed, install it now:
|
||||
|
||||
$ gem install bundler
|
||||
|
||||
Now change to the root of the fpm repo and run:
|
||||
|
||||
$ 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:
|
||||
|
||||
...
|
||||
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:
|
||||
|
||||
apt-get install bsdtar
|
||||
|
||||
yum install bsdtar
|
||||
|
||||
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:
|
||||
|
||||
$ xcode-select --install
|
||||
|
||||
Finally, click the install button on the prompt that appears.
|
||||
|
||||
|
||||
|
||||
## More Documentation
|
||||
|
||||
[See the wiki for more docs](https://github.com/jordansissel/fpm/wiki)
|
||||
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
fpm
|
||||
===
|
||||
|
||||
|Gem|
|
||||
|
||||
The goal of fpm is to make it easy and quick to build packages such as rpms,
|
||||
debs, OSX packages, etc.
|
||||
|
||||
fpm, as a project, exists to help you build packages, therefore:
|
||||
|
||||
* If fpm is not helping you make packages easily, then there is a bug in fpm.
|
||||
* If you are having a bad time with fpm, then there is a bug in fpm.
|
||||
* If the documentation is confusing, then this is a bug in fpm.
|
||||
|
||||
If there is a bug in fpm, then we can work together to fix it. If you wish to
|
||||
report a bug/problem/whatever, I welcome you to do on `the project issue tracker`_.
|
||||
|
||||
.. _the project issue tracker: https://github.com/jordansissel/fpm/issues
|
||||
|
||||
You can find out how to use fpm in the `documentation`_.
|
||||
|
||||
.. _documentation: https://fpm.readthedocs.io/en/latest/
|
||||
|
||||
You can learn how to install fpm on your platform in the `installation guide`_.
|
||||
|
||||
.. _installation guide: https://fpm.readthedocs.io/en/latest/installation.html
|
||||
|
||||
Project Principles
|
||||
------------------
|
||||
|
||||
* Community: If a newbie has a bad time, it's a bug.
|
||||
* Engineering: Make it work, then make it right, then make it fast.
|
||||
* Capabilities: If it doesn't do a thing today, we can make it do it tomorrow.
|
||||
|
||||
|
||||
Backstory
|
||||
---------
|
||||
|
||||
Sometimes packaging is done wrong (because you can't do it right for all
|
||||
situations), but small tweaks can fix it.
|
||||
|
||||
And sometimes, there isn't a package available for the tool you need.
|
||||
|
||||
And sometimes if you ask "How do I get python 3.9 on RHEL 8?" some unhelpful
|
||||
trolls will tell you to "Use another distro"
|
||||
|
||||
Further, job switches have me flipping between Ubuntu and CentOS. These use
|
||||
two totally different package systems with completely different packaging
|
||||
policies and support tools. Learning both was painful and confusing. I want to
|
||||
save myself (and you) that pain in the future.
|
||||
|
||||
It should be easy to say "here's my install dir and here's some dependencies;
|
||||
please make a package"
|
||||
|
||||
The Solution - FPM
|
||||
------------------
|
||||
|
||||
I wanted a simple way to create packages without needing to memorize too much.
|
||||
|
||||
I wanted a tool to help me deliver software with minimal steps or training.
|
||||
|
||||
The goal of FPM is to be able to easily build platform-native packages.
|
||||
|
||||
With fpm, you can do many things, including:
|
||||
|
||||
* Creating packages easily (deb, rpm, freebsd, etc)
|
||||
* Tweaking existing packages (removing files, changing metadata/dependencies)
|
||||
* Stripping pre/post/maintainer scripts from packages
|
||||
|
||||
.. include: docs/installing
|
||||
|
||||
Things that should work
|
||||
-----------------------
|
||||
|
||||
Sources:
|
||||
|
||||
* gem (even autodownloaded for you)
|
||||
* python modules (autodownload for you)
|
||||
* pear (also downloads for you)
|
||||
* directories
|
||||
* tar(.gz) archives
|
||||
* rpm
|
||||
* deb
|
||||
* node packages (npm)
|
||||
* pacman (ArchLinux) packages
|
||||
|
||||
Targets:
|
||||
|
||||
* deb
|
||||
* rpm
|
||||
* solaris
|
||||
* freebsd
|
||||
* tar
|
||||
* directories
|
||||
* Mac OS X `.pkg` files (`osxpkg`)
|
||||
* pacman (ArchLinux) packages
|
||||
|
||||
.. include: docs/contributing
|
||||
|
||||
.. |Gem| image:: https://img.shields.io/gem/v/fpm.svg
|
||||
:target: https://rubygems.org/gems/fpm
|
||||
1
bin/fpm
1
bin/fpm
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require "rubygems"
|
||||
$: << File.join(File.dirname(__FILE__), "..", "lib")
|
||||
require "fpm"
|
||||
require "fpm/command"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
# This Dockerfile produces a docker image which is used to build the fpm docs.
|
||||
FROM debian:latest
|
||||
RUN apt-get update
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip
|
||||
RUN apt-get install -y python3-sphinx #pip3 install Sphinx
|
||||
#==1.8
|
||||
RUN apt-get install -y python3-sphinx python3-sphinx-rtd-theme python3-sphinx-autobuild
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
include Makefile.sphinx
|
||||
|
||||
IMAGE=fpm-sphinx
|
||||
WORKDIR=./.work
|
||||
GITROOT=$(shell git rev-parse --show-toplevel)
|
||||
GITREMOTE=$(shell git remote -v | awk '/(push)/ {print $$2}')
|
||||
|
||||
GENERATED_FILES=cli-reference.rst changelog_links.rst
|
||||
|
||||
$(WORKDIR):
|
||||
mkdir $(WORKDIR)
|
||||
|
||||
# A task to generate reST syntax for issue links mentioned in CHANGELOG.rst
|
||||
changelog_links.rst: ../CHANGELOG.rst Makefile
|
||||
grep -Eo '#[0-9]+' $< \
|
||||
| tr -d '#' \
|
||||
| awk '{printf ".. _#%s: https://github.com/jordansissel/fpm/issues/%s\n", $$1, $$1 }' \
|
||||
| sort -u > $@
|
||||
|
||||
# CLI reference is generated based on the the command line flags
|
||||
cli-reference.rst: generate-cli-reference.rb Makefile
|
||||
cli-reference.rst: ../lib/fpm/package/*.rb ../lib/fpm/package.rb
|
||||
ruby -I ../lib generate-cli-reference.rb > $@
|
||||
|
||||
package-type-cli:
|
||||
$(MAKE) $(addprefix packages/cli/,$(addsuffix .rst,$(notdir $(basename $(wildcard ../lib/fpm/package/*.rb)))))
|
||||
|
||||
packages/cli:
|
||||
mkdir $@
|
||||
|
||||
packages/cli/%.rst: ../lib/fpm/package/%.rb packages/cli generate-cli-reference.rb Makefile
|
||||
ruby -I ../lib generate-cli-reference.rb $* > $@
|
||||
|
||||
|
||||
.PHONY: docker-prep
|
||||
docker-prep: Dockerfile
|
||||
@docker images fpm-sphinx | grep -q '^fpm-sphinx ' \
|
||||
|| docker build -t $(IMAGE) .
|
||||
|
||||
.PHONY: build
|
||||
build: $(GENERATED_FILES) | docker-prep package-type-cli
|
||||
docker run -it -v $$PWD/../:/project:z $(IMAGE) sh -xc 'make -C /project/docs html && chown -R 1000:1000 /project/docs'
|
||||
|
||||
|
||||
.PHONY: build
|
||||
view: $(GENERATED_FILES) | docker-prep
|
||||
docker run -p 127.0.0.1:8000:8000 -it -v $$PWD/../:/project:z $(IMAGE) sh -xc 'make -C /project/docs livehtml'
|
||||
|
|
@ -0,0 +1,221 @@
|
|||
# Makefile for Sphinx documentation
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = _build
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
# the i18n builder cannot share the environment and doctrees with the others
|
||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " applehelp to make an Apple Help Book"
|
||||
@echo " devhelp to make HTML files and a Devhelp project"
|
||||
@echo " epub to make an epub"
|
||||
@echo " epub3 to make an epub3"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
||||
@echo " text to make text files"
|
||||
@echo " man to make manual pages"
|
||||
@echo " texinfo to make Texinfo files"
|
||||
@echo " info to make Texinfo files and run them through makeinfo"
|
||||
@echo " gettext to make PO message catalogs"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " xml to make Docutils-native XML files"
|
||||
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
@echo " coverage to run coverage check of the documentation (if enabled)"
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)/*
|
||||
|
||||
.PHONY: html
|
||||
html:
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
.PHONY: dirhtml
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
|
||||
.PHONY: singlehtml
|
||||
singlehtml:
|
||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||
|
||||
.PHONY: pickle
|
||||
pickle:
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
.PHONY: json
|
||||
json:
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
.PHONY: htmlhelp
|
||||
htmlhelp:
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
.PHONY: qthelp
|
||||
qthelp:
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/fpm.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/fpm.qhc"
|
||||
|
||||
.PHONY: applehelp
|
||||
applehelp:
|
||||
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
|
||||
@echo
|
||||
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
|
||||
@echo "N.B. You won't be able to view it unless you put it in" \
|
||||
"~/Library/Documentation/Help or install it in your application" \
|
||||
"bundle."
|
||||
|
||||
.PHONY: devhelp
|
||||
devhelp:
|
||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
||||
@echo
|
||||
@echo "Build finished."
|
||||
@echo "To view the help file:"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/fpm"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/fpm"
|
||||
@echo "# devhelp"
|
||||
|
||||
.PHONY: epub
|
||||
epub:
|
||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||
@echo
|
||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||
|
||||
.PHONY: epub3
|
||||
epub3:
|
||||
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
|
||||
@echo
|
||||
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
|
||||
|
||||
.PHONY: latex
|
||||
latex:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||
"(use \`make latexpdf' here to do that automatically)."
|
||||
|
||||
.PHONY: latexpdf
|
||||
latexpdf:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through pdflatex..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
.PHONY: latexpdfja
|
||||
latexpdfja:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through platex and dvipdfmx..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
.PHONY: text
|
||||
text:
|
||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||
@echo
|
||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
||||
|
||||
.PHONY: man
|
||||
man:
|
||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||
@echo
|
||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||
|
||||
.PHONY: texinfo
|
||||
texinfo:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo
|
||||
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
||||
@echo "Run \`make' in that directory to run these through makeinfo" \
|
||||
"(use \`make info' here to do that automatically)."
|
||||
|
||||
.PHONY: info
|
||||
info:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo "Running Texinfo files through makeinfo..."
|
||||
make -C $(BUILDDIR)/texinfo info
|
||||
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
||||
|
||||
.PHONY: gettext
|
||||
gettext:
|
||||
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
||||
@echo
|
||||
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
||||
|
||||
.PHONY: changes
|
||||
changes:
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
.PHONY: linkcheck
|
||||
linkcheck:
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
.PHONY: doctest
|
||||
doctest:
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
||||
|
||||
.PHONY: coverage
|
||||
coverage:
|
||||
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
|
||||
@echo "Testing of coverage in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/coverage/python.txt."
|
||||
|
||||
.PHONY: xml
|
||||
xml:
|
||||
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
||||
@echo
|
||||
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
||||
|
||||
.PHONY: pseudoxml
|
||||
pseudoxml:
|
||||
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
||||
@echo
|
||||
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
||||
|
||||
livehtml:
|
||||
sphinx-autobuild --host 0.0.0.0 "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
.. include:: changelog_links.rst
|
||||
.. include:: ../CHANGELOG.rst
|
||||
|
|
@ -0,0 +1,466 @@
|
|||
.. _#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
|
||||
|
|
@ -0,0 +1,596 @@
|
|||
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``
|
||||
- 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
|
||||
|
||||
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``
|
||||
- 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
|
||||
|
||||
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
|
||||
|
||||
|
|
@ -0,0 +1,288 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# fpm documentation build configuration file, created by
|
||||
# sphinx-quickstart on Sun Nov 27 05:23:34 2016.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = [
|
||||
'sphinx_rtd_theme'
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
# source_suffix = ['.rst', '.md']
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'fpm - packaging made simple'
|
||||
copyright = u'2025, Jordan Sissel and contributors'
|
||||
author = u'Jordan Sissel'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = u'1.17'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = u'1.17.0'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = "en"
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This patterns also effect to html_static_path and html_extra_path
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all
|
||||
# documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||
#keep_warnings = False
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = False
|
||||
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents.
|
||||
# "<project> v<release> documentation" by default.
|
||||
#html_title = u'fpm v1.6.3'
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
|
||||
# The name of an image file (relative to this directory) to use as a favicon of
|
||||
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
# directly to the root of the documentation.
|
||||
#html_extra_path = []
|
||||
|
||||
# If not None, a 'Last updated on:' timestamp is inserted at every page
|
||||
# bottom, using the given strftime format.
|
||||
# The empty string is equivalent to '%b %d, %Y'.
|
||||
#html_last_updated_fmt = None
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
|
||||
# Language to be used for generating the HTML full-text search index.
|
||||
# Sphinx supports the following languages:
|
||||
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
|
||||
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'
|
||||
#html_search_language = 'en'
|
||||
|
||||
# A dictionary with options for the search language support, empty by default.
|
||||
# 'ja' uses this config value.
|
||||
# 'zh' user can custom change `jieba` dictionary path.
|
||||
#html_search_options = {'type': 'default'}
|
||||
|
||||
# The name of a javascript file (relative to the configuration directory) that
|
||||
# implements a search results scorer. If empty, the default will be used.
|
||||
#html_search_scorer = 'scorer.js'
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'fpmdoc'
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
|
||||
# Latex figure (float) alignment
|
||||
#'figure_align': 'htbp',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(master_doc, 'fpm.tex', u'fpm Documentation',
|
||||
u'Jordan Sissel', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output ---------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
(master_doc, 'fpm', u'fpm Documentation',
|
||||
[author], 1)
|
||||
]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output -------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
(master_doc, 'fpm', u'fpm Documentation',
|
||||
author, 'fpm', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#texinfo_domain_indices = True
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#texinfo_show_urls = 'footnote'
|
||||
|
||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
#texinfo_no_detailmenu = False
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
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 (jls@semicomplete.com)
|
||||
* Have an idea or a feature request? File a ticket on `github`_, or email the `mailing list`_, or email me personally (jls@semicomplete.com) 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](https://github.com/jordansissel/fpm).
|
||||
|
||||
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:
|
||||
|
||||
$ git clone git@github.com:yourusername/fpm.git
|
||||
|
||||
Development Environment
|
||||
-----------------------
|
||||
|
||||
If you don't already have the bundler gem installed, install it now:
|
||||
|
||||
$ gem install bundler
|
||||
|
||||
Now change to the root of the FPM repo and run:
|
||||
|
||||
$ 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:
|
||||
|
||||
...
|
||||
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:
|
||||
|
||||
apt-get install bsdtar || apt install libarchive-tools
|
||||
|
||||
yum install bsdtar
|
||||
|
||||
|
||||
You also need these tools:
|
||||
|
||||
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:
|
||||
|
||||
$ 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.
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
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.
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require_relative "../lib/fpm/command"
|
||||
|
||||
flagsort = lambda { |x| x.sub(/^--(?:\[no-\])?/, "") }
|
||||
|
||||
if ARGV.length == 0
|
||||
puts "Command-line Reference"
|
||||
puts "=========================="
|
||||
puts
|
||||
|
||||
puts "This page documents the command-line flags available in FPM. You can also see this content in your terminal by running ``fpm --help``"
|
||||
puts
|
||||
|
||||
puts "General Options"
|
||||
puts "---------------"
|
||||
|
||||
#FPM::Command.instance_variable_get(:@declared_options).sort_by { |o| flagsort.call(o.switches.first) }.each do |option|
|
||||
FPM::Command::GENERAL_OPTIONS.sort_by { |o| flagsort.call(o.switches.first) }.each do |option|
|
||||
text = option.description.gsub("\n", " ")
|
||||
|
||||
if option.type == :flag
|
||||
# it's a flag which means there are no parameters to the option
|
||||
puts "* ``#{option.switches.first}``"
|
||||
else
|
||||
puts "* ``#{option.switches.first} #{option.type}``"
|
||||
end
|
||||
|
||||
if option.switches.length > 1
|
||||
puts " - Alternate option spellings: ``#{option.switches[1..-1].join(", ")}``"
|
||||
end
|
||||
puts " - #{text}"
|
||||
puts
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
FPM::Package.types.sort_by { |k,v| k }.each do |name, type|
|
||||
next if ARGV.length > 0 && ARGV[0].downcase != name.downcase
|
||||
|
||||
options = type.instance_variable_get(:@options)
|
||||
|
||||
# Only print the section header if no arguments are given
|
||||
# -- aka, generate the list of all flags grouped by package type.
|
||||
if ARGV.length == 0
|
||||
puts "#{name}"
|
||||
puts "-" * name.size
|
||||
puts
|
||||
end
|
||||
|
||||
if options.empty?
|
||||
puts "This package type has no additional options"
|
||||
end
|
||||
|
||||
options.sort_by { |flag, _| flagsort.call(flag.first) }.each do |flag, param, help, options, block|
|
||||
if param == :flag
|
||||
puts "* ``#{flag.first}``"
|
||||
else
|
||||
puts "* ``#{flag.first} #{param}``"
|
||||
end
|
||||
|
||||
text = help.sub(/^\([^)]+\) /, "")
|
||||
puts " - #{text}"
|
||||
end
|
||||
|
||||
puts
|
||||
end
|
||||
|
|
@ -0,0 +1,244 @@
|
|||
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::
|
||||
|
||||
--- 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::
|
||||
|
||||
--- 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::
|
||||
|
||||
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 ``<package name>-<version>-<package rel/iteration>-<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
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. 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>`
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
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 <installation.html>`_ 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
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
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
|
||||
|
||||
.. _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
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
This package type has no additional options
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
* ``--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?
|
||||
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
* ``--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
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
This package type has no additional options
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
This package type has no additional options
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
* ``--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.
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
* ``--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
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
* ``--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.
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
* ``--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'.
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
* ``--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)
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
* ``--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
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
* ``--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)
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
This package type has no additional options
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
* ``--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.
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
This package type has no additional options
|
||||
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
* ``--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
|
||||
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
* ``--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
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
This package type has no additional options
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
* ``--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.
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
* ``--solaris-group GROUP``
|
||||
- Set the group to GROUP in the prototype file.
|
||||
* ``--solaris-user USER``
|
||||
- Set the user to USER in the prototype files.
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
This package type has no additional options
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
* ``--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
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
This package type has no additional options
|
||||
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
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 ascii-art@2.8.5
|
||||
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
|
||||
Description: Ansi codes, figlet fonts, and ascii art. 100% JS
|
||||
|
||||
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
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
Packaging Types
|
||||
===============
|
||||
|
||||
.. toctree::
|
||||
:includehidden:
|
||||
:glob:
|
||||
|
||||
packages/*
|
||||
|
|
@ -0,0 +1 @@
|
|||
sphinx_rtd_theme
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
$: << File.join(File.dirname(__FILE__), "..", "..", "lib")
|
||||
require "fpm"
|
||||
|
||||
package = FPM::Package::Gem.new
|
||||
|
||||
# the Gem package takes a string name of the package to download/install.
|
||||
# Example, run this script with 'rails' as an argument and it will convert
|
||||
# the latest 'rails' gem into rpm.
|
||||
package.input(ARGV[0])
|
||||
rpm = package.convert(FPM::Package::RPM)
|
||||
begin
|
||||
output = "NAME-VERSION.ARCH.rpm"
|
||||
rpm.output(rpm.to_s(output))
|
||||
ensure
|
||||
rpm.cleanup
|
||||
end
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
$: << File.join(File.dirname(__FILE__), "..", "..", "lib")
|
||||
require "fpm"
|
||||
|
||||
package = FPM::Package::Gem.new
|
||||
ARGV.each do |gem|
|
||||
name, version = gem.split(/[=]/, 2)
|
||||
package.version = version # Allow specifying a specific version
|
||||
package.input(gem)
|
||||
end
|
||||
rpm = package.convert(FPM::Package::RPM)
|
||||
rpm.name = "rubygem-manythings"
|
||||
rpm.version = "1.0"
|
||||
begin
|
||||
output = "NAME-VERSION.ARCH.rpm"
|
||||
rpm.output(rpm.to_s(output))
|
||||
ensure
|
||||
rpm.cleanup
|
||||
end
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
#
|
||||
# feel free to change these to whatever makes sense
|
||||
#
|
||||
# debian package we rely on
|
||||
RUBY_PACKAGE=ruby
|
||||
# and the executable that comes from it
|
||||
RUBY_BIN=/usr/bin/ruby
|
||||
# the version we name the deb
|
||||
VERSION=1.1.0
|
||||
# where to get the sauce
|
||||
GIT_URL=https://github.com/jordansissel/fpm.git
|
||||
# the tag we checkout to build from
|
||||
TAG_SPEC=refs/tags/v$(VERSION)
|
||||
|
||||
CHECKOUT_DIR=fpm-checkout
|
||||
BUILD_DIR=build
|
||||
LIB_DIR=$(BUILD_DIR)/usr/lib/fpm
|
||||
BIN_DIR=$(BUILD_DIR)/usr/bin
|
||||
GEM_PATH:=$(shell readlink -f .)/build/gem
|
||||
FPM_BIN=$(BIN_DIR)/fpm
|
||||
BUNDLE_BIN=$(GEM_PATH)/bin/bundle
|
||||
BUNDLE_CMD=$(RUBY_CMD) $(BUNDLE_BIN)
|
||||
FPM_CMD=$(FPM_BIN)
|
||||
GEM_CMD=$(RUBY_BIN) -S gem
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(CHECKOUT_DIR)
|
||||
rm -rf $(BUILD_DIR)
|
||||
rm -f fpm*.deb
|
||||
|
||||
$(CHECKOUT_DIR):
|
||||
rm -rf $(CHECKOUT_DIR)
|
||||
git clone $(GIT_URL) $(CHECKOUT_DIR) --depth 1
|
||||
cd $(CHECKOUT_DIR) && git fetch && git checkout $(TAG_SPEC)
|
||||
|
||||
$(BUNDLE_BIN):
|
||||
$(GEM_CMD) install bundler --install-dir=$(GEM_PATH) --no-ri --no-rdoc
|
||||
|
||||
$(FPM_BIN):
|
||||
mkdir --parents $(BIN_DIR)
|
||||
# Couldn't think of a nice way to do this, so here is this code turd
|
||||
echo "#! $(RUBY_BIN)" > $(FPM_BIN)
|
||||
echo 'load File.dirname($$0) + "/../lib/fpm/bundle/bundler/setup.rb"' >> $(FPM_BIN)
|
||||
echo 'require "fpm"' >> $(FPM_BIN)
|
||||
echo 'require "fpm/command"' >> $(FPM_BIN)
|
||||
echo 'exit(FPM::Command.run || 0)' >> $(FPM_BIN)
|
||||
chmod +x $(FPM_BIN)
|
||||
|
||||
.PHONY: install
|
||||
install: $(CHECKOUT_DIR) $(BUNDLE_BIN) $(FPM_BIN)
|
||||
mkdir --parents $(LIB_DIR)
|
||||
cd $(CHECKOUT_DIR) && GEM_PATH=$(GEM_PATH) $(BUNDLE_CMD) install --without=development --standalone
|
||||
cd $(CHECKOUT_DIR) && gem build fpm.gemspec
|
||||
tar -xf $(CHECKOUT_DIR)/fpm*gem -C $(BUILD_DIR)
|
||||
tar --touch -xf $(BUILD_DIR)/data.tar.gz -C $(LIB_DIR)
|
||||
cp -r $(CHECKOUT_DIR)/bundle $(LIB_DIR)/bundle
|
||||
|
||||
.PHONY: package
|
||||
package: install
|
||||
$(FPM_BIN) -s dir -t deb -n fpm -d $(RUBY_PACKAGE) -v $(VERSION) -C $(BUILD_DIR) usr
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# About
|
||||
|
||||
- build and install dependency on a ruby1.9 of some kind
|
||||
- does not need root to package
|
||||
- has its own GEM_DIR to keep its dependencies isolated
|
||||
- installation does not install any gems in to your ruby environment
|
||||
- installs in to standard locations /usr/{bin,lib}/fpm
|
||||
- doesn't depend on having fpm installed for packaging to work
|
||||
|
||||
# Dependencies
|
||||
|
||||
- build-essential (perhaps more, but basically the standard packages you need
|
||||
for deb packaging)
|
||||
- ruby and ruby-dev
|
||||
|
||||
# Usage
|
||||
|
||||
- $ cd examples/fpm-with-system-ruby && make package
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
NAME=ruby
|
||||
VERSION=1.9.2-p180
|
||||
MAJOR_VERSION=1.9
|
||||
ARCHITECTURE=x86
|
||||
TARDIR=$(NAME)-$(VERSION)
|
||||
TARBALL=$(TARDIR).tar.gz
|
||||
DOWNLOAD=http://ftp.ruby-lang.org/pub/ruby/$(MAJOR_VERSION)/$(TARBALL)
|
||||
|
||||
PREFIX=/opt/fpm
|
||||
|
||||
PACKAGE_NAME=fpm
|
||||
PACKAGE_VERSION=0.2.30
|
||||
|
||||
.PHONY: default
|
||||
default: deb
|
||||
package: deb
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(NAME)-* $(NAME)_* |NAME| true
|
||||
rm -fr $(TARDIR) || true
|
||||
rm -fr $(PREFIX) || true
|
||||
rm -f *.deb
|
||||
|
||||
$(TARBALL):
|
||||
wget "$(DOWNLOAD)"
|
||||
|
||||
$(TARDIR): $(TARBALL)
|
||||
tar -zxf $(TARBALL)
|
||||
cd $(TARDIR); ./configure --enable-shared=false --prefix=$(PREFIX); make; make install
|
||||
$(PREFIX)/bin/gem install fpm
|
||||
|
||||
.PHONY: deb
|
||||
deb: $(TARDIR)
|
||||
$(PREFIX)/bin/fpm -s dir -t deb -v $(PACKAGE_VERSION) -n $(PACKAGE_NAME) -a $(ARCHITECTURE) -C $(PREFIX) .
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
Notes:
|
||||
|
||||
You should have write permission on /opt directory
|
||||
|
||||
Dependencies:
|
||||
|
||||
$ sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libxml2-dev libxslt-dev autoconf libc6-dev
|
||||
|
||||
Usage:
|
||||
|
||||
$ make package
|
||||
|
||||
Should make the package. Try installing:
|
||||
|
||||
$ sudo dpkg -i fpm-0.2.30.x86.deb
|
||||
|
||||
Now try it:
|
||||
|
||||
$ /opt/fpm/bin/fpm --help
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
NAME=jruby
|
||||
VERSION=1.6.1
|
||||
DOWNLOAD=http://jruby.org.s3.amazonaws.com/downloads/$(VERSION)/$(TARBALL)
|
||||
TARBALL=$(NAME)-bin-$(VERSION).tar.gz
|
||||
TARDIR=$(NAME)-$(VERSION)
|
||||
|
||||
PREFIX=/opt/jruby
|
||||
|
||||
.PHONY: default
|
||||
default: deb
|
||||
package: deb
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(NAME)-* $(NAME)_* || true
|
||||
rm -fr $(TARDIR) || true
|
||||
rm -f *.deb
|
||||
rm -f *.rpm
|
||||
|
||||
$(TARBALL):
|
||||
wget "$(DOWNLOAD)"
|
||||
|
||||
$(TARDIR): $(TARBALL)
|
||||
tar -zxf $(TARBALL)
|
||||
|
||||
.PHONY: deb
|
||||
deb: $(TARDIR)
|
||||
fpm -s dir -t deb -v $(VERSION) -n $(NAME) -d "sun-java6-bin (>> 0)" \
|
||||
-a all -d "sun-java6-jre (>> 0)" --prefix $(PREFIX) -C $(TARDIR) .
|
||||
|
||||
.PHONY: rpm
|
||||
rpm: $(TARDIR)
|
||||
fpm -s dir -t rpm -v $(VERSION) -n $(NAME) -d "jdk >= 1.6.0" \
|
||||
-a all --prefix $(PREFIX) -C $(TARDIR) .
|
||||
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
Usage:
|
||||
|
||||
make package
|
||||
|
||||
Should make the package. Try installing:
|
||||
|
||||
sudo dpkg -i jruby-1.6.0.RC2-1.all.deb
|
||||
|
||||
Now try it:
|
||||
|
||||
% /opt/jruby/bin/jirb
|
||||
>> require "java"
|
||||
=> true
|
||||
>> java.lang.System.out.println("Hello")
|
||||
Hello
|
||||
=> nil
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
NAME=twisted
|
||||
VERSION=10.2.0
|
||||
|
||||
twisted:
|
||||
easy_install --editable --build-directory . "$(NAME)==$(VERSION)"
|
||||
|
||||
usr: twisted
|
||||
cd twisted; python setup.py bdist
|
||||
tar -zxf twisted/dist/Twisted-$(VERSION).linux-$(shell uname -m).tar.gz
|
||||
|
||||
package: usr
|
||||
fpm -s dir -t deb -n $(NAME) -v $(VERSION) \
|
||||
-p python-$(NAME)-VERSION_ARCH.deb -d "python" \
|
||||
usr
|
||||
|
||||
39
fpm.gemspec
39
fpm.gemspec
|
|
@ -8,7 +8,9 @@ Gem::Specification.new do |spec|
|
|||
|
||||
files << "LICENSE"
|
||||
files << "CONTRIBUTORS"
|
||||
files << "CHANGELIST"
|
||||
files << "CHANGELOG.rst"
|
||||
|
||||
files = files.reject { |path| path =~ /\.pyc$/ }
|
||||
|
||||
spec.name = "fpm"
|
||||
spec.version = FPM::VERSION
|
||||
|
|
@ -18,46 +20,37 @@ Gem::Specification.new do |spec|
|
|||
"management without wasting pointless hours debugging bad rpm specs!"
|
||||
spec.license = "MIT-like"
|
||||
|
||||
# For parsing JSON (required for some Python support, etc)
|
||||
# http://flori.github.com/json/doc/index.html
|
||||
spec.add_dependency("json", ">= 1.7.7", "< 2.0") # license: Ruby License
|
||||
spec.required_ruby_version = '>= 1.9.3'
|
||||
|
||||
# For logging
|
||||
# https://github.com/jordansissel/ruby-cabin
|
||||
spec.add_dependency("cabin", ">= 0.6.0") # license: Apache 2
|
||||
spec.add_dependency("cabin", ">= 0.9.1") # license: Apache 2
|
||||
|
||||
# For backports to older rubies
|
||||
# https://github.com/marcandre/backports
|
||||
spec.add_dependency("backports", ">= 2.6.2") # license: MIT
|
||||
|
||||
# For reading and writing rpms
|
||||
spec.add_dependency("arr-pm", "~> 0.0.10") # license: Apache 2
|
||||
spec.add_dependency("arr-pm", "~> 0.0.11") # license: Apache 2
|
||||
|
||||
# For command-line flag support
|
||||
# https://github.com/mdub/clamp/blob/master/README.markdown
|
||||
spec.add_dependency("clamp", "~> 1.0.0") # license: MIT
|
||||
spec.add_dependency("clamp", ">= 1.0.0") # license: MIT
|
||||
|
||||
# For starting external processes across various ruby interpreters
|
||||
spec.add_dependency("childprocess") # license: ???
|
||||
# For sourcing from pleaserun
|
||||
spec.add_dependency("pleaserun", "~> 0.0.29") # license: Apache 2
|
||||
|
||||
# For calling functions in dynamic libraries
|
||||
spec.add_dependency("ffi") # license: GPL3/LGPL3
|
||||
spec.add_dependency("stud")
|
||||
|
||||
spec.add_development_dependency("rake", "~> 10") # license: MIT
|
||||
# In Ruby 3.0, rexml was moved to a bundled gem instead of a default one,
|
||||
# so I think this needs to be added explicitly?
|
||||
spec.add_dependency("rexml")
|
||||
|
||||
# For creating tar archives (many packages are just tar archives)
|
||||
spec.add_dependency("archive-tar-minitar") # license: GPL2+
|
||||
|
||||
# For creating FreeBSD package archives (xz-compressed tars)
|
||||
spec.add_dependency("ruby-xz") # license: MIT
|
||||
|
||||
# For sourcing from pleaserun
|
||||
spec.add_dependency("pleaserun", "~> 0.0.24") # license: Apache 2
|
||||
|
||||
spec.add_development_dependency("rspec", "~> 3.0.0") # license: MIT (according to wikipedia)
|
||||
spec.add_development_dependency("rspec", "~> 3.13.0") # license: MIT (according to wikipedia)
|
||||
spec.add_development_dependency("insist", "~> 1.0.0") # license: Apache 2
|
||||
spec.add_development_dependency("pry")
|
||||
spec.add_development_dependency("stud")
|
||||
|
||||
spec.add_development_dependency("rake") # For FPM::RakeTask, #1877, #756
|
||||
|
||||
spec.files = files
|
||||
spec.require_paths << "lib"
|
||||
|
|
|
|||
|
|
@ -17,3 +17,5 @@ require "fpm/package/solaris"
|
|||
require "fpm/package/p5p"
|
||||
require "fpm/package/pkgin"
|
||||
require "fpm/package/freebsd"
|
||||
require "fpm/package/apk"
|
||||
require "fpm/package/snap"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ require "fpm/namespace"
|
|||
require "fpm/version"
|
||||
require "fpm/util"
|
||||
require "clamp"
|
||||
require "ostruct"
|
||||
require "fpm"
|
||||
require "tmpdir" # for Dir.tmpdir
|
||||
|
||||
|
|
@ -45,13 +44,13 @@ class FPM::Command < Clamp::Command
|
|||
return lines.join("\n")
|
||||
end # def help
|
||||
|
||||
option "-t", "OUTPUT_TYPE",
|
||||
option ["-t", "--output-type"], "OUTPUT_TYPE",
|
||||
"the type of package you want to create (deb, rpm, solaris, etc)",
|
||||
:attribute_name => :output_type
|
||||
option "-s", "INPUT_TYPE",
|
||||
option ["-s", "--input-type"], "INPUT_TYPE",
|
||||
"the package type to use as input (gem, rpm, python, etc)",
|
||||
:attribute_name => :input_type
|
||||
option "-C", "CHDIR",
|
||||
option ["-C", "--chdir"], "CHDIR",
|
||||
"Change directory to here before searching for files",
|
||||
:attribute_name => :chdir
|
||||
option "--prefix", "PREFIX",
|
||||
|
|
@ -233,13 +232,38 @@ class FPM::Command < Clamp::Command
|
|||
"copying, downloading, etc. Roughly any scratch space fpm needs to build " \
|
||||
"your package.", :default => Dir.tmpdir
|
||||
|
||||
option "--source-date-epoch-from-changelog", :flag,
|
||||
"Use release date from changelog as timestamp on generated files to reduce nondeterminism. " \
|
||||
"Experimental; only implemented for gem so far. ",
|
||||
:default => false
|
||||
|
||||
option "--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 ",
|
||||
:environment_variable => "SOURCE_DATE_EPOCH"
|
||||
|
||||
option "--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.." do |path|
|
||||
load_options(path)
|
||||
end
|
||||
|
||||
parameter "[ARGS] ...",
|
||||
"Inputs to the source package type. For the 'dir' type, this is the files" \
|
||||
" and directories you want to include in the package. For others, like " \
|
||||
"'gem', it specifies the packages to download and use as the gem input",
|
||||
:attribute_name => :args
|
||||
|
||||
# Keep a copy of the original flags (ones declared above, not by package types)
|
||||
# This helps when generating the documentation
|
||||
GENERAL_OPTIONS = @declared_options.clone
|
||||
FPM::Package.types.each do |name, klass|
|
||||
# This adds each package's flags to the main command
|
||||
klass.apply_options(self)
|
||||
end
|
||||
|
||||
|
|
@ -256,12 +280,6 @@ class FPM::Command < Clamp::Command
|
|||
|
||||
# Execute this command. See Clamp::Command#execute and Clamp's documentation
|
||||
def execute
|
||||
# Short-circuit if someone simply runs `fpm --version`
|
||||
if ARGV == [ "--version" ]
|
||||
puts FPM::VERSION
|
||||
return 0
|
||||
end
|
||||
|
||||
logger.level = :warn
|
||||
logger.level = :info if verbose? # --verbose
|
||||
logger.level = :debug if debug? # --debug
|
||||
|
|
@ -269,7 +287,6 @@ class FPM::Command < Clamp::Command
|
|||
logger.level = log_level.to_sym
|
||||
end
|
||||
|
||||
|
||||
if (stray_flags = args.grep(/^-/); stray_flags.any?)
|
||||
logger.warn("All flags should be before the first argument " \
|
||||
"(stray flags found: #{stray_flags}")
|
||||
|
|
@ -284,6 +301,15 @@ class FPM::Command < Clamp::Command
|
|||
args << "."
|
||||
end
|
||||
|
||||
if !File.exist?(workdir)
|
||||
logger.fatal("Given --workdir=#{workdir} is not a path that exists.")
|
||||
raise FPM::Package::InvalidArgument, "The given workdir '#{workdir}' does not exist."
|
||||
end
|
||||
if !File.directory?(workdir)
|
||||
logger.fatal("Given --workdir=#{workdir} must be a directory")
|
||||
raise FPM::Package::InvalidArgument, "The given workdir '#{workdir}' must be a directory."
|
||||
end
|
||||
|
||||
logger.info("Setting workdir", :workdir => workdir)
|
||||
ENV["TMP"] = workdir
|
||||
|
||||
|
|
@ -348,7 +374,7 @@ class FPM::Command < Clamp::Command
|
|||
|
||||
# If --inputs was specified, read it as a file.
|
||||
if !inputs.nil?
|
||||
if !File.exists?(inputs)
|
||||
if !File.exist?(inputs)
|
||||
logger.fatal("File given for --inputs does not exist (#{inputs})")
|
||||
return 1
|
||||
end
|
||||
|
|
@ -363,7 +389,7 @@ class FPM::Command < Clamp::Command
|
|||
# If --exclude-file was specified, read it as a file and append to
|
||||
# the exclude pattern list.
|
||||
if !exclude_file.nil?
|
||||
if !File.exists?(exclude_file)
|
||||
if !File.exist?(exclude_file)
|
||||
logger.fatal("File given for --exclude-file does not exist (#{exclude_file})")
|
||||
return 1
|
||||
end
|
||||
|
|
@ -387,7 +413,12 @@ class FPM::Command < Clamp::Command
|
|||
set = proc do |object, attribute|
|
||||
# if the package's attribute is currently nil *or* the flag setting for this
|
||||
# attribute is non-default, use the value.
|
||||
if object.send(attribute).nil? || send(attribute) != send("default_#{attribute}")
|
||||
|
||||
# Not all options have a default value, so we assume `nil` if there's no default. (#1543)
|
||||
# In clamp >= 1.3.0, options without `:default => ..` will not have any # `default_xyz`
|
||||
# methods generated, so we need to check for the presence of this method first.
|
||||
default = respond_to?("default_#{attribute}") ? send("default_#{attribute}") : nil
|
||||
if object.send(attribute).nil? || send(attribute) != default
|
||||
logger.info("Setting from flags: #{attribute}=#{send(attribute)}")
|
||||
object.send("#{attribute}=", send(attribute))
|
||||
end
|
||||
|
|
@ -428,7 +459,7 @@ class FPM::Command < Clamp::Command
|
|||
# Skip scripts not set
|
||||
next if path.nil?
|
||||
|
||||
if !File.exists?(path)
|
||||
if !File.exist?(path)
|
||||
logger.error("No such file (for #{scriptname.to_s}): #{path.inspect}")
|
||||
script_errors << path
|
||||
end
|
||||
|
|
@ -514,9 +545,16 @@ class FPM::Command < Clamp::Command
|
|||
end
|
||||
end # def execute
|
||||
|
||||
def run(*run_args)
|
||||
def run(run_args)
|
||||
logger.subscribe(STDOUT)
|
||||
|
||||
# Short circuit for a `fpm --version` or `fpm -v` short invocation that
|
||||
# is the user asking us for the version of fpm.
|
||||
if run_args == [ "-v" ] || run_args == [ "--version" ]
|
||||
puts FPM::VERSION
|
||||
return 0
|
||||
end
|
||||
|
||||
# fpm initialization files, note the order of the following array is
|
||||
# important, try .fpm in users home directory first and then the current
|
||||
# directory
|
||||
|
|
@ -557,12 +595,86 @@ class FPM::Command < Clamp::Command
|
|||
|
||||
ARGV.unshift(*flags)
|
||||
ARGV.push(*args)
|
||||
super(*run_args)
|
||||
|
||||
super(run_args)
|
||||
rescue FPM::Package::InvalidArgument => e
|
||||
logger.error("Invalid package argument: #{e}")
|
||||
return 1
|
||||
end # def run
|
||||
|
||||
def load_options(path)
|
||||
@loaded_files ||= []
|
||||
|
||||
if @loaded_files.include?(path)
|
||||
#logger.error("Options file was already loaded once. Refusing to load a second time.", :path => path)
|
||||
raise FPM::Package::InvalidArgument, "Options file already loaded once. Refusing to load a second time. Maybe a file tries to load itself? Path: #{path}"
|
||||
end
|
||||
|
||||
if !File.exist?(path)
|
||||
logger.fatal("Cannot load options from file because the file doesn't exist.", :path => path)
|
||||
end
|
||||
|
||||
if !File.readable?(path)
|
||||
logger.fatal("Cannot load options from file because the file isn't readable.", :path => path)
|
||||
end
|
||||
|
||||
@loaded_files << path
|
||||
|
||||
logger.info("Loading flags from file", :path => path)
|
||||
|
||||
# Safety check, abort if the file is huge. Arbitrarily chosen limit is 100kb
|
||||
stat = File.stat(path)
|
||||
max = 100 * 1024
|
||||
if stat.size > max
|
||||
logger.fatal("Refusing to load options from file because the file seems pretty large.", :path => path, :size => stat.size)
|
||||
raise FPM::Package::InvalidArgument, "Options file given to --fpm-options-file is seems too large. For safety, fpm is refusing to load this. Path: #{path} - Size: #{stat.size}, maximum allowed size #{max}."
|
||||
end
|
||||
|
||||
File.read(path).split($/).each do |line|
|
||||
logger.info("Processing flags from file", :path => path, :line => line)
|
||||
# With apologies for this hack to mdub (Mike Williams, author of Clamp)...
|
||||
# The following code will read a file and parse the file
|
||||
# as flags as if they were in same argument position as the given --fpm-options-file option.
|
||||
|
||||
args = Shellwords.split(line)
|
||||
while args.any?
|
||||
arg = args.shift
|
||||
|
||||
# Lookup the Clamp option by its --flag-name or short name like -f
|
||||
if arg =~ /^-/
|
||||
# Single-letter options like -a or -z
|
||||
if single_letter = arg.match(/^(-[A-Za-z0-9])(.*)$/)
|
||||
option = self.class.find_option(single_letter.match(1))
|
||||
arg, remainder = single_letter.match(1), single_letter.match(2)
|
||||
if option.flag?
|
||||
# Flags aka switches take no arguments, so we push the rest of the 'arg' entry back onto the args list
|
||||
|
||||
# For combined letter flags, like `-abc`, we want to consume the
|
||||
# `-a` and then push `-bc` back to be processed.
|
||||
# Only do this if there's more flags, like, not for `-a` but yes for `-abc`
|
||||
args.unshift("-" + remainder) unless remainder.empty?
|
||||
else
|
||||
# Single letter options that take arguments, like `-ohello` same as `-o hello`
|
||||
|
||||
# For single letter flags with values, like `-ofilename` aka `-o filename`, push the remainder ("filename")
|
||||
# back onto the args list so that it is consumed when we extract the flag value.
|
||||
args.unshift(remainder) unless remainder.empty?
|
||||
end
|
||||
elsif arg.match(/^--/)
|
||||
# Lookup the flag by its long --flag-name
|
||||
option = self.class.find_option(arg)
|
||||
end
|
||||
end
|
||||
|
||||
# Extract the flag value, if any, from the remaining args list.
|
||||
value = option.extract_value(arg, args)
|
||||
|
||||
# Process the flag into `self`
|
||||
option.of(self).take(value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# A simple flag validator
|
||||
#
|
||||
# The goal of this class is to ensure the flags and arguments given
|
||||
|
|
|
|||
|
|
@ -3,11 +3,12 @@ require "fpm/util" # local
|
|||
require "pathname" # stdlib
|
||||
require "find"
|
||||
require "tmpdir" # stdlib
|
||||
require "backports" # gem 'backports'
|
||||
require "backports/latest"
|
||||
require "socket" # stdlib, for Socket.gethostname
|
||||
require "shellwords" # stdlib, for Shellwords.escape
|
||||
require "erb" # stdlib, for template processing
|
||||
require "cabin" # gem "cabin"
|
||||
require "stud/temporary"
|
||||
|
||||
# This class is the parent of all packages.
|
||||
# If you want to implement an FPM package type, you'll inherit from this.
|
||||
|
|
@ -117,7 +118,10 @@ class FPM::Package
|
|||
|
||||
def initialize
|
||||
# Attributes for this specific package
|
||||
@attributes = {}
|
||||
@attributes = {
|
||||
# Default work location
|
||||
:workdir => ::Dir.tmpdir
|
||||
}
|
||||
|
||||
# Reference
|
||||
# http://www.debian.org/doc/manuals/maint-guide/first.en.html
|
||||
|
|
@ -174,8 +178,8 @@ class FPM::Package
|
|||
@directories = []
|
||||
@attrs = {}
|
||||
|
||||
staging_path
|
||||
build_path
|
||||
# Dont' initialize staging_path just yet, do it lazily so subclass can get a word in.
|
||||
end # def initialize
|
||||
|
||||
# Get the 'type' for this instance.
|
||||
|
|
@ -249,7 +253,7 @@ class FPM::Package
|
|||
end # def output
|
||||
|
||||
def staging_path(path=nil)
|
||||
@staging_path ||= ::Dir.mktmpdir("package-#{type}-staging") #, ::Dir.pwd)
|
||||
@staging_path ||= Stud::Temporary.directory("package-#{type}-staging")
|
||||
|
||||
if path.nil?
|
||||
return @staging_path
|
||||
|
|
@ -259,7 +263,7 @@ class FPM::Package
|
|||
end # def staging_path
|
||||
|
||||
def build_path(path=nil)
|
||||
@build_path ||= ::Dir.mktmpdir("package-#{type}-build") #, ::Dir.pwd)
|
||||
@build_path ||= Stud::Temporary.directory("package-#{type}-build")
|
||||
|
||||
if path.nil?
|
||||
return @build_path
|
||||
|
|
@ -311,7 +315,7 @@ class FPM::Package
|
|||
# the path before returning.
|
||||
#
|
||||
# Wrapping Find.find in an Enumerator is required for sane operation in ruby 1.8.7,
|
||||
# but requires the 'backports' gem (which is used in other places in fpm)
|
||||
# but requires the 'backports/latest' gem (which is used in other places in fpm)
|
||||
return Enumerator.new { |y| Find.find(staging_path) { |path| y << path } } \
|
||||
.select { |path| path != staging_path } \
|
||||
.select { |path| is_leaf.call(path) } \
|
||||
|
|
@ -326,11 +330,12 @@ class FPM::Package
|
|||
template_path = File.join(template_dir, path)
|
||||
template_code = File.read(template_path)
|
||||
logger.info("Reading template", :path => template_path)
|
||||
erb = ERB.new(template_code, nil, "-")
|
||||
erb = erbnew(template_code)
|
||||
erb.filename = template_path
|
||||
return erb
|
||||
end # def template
|
||||
|
||||
|
||||
#######################################
|
||||
# The following methods are provided to
|
||||
# easily override particular substitut-
|
||||
|
|
@ -491,13 +496,29 @@ class FPM::Package
|
|||
return scripts.include?(name)
|
||||
end # def script?
|
||||
|
||||
# write all scripts to .scripts (tar and dir)
|
||||
def write_scripts
|
||||
scripts_path = File.join(staging_path, ".scripts")
|
||||
target_scripts = [:before_install, :after_install, :before_remove, :after_remove]
|
||||
if target_scripts.any? {|name| script?(name)}
|
||||
::Dir.mkdir(scripts_path)
|
||||
target_scripts.each do |name|
|
||||
next unless script?(name)
|
||||
out = File.join(scripts_path, name.to_s)
|
||||
logger.debug('Writing script', :source => name, :target => out)
|
||||
File.write(out, script(name))
|
||||
File.chmod(0755, out)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Get the contents of the script by a given name.
|
||||
#
|
||||
# If template_scripts? is set in attributes (often by the --template-scripts
|
||||
# flag), then apply it as an ERB template.
|
||||
def script(script_name)
|
||||
if attributes[:template_scripts?]
|
||||
erb = ERB.new(scripts[script_name], nil, "-")
|
||||
erb = erbnew(scripts[script_name])
|
||||
# TODO(sissel): find the original file name for the file.
|
||||
erb.filename = "script(#{script_name})"
|
||||
return erb.result(binding)
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ require "fpm/namespace"
|
|||
require "fpm/package"
|
||||
require "fpm/errors"
|
||||
require "fpm/util"
|
||||
require "backports"
|
||||
require "backports/latest"
|
||||
require "fileutils"
|
||||
require "digest"
|
||||
require 'digest/sha1'
|
||||
|
||||
# Support for debian packages (.deb files)
|
||||
# Support for Alpine packages (.apk files)
|
||||
#
|
||||
# This class supports both input and output of packages.
|
||||
class FPM::Package::APK< FPM::Package
|
||||
|
|
@ -144,9 +144,9 @@ class FPM::Package::APK< FPM::Package
|
|||
scripts = {}
|
||||
|
||||
scripts = register_script('post-install', :after_install, scripts)
|
||||
scripts = register_script('post-install', :before_install, scripts)
|
||||
scripts = register_script('post-install', :before_upgrade, scripts)
|
||||
scripts = register_script('post-install', :after_upgrade, scripts)
|
||||
scripts = register_script('pre-install', :before_install, scripts)
|
||||
scripts = register_script('pre-upgrade', :before_upgrade, scripts)
|
||||
scripts = register_script('post-upgrade', :after_upgrade, scripts)
|
||||
scripts = register_script('pre-deinstall', :before_remove, scripts)
|
||||
scripts = register_script('post-deinstall', :after_remove, scripts)
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ class FPM::Package::APK< FPM::Package
|
|||
record_length = determine_record_length(record_length)
|
||||
|
||||
until(data.length == record_length)
|
||||
data += file.read(TAR_CHUNK_SIZE)
|
||||
data << file.read(TAR_CHUNK_SIZE)
|
||||
end
|
||||
|
||||
# Clear ownership fields
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ require "fpm/package"
|
|||
require "fpm/util"
|
||||
require "fileutils"
|
||||
require "find"
|
||||
require "pathname"
|
||||
|
||||
class FPM::Package::CPAN < FPM::Package
|
||||
# Flags '--foo' will be accessable as attributes[:npm_foo]
|
||||
|
|
@ -24,6 +25,9 @@ class FPM::Package::CPAN < FPM::Package
|
|||
option "--test", :flag,
|
||||
"Run the tests before packaging?", :default => true
|
||||
|
||||
option "--verbose", :flag,
|
||||
"Produce verbose output from cpanm?", :default => false
|
||||
|
||||
option "--perl-lib-path", "PERL_LIB_PATH",
|
||||
"Path of target Perl Libraries"
|
||||
|
||||
|
|
@ -48,6 +52,7 @@ class FPM::Package::CPAN < FPM::Package
|
|||
|
||||
if File.exist?(package)
|
||||
moduledir = package
|
||||
result = {}
|
||||
else
|
||||
result = search(package)
|
||||
tarball = download(result, version)
|
||||
|
|
@ -97,10 +102,17 @@ class FPM::Package::CPAN < FPM::Package
|
|||
self.name = fix_name(metadata["name"])
|
||||
end
|
||||
|
||||
unless metadata["module"].nil?
|
||||
metadata["module"].each do |m|
|
||||
self.provides << cap_name(m["name"]) + " = #{self.version}"
|
||||
end
|
||||
end
|
||||
|
||||
# author is not always set or it may be a string instead of an array
|
||||
self.vendor = case metadata["author"]
|
||||
when String; metadata["author"]
|
||||
when Array; metadata["author"].join(", ")
|
||||
when NilClass; "No Vendor Or Author Provided"
|
||||
else
|
||||
raise FPM::InvalidPackageConfiguration, "Unexpected CPAN 'author' field type: #{metadata["author"].class}. This is a bug."
|
||||
end if metadata.include?("author")
|
||||
|
|
@ -129,24 +141,36 @@ class FPM::Package::CPAN < FPM::Package
|
|||
cpanm_flags += ["--mirror", "#{attributes[:cpan_mirror]}"] if !attributes[:cpan_mirror].nil?
|
||||
cpanm_flags += ["--mirror-only"] if attributes[:cpan_mirror_only?] && !attributes[:cpan_mirror].nil?
|
||||
cpanm_flags += ["--force"] if attributes[:cpan_cpanm_force?]
|
||||
cpanm_flags += ["--verbose"] if attributes[:cpan_verbose?]
|
||||
|
||||
safesystem(attributes[:cpan_cpanm_bin], *cpanm_flags)
|
||||
|
||||
if !attributes[:no_auto_depends?]
|
||||
unless metadata["requires"].nil?
|
||||
metadata["requires"].each do |dep_name, version|
|
||||
found_dependencies = {}
|
||||
if metadata["requires"]
|
||||
found_dependencies.merge!(metadata["requires"])
|
||||
end
|
||||
if metadata["prereqs"]
|
||||
if metadata["prereqs"]["runtime"]
|
||||
if metadata["prereqs"]["runtime"]["requires"]
|
||||
found_dependencies.merge!(metadata["prereqs"]["runtime"]["requires"])
|
||||
end
|
||||
end
|
||||
end
|
||||
unless found_dependencies.empty?
|
||||
found_dependencies.each do |dep_name, version|
|
||||
# Special case for representing perl core as a version.
|
||||
if dep_name == "perl"
|
||||
m = version.to_s.match(/^(\d)\.(\d{3})(\d{3})$/)
|
||||
if m
|
||||
version = m[1] + '.' + m[2].sub(/^0*/, '') + '.' + m[3].sub(/^0*/, '')
|
||||
end
|
||||
self.dependencies << "#{dep_name} >= #{version}"
|
||||
next
|
||||
end
|
||||
dep = search(dep_name)
|
||||
|
||||
if dep.include?("distribution")
|
||||
name = fix_name(dep["distribution"])
|
||||
else
|
||||
name = fix_name(dep_name)
|
||||
end
|
||||
name = cap_name(dep_name)
|
||||
|
||||
if version.to_s == "0"
|
||||
# Assume 'Foo = 0' means any version?
|
||||
|
|
@ -154,12 +178,14 @@ class FPM::Package::CPAN < FPM::Package
|
|||
else
|
||||
# The 'version' string can be something complex like:
|
||||
# ">= 0, != 1.0, != 1.2"
|
||||
# If it is not specified explicitly, require the given
|
||||
# version or newer, as that is all CPAN itself enforces
|
||||
if version.is_a?(String)
|
||||
version.split(/\s*,\s*/).each do |v|
|
||||
if v =~ /\s*[><=]/
|
||||
self.dependencies << "#{name} #{v}"
|
||||
else
|
||||
self.dependencies << "#{name} = #{v}"
|
||||
self.dependencies << "#{name} >= #{v}"
|
||||
end
|
||||
end
|
||||
else
|
||||
|
|
@ -220,11 +246,7 @@ class FPM::Package::CPAN < FPM::Package
|
|||
# Empty install_base to avoid local::lib being used.
|
||||
"INSTALL_BASE=")
|
||||
end
|
||||
if attributes[:cpan_test?]
|
||||
make = [ "env", "PERL5LIB=#{build_path("cpan/lib/perl5")}", "make" ]
|
||||
else
|
||||
make = [ "make" ]
|
||||
end
|
||||
make = [ "env", "PERL5LIB=#{build_path("cpan/lib/perl5")}", "make" ]
|
||||
safesystem(*make)
|
||||
safesystem(*(make + ["test"])) if attributes[:cpan_test?]
|
||||
safesystem(*(make + ["DESTDIR=#{staging_path}", "install"]))
|
||||
|
|
@ -246,6 +268,21 @@ class FPM::Package::CPAN < FPM::Package
|
|||
:path => path.gsub(staging_path, ""))
|
||||
File.unlink(path)
|
||||
end
|
||||
|
||||
# Remove useless .packlist files and their empty parent folders
|
||||
# https://github.com/jordansissel/fpm/issues/1179
|
||||
::Dir.glob(File.join(staging_path, glob_prefix, "**/.packlist")).each do |path|
|
||||
logger.debug("Removing useless file.",
|
||||
:path => path.gsub(staging_path, ""))
|
||||
File.unlink(path)
|
||||
Pathname.new(path).parent.ascend do |parent|
|
||||
if ::Dir.entries(parent).sort == ['.', '..'].sort
|
||||
FileUtils.rmdir parent
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
@ -268,7 +305,7 @@ class FPM::Package::CPAN < FPM::Package
|
|||
directory = build_path("module")
|
||||
::Dir.mkdir(directory)
|
||||
args = [ "-C", directory, "-zxf", tarball,
|
||||
"--strip-components", "1" ]
|
||||
%q{--transform=s,[./]*[^/]*/,,} ]
|
||||
safesystem("tar", *args)
|
||||
return directory
|
||||
end
|
||||
|
|
@ -281,38 +318,35 @@ class FPM::Package::CPAN < FPM::Package
|
|||
:distribution => distribution,
|
||||
:version => cpan_version)
|
||||
|
||||
# default to latest versionunless we specify one
|
||||
# default to latest version unless we specify one
|
||||
if cpan_version.nil?
|
||||
self.version = metadata["version"]
|
||||
self.version = "#{metadata["version"]}"
|
||||
else
|
||||
if metadata["version"] =~ /^v\d/
|
||||
self.version = "v#{cpan_version}"
|
||||
else
|
||||
self.version = cpan_version
|
||||
end
|
||||
self.version = "#{cpan_version}"
|
||||
end
|
||||
|
||||
metacpan_release_url = "http://api.metacpan.org/v0/release/#{author}/#{distribution}-#{self.version}"
|
||||
# Search metacpan to get download URL for this version of the module
|
||||
metacpan_search_url = "https://fastapi.metacpan.org/v1/release/_search"
|
||||
metacpan_search_query = '{"fields":["download_url"],"filter":{"term":{"name":"' + "#{distribution}-#{self.version}" + '"}}}'
|
||||
begin
|
||||
release_response = httpfetch(metacpan_release_url)
|
||||
search_response = httppost(metacpan_search_url,metacpan_search_query)
|
||||
rescue Net::HTTPServerException => e
|
||||
logger.error("metacpan release query failed.", :error => e.message,
|
||||
:url => metacpan_release_url)
|
||||
:url => metacpan_search_url)
|
||||
raise FPM::InvalidPackageConfiguration, "metacpan release query failed"
|
||||
end
|
||||
|
||||
data = release_response.body
|
||||
data = search_response.body
|
||||
release_metadata = JSON.parse(data)
|
||||
archive = release_metadata["archive"]
|
||||
|
||||
# should probably be basepathed from the url
|
||||
tarball = File.basename(archive)
|
||||
download_url = release_metadata['hits']['hits'][0]['fields']['download_url']
|
||||
download_path = URI.parse(download_url).path
|
||||
tarball = File.basename(download_path)
|
||||
|
||||
url_base = "http://www.cpan.org/"
|
||||
url_base = "#{attributes[:cpan_mirror]}" if !attributes[:cpan_mirror].nil?
|
||||
|
||||
#url = "http://www.cpan.org/CPAN/authors/id/#{author[0,1]}/#{author[0,2]}/#{author}/#{tarball}"
|
||||
url = "#{url_base}/authors/id/#{author[0,1]}/#{author[0,2]}/#{author}/#{archive}"
|
||||
url = "#{url_base}#{download_path}"
|
||||
logger.debug("Fetching perl module", :url => url)
|
||||
|
||||
begin
|
||||
|
|
@ -333,7 +367,7 @@ class FPM::Package::CPAN < FPM::Package
|
|||
|
||||
def search(package)
|
||||
logger.info("Asking metacpan about a module", :module => package)
|
||||
metacpan_url = "http://api.metacpan.org/v0/module/" + package
|
||||
metacpan_url = "https://fastapi.metacpan.org/v1/module/" + package
|
||||
begin
|
||||
response = httpfetch(metacpan_url)
|
||||
rescue Net::HTTPServerException => e
|
||||
|
|
@ -351,6 +385,10 @@ class FPM::Package::CPAN < FPM::Package
|
|||
return metadata
|
||||
end # def metadata
|
||||
|
||||
def cap_name(name)
|
||||
return "perl(" + name.gsub("-", "::") + ")"
|
||||
end # def cap_name
|
||||
|
||||
def fix_name(name)
|
||||
case name
|
||||
when "perl"; return "perl"
|
||||
|
|
@ -366,6 +404,7 @@ class FPM::Package::CPAN < FPM::Package
|
|||
else
|
||||
http = Net::HTTP.new(uri.host, uri.port)
|
||||
end
|
||||
http.use_ssl = uri.scheme == 'https'
|
||||
response = http.request(Net::HTTP::Get.new(uri.request_uri))
|
||||
case response
|
||||
when Net::HTTPSuccess; return response
|
||||
|
|
@ -374,5 +413,22 @@ class FPM::Package::CPAN < FPM::Package
|
|||
end
|
||||
end
|
||||
|
||||
def httppost(url, body)
|
||||
uri = URI.parse(url)
|
||||
if ENV['http_proxy']
|
||||
proxy = URI.parse(ENV['http_proxy'])
|
||||
http = Net::HTTP.Proxy(proxy.host,proxy.port,proxy.user,proxy.password).new(uri.host, uri.port)
|
||||
else
|
||||
http = Net::HTTP.new(uri.host, uri.port)
|
||||
end
|
||||
http.use_ssl = uri.scheme == 'https'
|
||||
response = http.post(uri.request_uri, body)
|
||||
case response
|
||||
when Net::HTTPSuccess; return response
|
||||
when Net::HTTPRedirection; return httppost(response["location"])
|
||||
else; response.error!
|
||||
end
|
||||
end
|
||||
|
||||
public(:input)
|
||||
end # class FPM::Package::NPM
|
||||
|
|
|
|||
|
|
@ -3,9 +3,14 @@ require "fpm/namespace"
|
|||
require "fpm/package"
|
||||
require "fpm/errors"
|
||||
require "fpm/util"
|
||||
require "backports"
|
||||
require "backports/latest"
|
||||
require "fileutils"
|
||||
require "digest"
|
||||
require "zlib"
|
||||
|
||||
# For handling conversion
|
||||
require "fpm/package/cpan"
|
||||
require "fpm/package/gem"
|
||||
|
||||
# Support for debian packages (.deb files)
|
||||
#
|
||||
|
|
@ -18,10 +23,35 @@ class FPM::Package::Deb < FPM::Package
|
|||
:after_install => "postinst",
|
||||
:before_remove => "prerm",
|
||||
:after_remove => "postrm",
|
||||
:after_purge => "postrm",
|
||||
} unless defined?(SCRIPT_MAP)
|
||||
|
||||
# The list of supported compression types. Default is gz (gzip)
|
||||
COMPRESSION_TYPES = [ "gz", "bzip2", "xz" ]
|
||||
COMPRESSION_TYPES = [ "gz", "bzip2", "xz", "zst", "none" ]
|
||||
|
||||
# https://www.debian.org/doc/debian-policy/ch-relationships.html#syntax-of-relationship-fields
|
||||
# Example value with version relationship: libc6 (>= 2.2.1)
|
||||
# Example value: libc6
|
||||
|
||||
# Package name docs here: https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-source
|
||||
# Package names (both source and binary, see Package) must consist only of lower case letters (a-z),
|
||||
# digits (0-9), plus (+) and minus (-) signs, and periods (.).
|
||||
# They must be at least two characters long and must start with an alphanumeric character.
|
||||
|
||||
# Version string docs here: https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-version
|
||||
# The format is: [epoch:]upstream_version[-debian_revision].
|
||||
# epoch - This is a single (generally small) unsigned integer
|
||||
# upstream_version - must contain only alphanumerics 6 and the characters . + - ~
|
||||
# debian_revision - only alphanumerics and the characters + . ~
|
||||
VERSION_FIELD_PATTERN = /
|
||||
(?:(?:[0-9]+):)? # The epoch, an unsigned int
|
||||
(?:[A-Za-z0-9+~.-]+) # upstream version, probably should not contain dashes?
|
||||
(?:-[A-Za-z0-9+~.]+)? # debian_revision
|
||||
/x # Version field pattern
|
||||
RELATIONSHIP_FIELD_PATTERN = /^
|
||||
(?<name>[A-z0-9][A-z0-9_.-]+)
|
||||
(?:\s*\((?<relation>[<>=]+)\s(?<version>#{VERSION_FIELD_PATTERN})\))?
|
||||
$/x # Relationship field pattern
|
||||
|
||||
option "--ignore-iteration-in-dependencies", :flag,
|
||||
"For '=' (equal) dependencies, allow iterations on the specified " \
|
||||
|
|
@ -43,12 +73,27 @@ class FPM::Package::Deb < FPM::Package
|
|||
option "--compression", "COMPRESSION", "The compression type to use, must " \
|
||||
"be one of #{COMPRESSION_TYPES.join(", ")}.", :default => "gz" do |value|
|
||||
if !COMPRESSION_TYPES.include?(value)
|
||||
raise ArgumentError, "deb compression value of '#{value}' is invalid. " \
|
||||
raise FPM::Package::InvalidArgument, "deb compression value of '#{value}' is invalid. " \
|
||||
"Must be one of #{COMPRESSION_TYPES.join(", ")}"
|
||||
end
|
||||
value
|
||||
end
|
||||
|
||||
option "--compression-level", "[0-9]", "Select a compression level. 0 is none or minimal. 9 is max compression.",
|
||||
# Specify which compression level to use on the compressor backend, when building a package
|
||||
:default => nil do |value|
|
||||
valint = value.to_i
|
||||
# if self.attributes[:deb_compression].nil?
|
||||
# raise "Can't specify a compression level with compression disabled"
|
||||
# end
|
||||
unless value =~ /^\d$/ && valint >= 0 && valint <= 9
|
||||
raise "Invalid compression level '#{value}'. Valid values are integers between 0 and 9 inclusive."
|
||||
end
|
||||
valint
|
||||
end
|
||||
|
||||
option "--dist", "DIST-TAG", "Set the deb distribution.", :default => "unstable"
|
||||
|
||||
# Take care about the case when we want custom control file but still use fpm ...
|
||||
option "--custom-control", "FILEPATH",
|
||||
"Custom version of the Debian control file." do |control|
|
||||
|
|
@ -74,7 +119,7 @@ class FPM::Package::Deb < FPM::Package
|
|||
end
|
||||
|
||||
option "--priority", "PRIORITY",
|
||||
"The debian package 'priority' value.", :default => "extra"
|
||||
"The debian package 'priority' value.", :default => "optional"
|
||||
|
||||
option "--use-file-permissions", :flag,
|
||||
"Use existing file permissions when defining ownership and modes"
|
||||
|
|
@ -87,6 +132,10 @@ class FPM::Package::Deb < FPM::Package
|
|||
File.expand_path(file)
|
||||
end
|
||||
|
||||
option "--generate-changes", :flag,
|
||||
"Generate PACKAGENAME.changes file.",
|
||||
:default => false
|
||||
|
||||
option "--upstream-changelog", "FILEPATH", "Add FILEPATH as upstream changelog" do |file|
|
||||
File.expand_path(file)
|
||||
end
|
||||
|
|
@ -121,6 +170,18 @@ class FPM::Package::Deb < FPM::Package
|
|||
next @activated_triggers
|
||||
end
|
||||
|
||||
option "--interest-noawait", "EVENT", "Package is interested in EVENT trigger without awaiting" do |event|
|
||||
@interested_noawait_triggers ||= []
|
||||
@interested_noawait_triggers << event
|
||||
next @interested_noawait_triggers
|
||||
end
|
||||
|
||||
option "--activate-noawait", "EVENT", "Package activates EVENT trigger" do |event|
|
||||
@activated_noawait_triggers ||= []
|
||||
@activated_noawait_triggers << event
|
||||
next @activated_noawait_triggers
|
||||
end
|
||||
|
||||
option "--field", "'FIELD: VALUE'", "Add custom field to the control file" do |fv|
|
||||
@custom_fields ||= {}
|
||||
field, value = fv.split(/: */, 2)
|
||||
|
|
@ -158,15 +219,35 @@ class FPM::Package::Deb < FPM::Package
|
|||
end
|
||||
|
||||
option "--systemd", "FILEPATH", "Add FILEPATH as a systemd script",
|
||||
:multivalued => true do |file|
|
||||
:multivalued => true do |file|
|
||||
next File.expand_path(file)
|
||||
end
|
||||
|
||||
option "--systemd-path", "FILEPATH", "Relative path to the systemd service directory",
|
||||
:default => "lib/systemd/system" do |file|
|
||||
next file.gsub(/^\/*/, '')
|
||||
end
|
||||
|
||||
option "--systemd-enable", :flag , "Enable service on install or upgrade", :default => false
|
||||
|
||||
option "--systemd-auto-start", :flag , "Start service after install or upgrade", :default => false
|
||||
|
||||
option "--systemd-restart-after-upgrade", :flag , "Restart service after upgrade", :default => true
|
||||
|
||||
option "--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)" do |val|
|
||||
File.expand_path(val) # Get the full path to the script
|
||||
end # --after-purge
|
||||
|
||||
option "--maintainerscripts-force-errorchecks", :flag ,
|
||||
"Activate errexit shell option according to lintian. " \
|
||||
"https://lintian.debian.org/tags/maintainer-script-ignores-errors.html",
|
||||
:default => false
|
||||
|
||||
def initialize(*args)
|
||||
super(*args)
|
||||
attributes[:deb_priority] = "extra"
|
||||
attributes[:deb_priority] = "optional"
|
||||
end # def initialize
|
||||
|
||||
private
|
||||
|
|
@ -193,9 +274,15 @@ class FPM::Package::Deb < FPM::Package
|
|||
when "x86_64"
|
||||
# Debian calls x86_64 "amd64"
|
||||
@architecture = "amd64"
|
||||
when "aarch64"
|
||||
# Debian calls aarch64 "arm64"
|
||||
@architecture = "arm64"
|
||||
when "noarch"
|
||||
# Debian calls noarch "all"
|
||||
@architecture = "all"
|
||||
when "ppc64le"
|
||||
# Debian calls ppc64le "ppc64el"
|
||||
@architecture = "ppc64el"
|
||||
end
|
||||
return @architecture
|
||||
end # def architecture
|
||||
|
|
@ -234,16 +321,56 @@ class FPM::Package::Deb < FPM::Package
|
|||
return (attributes[:prefix] or "/")
|
||||
end # def prefix
|
||||
|
||||
def version
|
||||
if @version.kind_of?(String)
|
||||
if @version.start_with?("v") && @version.gsub(/^v/, "") =~ /^#{VERSION_FIELD_PATTERN}$/
|
||||
logger.warn("Debian 'Version' field needs to start with a digit. I was provided '#{@version}' which seems like it just has a 'v' prefix to an otherwise-valid Debian version, I'll remove the 'v' for you.")
|
||||
@version = @version.gsub(/^v/, "")
|
||||
end
|
||||
|
||||
if @version !~ /^#{VERSION_FIELD_PATTERN}$/
|
||||
raise FPM::InvalidPackageConfiguration, "The version looks invalid for Debian packages. Debian version field must contain only alphanumerics and . (period), + (plus), - (hyphen) or ~ (tilde). I have '#{@version}' which which isn't valid."
|
||||
end
|
||||
end
|
||||
|
||||
return @version
|
||||
end
|
||||
|
||||
def input(input_path)
|
||||
extract_info(input_path)
|
||||
extract_files(input_path)
|
||||
end # def input
|
||||
|
||||
def extract_info(package)
|
||||
compression = `#{ar_cmd[0]} t #{package}`.split("\n").grep(/control.tar/).first.split(".").last
|
||||
case compression
|
||||
when "gz"
|
||||
controltar = "control.tar.gz"
|
||||
compression = "-z"
|
||||
when "bzip2","bz2"
|
||||
controltar = "control.tar.bz2"
|
||||
compression = "-j"
|
||||
when "xz"
|
||||
controltar = "control.tar.xz"
|
||||
compression = "-J"
|
||||
when "zst"
|
||||
controltar = "control.tar.zst"
|
||||
compression = "--use-compress-program 'zstd -d'"
|
||||
when 'tar'
|
||||
controltar = "control.tar"
|
||||
compression = ""
|
||||
when nil
|
||||
raise FPM::InvalidPackageConfiguration, "Missing control.tar in deb source package #{package}"
|
||||
else
|
||||
raise FPM::InvalidPackageConfiguration,
|
||||
"Unknown compression type '#{compression}' for control.tar in deb source package #{package}"
|
||||
end
|
||||
|
||||
build_path("control").tap do |path|
|
||||
FileUtils.mkdir(path) if !File.directory?(path)
|
||||
# unpack the control.tar.{,gz,bz2,xz,zst} from the deb package into staging_path
|
||||
# Unpack the control tarball
|
||||
safesystem("ar p #{package} control.tar.gz | tar -zxf - -C #{path}")
|
||||
safesystem(ar_cmd[0] + " p #{package} #{controltar} | tar #{compression} -xf - -C #{path}")
|
||||
|
||||
control = File.read(File.join(path, "control"))
|
||||
|
||||
|
|
@ -261,7 +388,7 @@ class FPM::Package::Deb < FPM::Package
|
|||
version_re = /^(?:([0-9]+):)?(.+?)(?:-(.*))?$/
|
||||
m = version_re.match(parse.call("Version"))
|
||||
if !m
|
||||
raise "Unsupported version string '#{parse.call("Version")}'"
|
||||
raise FPM::InvalidPackageConfiguration, "Unsupported version string '#{parse.call("Version")}'"
|
||||
end
|
||||
self.epoch, self.version, self.iteration = m.captures
|
||||
|
||||
|
|
@ -340,30 +467,42 @@ class FPM::Package::Deb < FPM::Package
|
|||
|
||||
def extract_files(package)
|
||||
# Find out the compression type
|
||||
compression = `ar t #{package}`.split("\n").grep(/data.tar/).first.split(".").last
|
||||
compression = `#{ar_cmd[0]} t #{package}`.split("\n").grep(/data.tar/).first.split(".").last
|
||||
case compression
|
||||
when "gz"
|
||||
datatar = "data.tar.gz"
|
||||
compression = "-z"
|
||||
when "bzip2"
|
||||
when "bzip2","bz2"
|
||||
datatar = "data.tar.bz2"
|
||||
compression = "-j"
|
||||
when "xz"
|
||||
datatar = "data.tar.xz"
|
||||
compression = "-J"
|
||||
when "zst"
|
||||
datatar = "data.tar.zst"
|
||||
compression = "--use-compress-program 'zstd -d'"
|
||||
when 'tar'
|
||||
datatar = "data.tar"
|
||||
compression = ""
|
||||
when nil
|
||||
raise FPM::InvalidPackageConfiguration, "Missing data.tar in deb source package #{package}"
|
||||
else
|
||||
raise FPM::InvalidPackageConfiguration,
|
||||
"Unknown compression type '#{self.attributes[:deb_compression]}' "
|
||||
"in deb source package #{package}"
|
||||
"Unknown compression type '#{compression}' for data.tar in deb source package #{package}"
|
||||
end
|
||||
|
||||
# unpack the data.tar.{gz,bz2,xz} from the deb package into staging_path
|
||||
safesystem("ar p #{package} #{datatar} " \
|
||||
"| tar #{compression} -xf - -C #{staging_path}")
|
||||
safesystem(ar_cmd[0] + " p #{package} #{datatar} | tar #{compression} -xf - -C #{staging_path}")
|
||||
end # def extract_files
|
||||
|
||||
def output(output_path)
|
||||
self.provides = self.provides.collect { |p| fix_provides(p) }
|
||||
|
||||
self.provides.each do |provide|
|
||||
if !valid_provides_field?(provide)
|
||||
raise FPM::InvalidPackageConfiguration, "Found invalid Provides field values (#{provide.inspect}). This is not valid in a Debian package."
|
||||
end
|
||||
end
|
||||
output_check(output_path)
|
||||
# Abort if the target path already exists.
|
||||
|
||||
|
|
@ -387,49 +526,60 @@ class FPM::Package::Deb < FPM::Package
|
|||
end
|
||||
end
|
||||
|
||||
if attributes[:source_date_epoch].nil? and not attributes[:source_date_epoch_default].nil?
|
||||
attributes[:source_date_epoch] = attributes[:source_date_epoch_default]
|
||||
end
|
||||
if attributes[:source_date_epoch] == "0"
|
||||
logger.error("Alas, ruby's Zlib::GzipWriter does not support setting an mtime of zero. Aborting.")
|
||||
raise FPM::InvalidPackageConfiguration, "#{name}: source_date_epoch of 0 not supported."
|
||||
end
|
||||
if not attributes[:source_date_epoch].nil? and not ar_cmd_deterministic?
|
||||
logger.error("Alas, could not find an ar that can handle -D option. Try installing recent gnu binutils. Aborting.")
|
||||
raise FPM::InvalidPackageConfiguration, "#{name}: ar is insufficient to support source_date_epoch."
|
||||
end
|
||||
if not attributes[:source_date_epoch].nil? and not tar_cmd_supports_sort_names_and_set_mtime?
|
||||
logger.error("Alas, could not find a tar that can set mtime and sort. Try installing recent gnu tar. Aborting.")
|
||||
raise FPM::InvalidPackageConfiguration, "#{name}: tar is insufficient to support source_date_epoch."
|
||||
end
|
||||
|
||||
attributes[:deb_systemd] = []
|
||||
attributes.fetch(:deb_systemd_list, []).each do |systemd|
|
||||
name = File.basename(systemd, ".service")
|
||||
dest_systemd = staging_path("lib/systemd/system/#{name}.service")
|
||||
name = File.basename(systemd)
|
||||
extname = File.extname(name)
|
||||
|
||||
name_with_extension = if extname.empty?
|
||||
"#{name}.service"
|
||||
elsif [".service", ".timer"].include?(extname)
|
||||
name
|
||||
else
|
||||
raise FPM::InvalidPackageConfiguration, "Invalid systemd unit file extension: #{extname}. Expected .service or .timer, or no extension."
|
||||
end
|
||||
|
||||
dest_systemd = staging_path(File.join(attributes[:deb_systemd_path], "#{name_with_extension}"))
|
||||
mkdir_p(File.dirname(dest_systemd))
|
||||
FileUtils.cp(systemd, dest_systemd)
|
||||
File.chmod(0644, dest_systemd)
|
||||
|
||||
# set the attribute with the systemd service name
|
||||
attributes[:deb_systemd] = name
|
||||
attributes[:deb_systemd] << name_with_extension
|
||||
end
|
||||
|
||||
if script?(:before_upgrade) or script?(:after_upgrade) or attributes[:deb_systemd]
|
||||
if script?(:before_upgrade) or script?(:after_upgrade) or attributes[:deb_systemd].any?
|
||||
puts "Adding action files"
|
||||
if script?(:before_install) or script?(:before_upgrade)
|
||||
scripts[:before_install] = template("deb/preinst_upgrade.sh.erb").result(binding)
|
||||
end
|
||||
if script?(:before_remove) or attributes[:deb_systemd]
|
||||
if script?(:before_remove) or not attributes[:deb_systemd].empty?
|
||||
scripts[:before_remove] = template("deb/prerm_upgrade.sh.erb").result(binding)
|
||||
end
|
||||
if script?(:after_install) or script?(:after_upgrade) or attributes[:deb_systemd]
|
||||
if script?(:after_install) or script?(:after_upgrade) or attributes[:deb_systemd].any?
|
||||
scripts[:after_install] = template("deb/postinst_upgrade.sh.erb").result(binding)
|
||||
end
|
||||
if script?(:after_remove)
|
||||
scripts[:after_remove] = template("deb/postrm_upgrade.sh.erb").result(binding)
|
||||
end
|
||||
end
|
||||
|
||||
write_control_tarball
|
||||
|
||||
# Tar up the staging_path into data.tar.{compression type}
|
||||
case self.attributes[:deb_compression]
|
||||
when "gz", nil
|
||||
datatar = build_path("data.tar.gz")
|
||||
compression = "-z"
|
||||
when "bzip2"
|
||||
datatar = build_path("data.tar.bz2")
|
||||
compression = "-j"
|
||||
when "xz"
|
||||
datatar = build_path("data.tar.xz")
|
||||
compression = "-J"
|
||||
else
|
||||
raise FPM::InvalidPackageConfiguration,
|
||||
"Unknown compression type '#{self.attributes[:deb_compression]}'"
|
||||
if script?(:after_purge)
|
||||
scripts[:after_purge] = template("deb/postrm_upgrade.sh.erb").result(binding)
|
||||
end
|
||||
end
|
||||
|
||||
# There are two changelogs that may appear:
|
||||
|
|
@ -442,6 +592,9 @@ class FPM::Package::Deb < FPM::Package
|
|||
mkdir_p(File.dirname(dest_changelog))
|
||||
File.new(dest_changelog, "wb", 0644).tap do |changelog|
|
||||
Zlib::GzipWriter.new(changelog, Zlib::BEST_COMPRESSION).tap do |changelog_gz|
|
||||
if not attributes[:source_date_epoch].nil?
|
||||
changelog_gz.mtime = attributes[:source_date_epoch].to_i
|
||||
end
|
||||
if attributes[:deb_changelog]
|
||||
logger.info("Writing user-specified changelog", :source => attributes[:deb_changelog])
|
||||
File.new(attributes[:deb_changelog]).tap do |fd|
|
||||
|
|
@ -461,6 +614,9 @@ class FPM::Package::Deb < FPM::Package
|
|||
if attributes[:deb_upstream_changelog]
|
||||
File.new(dest_upstream_changelog, "wb", 0644).tap do |changelog|
|
||||
Zlib::GzipWriter.new(changelog, Zlib::BEST_COMPRESSION).tap do |changelog_gz|
|
||||
if not attributes[:source_date_epoch].nil?
|
||||
changelog_gz.mtime = attributes[:source_date_epoch].to_i
|
||||
end
|
||||
logger.info("Writing user-specified upstream changelog", :source => attributes[:deb_upstream_changelog])
|
||||
File.new(attributes[:deb_upstream_changelog]).tap do |fd|
|
||||
chunk = nil
|
||||
|
|
@ -471,7 +627,7 @@ class FPM::Package::Deb < FPM::Package
|
|||
end # No need to close, GzipWriter#close will close it.
|
||||
end
|
||||
|
||||
if File.exists?(dest_changelog) and not File.exists?(dest_upstream_changelog)
|
||||
if File.exist?(dest_changelog) and not File.exist?(dest_upstream_changelog)
|
||||
# see https://www.debian.org/doc/debian-policy/ch-docs.html#s-changelogs
|
||||
File.rename(dest_changelog, dest_upstream_changelog)
|
||||
end
|
||||
|
|
@ -494,6 +650,7 @@ class FPM::Package::Deb < FPM::Package
|
|||
|
||||
attributes.fetch(:deb_upstart_list, []).each do |upstart|
|
||||
name = File.basename(upstart, ".upstart")
|
||||
dest_init = staging_path("etc/init.d/#{name}")
|
||||
name = "#{name}.conf" if !(name =~ /\.conf$/)
|
||||
dest_upstart = staging_path("etc/init/#{name}")
|
||||
mkdir_p(File.dirname(dest_upstart))
|
||||
|
|
@ -501,14 +658,17 @@ class FPM::Package::Deb < FPM::Package
|
|||
File.chmod(0644, dest_upstart)
|
||||
|
||||
# Install an init.d shim that calls upstart
|
||||
dest_init = staging_path("etc/init.d/#{name}")
|
||||
mkdir_p(File.dirname(dest_init))
|
||||
FileUtils.ln_s("/lib/init/upstart-job", dest_init)
|
||||
end
|
||||
|
||||
attributes.fetch(:deb_systemd_list, []).each do |systemd|
|
||||
name = File.basename(systemd, ".service")
|
||||
dest_systemd = staging_path("lib/systemd/system/#{name}.service")
|
||||
name = File.basename(systemd)
|
||||
extname = File.extname(systemd)
|
||||
name_with_extension = extname.empty? ? "#{name}.service" : name
|
||||
|
||||
dest_systemd = staging_path(File.join(attributes[:deb_systemd_path], "#{name_with_extension}"))
|
||||
|
||||
mkdir_p(File.dirname(dest_systemd))
|
||||
FileUtils.cp(systemd, dest_systemd)
|
||||
File.chmod(0644, dest_systemd)
|
||||
|
|
@ -520,41 +680,132 @@ class FPM::Package::Deb < FPM::Package
|
|||
case self.attributes[:deb_compression]
|
||||
when "gz", nil
|
||||
datatar = build_path("data.tar.gz")
|
||||
compression = "-z"
|
||||
controltar = build_path("control.tar.gz")
|
||||
compression_flags = ["-z"]
|
||||
# gnu tar obeys GZIP environment variable with options for gzip; -n = forget original filename and date
|
||||
compressor_options = {"GZIP" => "-#{self.attributes[:deb_compression_level] || 9}" +
|
||||
"#{'n' if tar_cmd_supports_sort_names_and_set_mtime? and not attributes[:source_date_epoch].nil?}"}
|
||||
when "bzip2"
|
||||
datatar = build_path("data.tar.bz2")
|
||||
compression = "-j"
|
||||
controltar = build_path("control.tar.gz")
|
||||
compression_flags = ["-j"]
|
||||
compressor_options = {"BZIP" => "-#{self.attributes[:deb_compression_level] || 9}"}
|
||||
when "xz"
|
||||
datatar = build_path("data.tar.xz")
|
||||
compression = "-J"
|
||||
controltar = build_path("control.tar.xz")
|
||||
compression_flags = ["-J"]
|
||||
compressor_options = {"XZ_OPT" => "-#{self.attributes[:deb_compression_level] || 3}"}
|
||||
when "zst"
|
||||
datatar = build_path("data.tar.zst")
|
||||
controltar = build_path("control.tar.zst")
|
||||
compression_flags = ["--use-compress-program", "zstd"]
|
||||
compressor_options = {"ZSTD_CLEVEL" => "-#{self.attributes[:deb_compression_level] || 3}"}
|
||||
when "none"
|
||||
datatar = build_path("data.tar")
|
||||
controltar = build_path("control.tar")
|
||||
compression_flags = []
|
||||
compressor_options = {}
|
||||
else
|
||||
raise FPM::InvalidPackageConfiguration,
|
||||
"Unknown compression type '#{self.attributes[:deb_compression]}'"
|
||||
end
|
||||
|
||||
args = [ tar_cmd, "-C", staging_path, compression ] + data_tar_flags + [ "-cf", datatar, "." ]
|
||||
args = [ tar_cmd, "-C", staging_path ] + compression_flags + data_tar_flags + [ "-cf", datatar, "." ]
|
||||
if tar_cmd_supports_sort_names_and_set_mtime? and not attributes[:source_date_epoch].nil?
|
||||
# Use gnu tar options to force deterministic file order and timestamp
|
||||
args += ["--sort=name", ("--mtime=@%s" % attributes[:source_date_epoch])]
|
||||
end
|
||||
args.unshift(compressor_options)
|
||||
safesystem(*args)
|
||||
|
||||
# pack up the .deb, which is just an 'ar' archive with 3 files
|
||||
# the 'debian-binary' file has to be first
|
||||
File.expand_path(output_path).tap do |output_path|
|
||||
::Dir.chdir(build_path) do
|
||||
safesystem("ar", "-qc", output_path, "debian-binary", "control.tar.gz", datatar)
|
||||
safesystem(*ar_cmd, output_path, "debian-binary", controltar, datatar)
|
||||
end
|
||||
end
|
||||
|
||||
# if a PACKAGENAME.changes file is to be created
|
||||
if self.attributes[:deb_generate_changes?]
|
||||
distribution = self.attributes[:deb_dist]
|
||||
|
||||
# gather information about the files to distribute
|
||||
files = [ output_path ]
|
||||
changes_files = []
|
||||
files.each do |path|
|
||||
changes_files.push({
|
||||
:name => path,
|
||||
:size => File.size?(path),
|
||||
:md5sum => Digest::MD5.file(path).hexdigest,
|
||||
:sha1sum => Digest::SHA1.file(path).hexdigest,
|
||||
:sha256sum => Digest::SHA2.file(path).hexdigest,
|
||||
})
|
||||
end
|
||||
|
||||
# write change infos to .changes file
|
||||
changes_path = File.basename(output_path, '.deb') + '.changes'
|
||||
changes_data = template("deb/deb.changes.erb").result(binding)
|
||||
File.write(changes_path, changes_data)
|
||||
logger.log("Created changes", :path => changes_path)
|
||||
end # if deb_generate_changes
|
||||
end # def output
|
||||
|
||||
def converted_from(origin)
|
||||
self.dependencies = self.dependencies.collect do |dep|
|
||||
fix_dependency(dep)
|
||||
end.flatten
|
||||
|
||||
# If an invalid depends field was found i.e. /bin.sh then fix_depends will blank it
|
||||
# Make sure we remove this blank here
|
||||
self.dependencies = self.dependencies.reject { |p| p.empty? }
|
||||
|
||||
self.provides = self.provides.collect do |provides|
|
||||
fix_provides(provides)
|
||||
end.flatten
|
||||
# If an invalid provides field was found i.e. mypackage(arch) then fix_provides will blank it
|
||||
# Make sure we remove this blank here
|
||||
self.provides = self.provides.reject { |p| p.empty? }
|
||||
|
||||
if origin == FPM::Package::CPAN
|
||||
# The fpm cpan code presents dependencies and provides fields as perl(ModuleName)
|
||||
# so we'll need to convert them to something debian supports.
|
||||
|
||||
# Replace perl(ModuleName) > 1.0 with Debian-style perl-ModuleName (> 1.0)
|
||||
perldepfix = lambda do |dep|
|
||||
m = dep.match(/perl\((?<name>[A-Za-z0-9_:]+)\)\s*(?<op>.*$)/)
|
||||
if m.nil?
|
||||
# 'dep' syntax didn't look like 'perl(Name) > 1.0'
|
||||
dep
|
||||
else
|
||||
# Also replace '::' in the perl module name with '-'
|
||||
modulename = m["name"].gsub("::", "-")
|
||||
|
||||
# Fix any upper-casing or other naming concerns Debian has about packages
|
||||
name = "#{attributes[:cpan_package_name_prefix]}-#{modulename}"
|
||||
|
||||
if m["op"].empty?
|
||||
name
|
||||
else
|
||||
# 'dep' syntax was like this (version constraint): perl(Module) > 1.0
|
||||
"#{name} (#{m["op"]})"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
rejects = [ "perl(vars)", "perl(warnings)", "perl(strict)", "perl(Config)" ]
|
||||
self.dependencies = self.dependencies.reject do |dep|
|
||||
# Reject non-module Perl dependencies like 'vars' and 'warnings'
|
||||
rejects.include?(dep)
|
||||
end.collect(&perldepfix).collect(&method(:fix_dependency))
|
||||
|
||||
# Also fix the Provides field 'perl(ModuleName) = version' to be 'perl-modulename (= version)'
|
||||
self.provides = self.provides.collect(&perldepfix).collect(&method(:fix_provides))
|
||||
|
||||
end # if origin == FPM::Packagin::CPAN
|
||||
|
||||
if origin == FPM::Package::Deb
|
||||
changelog_path = staging_path("usr/share/doc/#{name}/changelog.Debian.gz")
|
||||
if File.exists?(changelog_path)
|
||||
if File.exist?(changelog_path)
|
||||
logger.debug("Found a deb changelog file, using it.", :path => changelog_path)
|
||||
attributes[:deb_changelog] = build_path("deb_changelog")
|
||||
File.open(attributes[:deb_changelog], "w") do |deb_changelog|
|
||||
|
|
@ -568,7 +819,7 @@ class FPM::Package::Deb < FPM::Package
|
|||
|
||||
if origin == FPM::Package::Deb
|
||||
changelog_path = staging_path("usr/share/doc/#{name}/changelog.gz")
|
||||
if File.exists?(changelog_path)
|
||||
if File.exist?(changelog_path)
|
||||
logger.debug("Found an upstream changelog file, using it.", :path => changelog_path)
|
||||
attributes[:deb_upstream_changelog] = build_path("deb_upstream_changelog")
|
||||
File.open(attributes[:deb_upstream_changelog], "w") do |deb_upstream_changelog|
|
||||
|
|
@ -579,6 +830,19 @@ class FPM::Package::Deb < FPM::Package
|
|||
File.unlink(changelog_path)
|
||||
end
|
||||
end
|
||||
|
||||
if origin == FPM::Package::Gem
|
||||
# fpm's gem input will have provides as "rubygem-name = version"
|
||||
# and we need to convert this to Debian-style "rubygem-name (= version)"
|
||||
self.provides = self.provides.collect do |provides|
|
||||
m = /^(#{attributes[:gem_package_name_prefix]})-([^\s]+)\s*=\s*(.*)$/.match(provides)
|
||||
if m
|
||||
"#{m[1]}-#{m[2]} (= #{m[3]})"
|
||||
else
|
||||
provides
|
||||
end
|
||||
end
|
||||
end
|
||||
end # def converted_from
|
||||
|
||||
def debianize_op(op)
|
||||
|
|
@ -601,6 +865,18 @@ class FPM::Package::Deb < FPM::Package
|
|||
end
|
||||
end
|
||||
|
||||
if dep.start_with?("/")
|
||||
logger.warn("Blanking 'dependency' field '#{dep}' because it's invalid")
|
||||
dep = ""
|
||||
return dep
|
||||
end
|
||||
|
||||
if dep.include?("rpmlib")
|
||||
logger.warn("Blanking 'dependency' field '#{dep}' because it's invalid")
|
||||
dep = ""
|
||||
return dep
|
||||
end
|
||||
|
||||
name_re = /^[^ \(]+/
|
||||
name = dep[name_re]
|
||||
if name =~ /[A-Z]/
|
||||
|
|
@ -620,8 +896,13 @@ class FPM::Package::Deb < FPM::Package
|
|||
name, version = dep.gsub(/[()~>]/, "").split(/ +/)[0..1]
|
||||
nextversion = version.split(".").collect { |v| v.to_i }
|
||||
l = nextversion.length
|
||||
nextversion[l-2] += 1
|
||||
nextversion[l-1] = 0
|
||||
if l > 1
|
||||
nextversion[l-2] += 1
|
||||
nextversion[l-1] = 0
|
||||
else
|
||||
# Single component versions ~> 1
|
||||
nextversion[l-1] += 1
|
||||
end
|
||||
nextversion = nextversion.join(".")
|
||||
return ["#{name} (>= #{version})", "#{name} (<< #{nextversion})"]
|
||||
elsif (m = dep.match(/(\S+)\s+\(!= (.+)\)/))
|
||||
|
|
@ -648,6 +929,32 @@ class FPM::Package::Deb < FPM::Package
|
|||
end
|
||||
end # def fix_dependency
|
||||
|
||||
def valid_provides_field?(text)
|
||||
m = RELATIONSHIP_FIELD_PATTERN.match(text)
|
||||
if m.nil?
|
||||
logger.error("Invalid relationship field for debian package: #{text}")
|
||||
return false
|
||||
end
|
||||
|
||||
# Per Debian Policy manual, https://www.debian.org/doc/debian-policy/ch-relationships.html#syntax-of-relationship-fields
|
||||
# >> The relations allowed are <<, <=, =, >= and >> for strictly earlier, earlier or equal,
|
||||
# >> exactly equal, later or equal and strictly later, respectively. The exception is the
|
||||
# >> Provides field, for which only = is allowed
|
||||
if m["relation"] == "=" || m["relation"] == nil
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def valid_relationship_field?(text)
|
||||
m = RELATIONSHIP_FIELD_PATTERN.match(text)
|
||||
if m.nil?
|
||||
logger.error("Invalid relationship field for debian package: #{text}")
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
def fix_provides(provides)
|
||||
name_re = /^[^ \(]+/
|
||||
name = provides[name_re]
|
||||
|
|
@ -662,6 +969,16 @@ class FPM::Package::Deb < FPM::Package
|
|||
"debs don't like underscores")
|
||||
provides = provides.gsub("_", "-")
|
||||
end
|
||||
|
||||
if provides.include?("(") and !provides.include?("(=")
|
||||
logger.warn("Blanking 'provides' field '#{provides}' because it's invalid")
|
||||
provides = ""
|
||||
end
|
||||
|
||||
if m = provides.match(/^([A-Za-z0-9_-]+)\s*=\s*(\d+.*$)/)
|
||||
logger.warn("Replacing 'provides' entry #{provides} with syntax 'name (= version)'")
|
||||
provides = "#{m[1]} (= #{m[2]})"
|
||||
end
|
||||
return provides.rstrip
|
||||
end
|
||||
|
||||
|
|
@ -687,12 +1004,42 @@ class FPM::Package::Deb < FPM::Package
|
|||
write_triggers # write trigger config to 'triggers' file
|
||||
write_md5sums # write the md5sums file
|
||||
|
||||
# Tar up the staging_path into control.tar.{compression type}
|
||||
case self.attributes[:deb_compression]
|
||||
when "gz", "bzip2", nil
|
||||
controltar = "control.tar.gz"
|
||||
compression_flags = ["-z"]
|
||||
# gnu tar obeys GZIP environment variable with options for gzip; -n = forget original filename and date
|
||||
compressor_options = {"GZIP" => "-#{self.attributes[:deb_compression_level] || 9}" +
|
||||
"#{'n' if tar_cmd_supports_sort_names_and_set_mtime? and not attributes[:source_date_epoch].nil?}"}
|
||||
when "xz"
|
||||
controltar = "control.tar.xz"
|
||||
compression_flags = ["-J"]
|
||||
compressor_options = {"XZ_OPT" => "-#{self.attributes[:deb_compression_level] || 3}"}
|
||||
when "zst"
|
||||
controltar = "control.tar.zst"
|
||||
compression_flags = ["--use-compress-program", "zstd"]
|
||||
compressor_options = {"ZSTD_CLEVEL" => "-#{self.attributes[:deb_compression_level] || 3}"}
|
||||
when "none"
|
||||
controltar = "control.tar"
|
||||
compression_flags = []
|
||||
compressor_options = {}
|
||||
else
|
||||
raise FPM::InvalidPackageConfiguration,
|
||||
"Unknown compression type '#{self.attributes[:deb_compression]}'"
|
||||
end
|
||||
|
||||
# Make the control.tar.gz
|
||||
build_path("control.tar.gz").tap do |controltar|
|
||||
build_path(controltar).tap do |controltar|
|
||||
logger.info("Creating", :path => controltar, :from => control_path)
|
||||
|
||||
args = [ tar_cmd, "-C", control_path, "-zcf", controltar,
|
||||
args = [ tar_cmd, "-C", control_path ] + compression_flags + [ "-cf", controltar,
|
||||
"--owner=0", "--group=0", "--numeric-owner", "." ]
|
||||
if tar_cmd_supports_sort_names_and_set_mtime? and not attributes[:source_date_epoch].nil?
|
||||
# Force deterministic file order and timestamp
|
||||
args += ["--sort=name", ("--mtime=@%s" % attributes[:source_date_epoch])]
|
||||
end
|
||||
args.unshift(compressor_options)
|
||||
safesystem(*args)
|
||||
end
|
||||
|
||||
|
|
@ -774,7 +1121,7 @@ class FPM::Package::Deb < FPM::Package
|
|||
etcfiles = []
|
||||
# Add everything in /etc
|
||||
begin
|
||||
if !attributes[:deb_no_default_config_files?]
|
||||
if !attributes[:deb_no_default_config_files?] && File.exist?(staging_path("/etc"))
|
||||
logger.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")
|
||||
|
|
@ -789,11 +1136,26 @@ class FPM::Package::Deb < FPM::Package
|
|||
|
||||
# scan all conf file paths for files and add them
|
||||
config_files.each do |path|
|
||||
logger.debug("Checking if #{path} exists")
|
||||
cfe = File.exist?("#{path}")
|
||||
logger.debug("Check result #{cfe}")
|
||||
begin
|
||||
add_path(path, allconfigs)
|
||||
rescue Errno::ENOENT
|
||||
raise FPM::InvalidPackageConfiguration,
|
||||
"Error trying to use '#{path}' as a config file in the package. Does it exist?"
|
||||
if !cfe
|
||||
raise FPM::InvalidPackageConfiguration,
|
||||
"Error trying to use '#{path}' as a config file in the package. Does it exist?"
|
||||
else
|
||||
dcl = File.join(staging_path, path)
|
||||
if !File.exist?("#{dcl}")
|
||||
logger.debug("Adding config file #{path} to Staging area #{staging_path}")
|
||||
FileUtils.mkdir_p(File.dirname(dcl))
|
||||
FileUtils.cp_r path, dcl
|
||||
add_path(path, allconfigs)
|
||||
else
|
||||
logger.debug("Config file aready exists in staging area.")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -849,7 +1211,7 @@ class FPM::Package::Deb < FPM::Package
|
|||
|
||||
if attributes[:deb_templates]
|
||||
FileUtils.cp(attributes[:deb_templates], control_path("templates"))
|
||||
File.chmod(0755, control_path("templates"))
|
||||
File.chmod(0644, control_path("templates"))
|
||||
end
|
||||
end # def write_debconf
|
||||
|
||||
|
|
@ -865,7 +1227,10 @@ class FPM::Package::Deb < FPM::Package
|
|||
|
||||
def write_triggers
|
||||
lines = [['interest', :deb_interest],
|
||||
['activate', :deb_activate]].map { |label, attr|
|
||||
['activate', :deb_activate],
|
||||
['interest-noawait', :deb_interest_noawait],
|
||||
['activate-noawait', :deb_activate_noawait],
|
||||
].map { |label, attr|
|
||||
(attributes[attr] || []).map { |e| "#{label} #{e}\n" }
|
||||
}.flatten.join('')
|
||||
|
||||
|
|
@ -931,5 +1296,5 @@ class FPM::Package::Deb < FPM::Package
|
|||
return data_tar_flags
|
||||
end # def data_tar_flags
|
||||
|
||||
public(:input, :output, :architecture, :name, :prefix, :converted_from, :to_s, :data_tar_flags)
|
||||
public(:input, :output, :architecture, :name, :prefix, :version, :converted_from, :to_s, :data_tar_flags)
|
||||
end # class FPM::Target::Deb
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
require "fpm/package"
|
||||
require "fpm/util"
|
||||
require "backports"
|
||||
require "backports/latest"
|
||||
require "fileutils"
|
||||
require "find"
|
||||
require "socket"
|
||||
|
|
@ -43,7 +43,7 @@ class FPM::Package::Dir < FPM::Package
|
|||
# This mapping should work the same way 'rsync -a' does
|
||||
# Meaning 'rsync -a source dest'
|
||||
# and 'source=dest' in fpm work the same as the above rsync
|
||||
if path =~ /.=./ && !File.exists?(chdir == '.' ? path : File.join(chdir, path))
|
||||
if path =~ /.=./ && !File.exist?(chdir == '.' ? path : File.join(chdir, path))
|
||||
origin, destination = path.split("=", 2)
|
||||
|
||||
if File.directory?(origin) && origin[-1,1] == "/"
|
||||
|
|
@ -83,8 +83,8 @@ class FPM::Package::Dir < FPM::Package
|
|||
# can include license data from themselves (rpms, gems, etc),
|
||||
# but to make sure a simple dir -> rpm works without having
|
||||
# to specify a license.
|
||||
self.license = "unknown"
|
||||
self.vendor = [ENV["USER"], Socket.gethostname].join("@")
|
||||
self.license ||= "unknown"
|
||||
self.vendor ||= [ENV["USER"], Socket.gethostname].join("@")
|
||||
ensure
|
||||
# Clean up any logger context we added.
|
||||
logger.remove("method")
|
||||
|
|
@ -101,18 +101,7 @@ class FPM::Package::Dir < FPM::Package
|
|||
end
|
||||
|
||||
# Write the scripts, too.
|
||||
scripts_path = File.join(output_path, ".scripts")
|
||||
::Dir.mkdir(scripts_path)
|
||||
[:before_install, :after_install, :before_remove, :after_remove].each do |name|
|
||||
next unless script?(name)
|
||||
out = File.join(scripts_path, name.to_s)
|
||||
logger.debug("Writing script", :source => name, :target => out)
|
||||
File.write(out, script(name))
|
||||
require "pry"
|
||||
binding.pry
|
||||
File.chmod(0755, out)
|
||||
end
|
||||
|
||||
write_scripts
|
||||
ensure
|
||||
logger.remove("method")
|
||||
end # def output
|
||||
|
|
@ -147,14 +136,20 @@ class FPM::Package::Dir < FPM::Package
|
|||
|
||||
# For single file copies, permit file destinations
|
||||
fileinfo = File.lstat(source)
|
||||
if fileinfo.file? && !File.directory?(destination)
|
||||
destination_is_directory = File.directory?(destination)
|
||||
if fileinfo.file? && !destination_is_directory
|
||||
if destination[-1,1] == "/"
|
||||
copy(source, File.join(destination, source))
|
||||
else
|
||||
copy(source, destination)
|
||||
end
|
||||
elsif fileinfo.symlink?
|
||||
copy(source, File.join(destination, source))
|
||||
# Treat them same as files
|
||||
if destination[-1,1] == "/"
|
||||
copy(source, File.join(destination, source))
|
||||
else
|
||||
copy(source, destination)
|
||||
end
|
||||
else
|
||||
# Copy all files from 'path' into staging_path
|
||||
Find.find(source) do |path|
|
||||
|
|
@ -202,10 +197,6 @@ class FPM::Package::Dir < FPM::Package
|
|||
else
|
||||
# Otherwise try copying the file.
|
||||
begin
|
||||
logger.debug("Linking", :source => source, :destination => destination)
|
||||
File.link(source, destination)
|
||||
rescue Errno::ENOENT, Errno::EXDEV, Errno::EPERM
|
||||
# Hardlink attempt failed, copy it instead
|
||||
logger.debug("Copying", :source => source, :destination => destination)
|
||||
copy_entry(source, destination)
|
||||
rescue Errno::EEXIST
|
||||
|
|
|
|||
|
|
@ -1,9 +1,21 @@
|
|||
require "fpm/package"
|
||||
require "backports"
|
||||
require "backports/latest"
|
||||
|
||||
# Empty Package type. For strict/meta/virtual package creation
|
||||
|
||||
class FPM::Package::Empty < FPM::Package
|
||||
def initialize(*args)
|
||||
super(*args)
|
||||
|
||||
# Override FPM::Package's default "native" architecture value
|
||||
# This feels like the right default because an empty package has no
|
||||
# architecture-specific files, and in most cases an empty package should be
|
||||
# installable anywhere.
|
||||
#
|
||||
# https://github.com/jordansissel/fpm/issues/1846
|
||||
@architecture = "all"
|
||||
end
|
||||
|
||||
def output(output_path)
|
||||
logger.warn("Your package has gone into the void.")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
require "backports" # gem backports
|
||||
require "backports/latest" # gem backports/latest
|
||||
require "fpm/package"
|
||||
require "fpm/util"
|
||||
require "digest"
|
||||
|
|
@ -12,27 +12,15 @@ class FPM::Package::FreeBSD < FPM::Package
|
|||
:after_remove => "post-deinstall",
|
||||
} unless defined?(SCRIPT_MAP)
|
||||
|
||||
def self.default_abi
|
||||
abi_name = %x{uname -s}.chomp
|
||||
abi_version = %x{uname -r}.chomp.split(".")[0]
|
||||
abi_arch = %x{uname -m}.chomp
|
||||
|
||||
[abi_name, abi_version, abi_arch].join(":")
|
||||
end
|
||||
|
||||
option "--abi", "ABI",
|
||||
"Sets the FreeBSD abi pkg field to specify binary compatibility.",
|
||||
:default => default_abi
|
||||
|
||||
option "--origin", "ABI",
|
||||
"Sets the FreeBSD 'origin' pkg field",
|
||||
:default => "fpm/<name>"
|
||||
|
||||
option "--osversion", "VERSION",
|
||||
"Sets the FreeBSD 'version' pkg field, ie 12 or 13, use '*' for all.",
|
||||
:default => "13"
|
||||
|
||||
def output(output_path)
|
||||
# See https://github.com/jordansissel/fpm/issues/1090
|
||||
# require xz later, because this triggers a load of liblzma.so.5 that is
|
||||
# unavailable on older CentOS/RH distros.
|
||||
require "xz"
|
||||
output_check(output_path)
|
||||
|
||||
# Build the packaging metadata files.
|
||||
|
|
@ -58,7 +46,7 @@ class FPM::Package::FreeBSD < FPM::Package
|
|||
pkg_version = (iteration and (iteration.to_i > 0)) ? "#{version}-#{iteration}" : "#{version}"
|
||||
|
||||
pkgdata = {
|
||||
"abi" => attributes[:freebsd_abi],
|
||||
"arch" => architecture,
|
||||
"name" => name,
|
||||
"version" => pkg_version,
|
||||
"comment" => description,
|
||||
|
|
@ -92,24 +80,52 @@ class FPM::Package::FreeBSD < FPM::Package
|
|||
file.write(pkgdata.to_json + "\n")
|
||||
end
|
||||
|
||||
# Create the .txz package archive from the files in staging_path.
|
||||
File.open(output_path, "wb") do |file|
|
||||
XZ::StreamWriter.new(file) do |xz|
|
||||
FPM::Util::TarWriter.new(xz) do |tar|
|
||||
# The manifests must come first for pkg.
|
||||
add_path(tar, "+COMPACT_MANIFEST",
|
||||
File.join(staging_path, "+COMPACT_MANIFEST"))
|
||||
add_path(tar, "+MANIFEST",
|
||||
File.join(staging_path, "+MANIFEST"))
|
||||
|
||||
checksums.keys.each do |path|
|
||||
add_path(tar, "/" + path, File.join(staging_path, path))
|
||||
end
|
||||
end
|
||||
end
|
||||
file_list = File.new(build_path("file_list"), "w")
|
||||
files.each do |i|
|
||||
file_list.puts(i)
|
||||
end
|
||||
file_list.close
|
||||
|
||||
# Create the .txz package archive from the files in staging_path.
|
||||
# We use --files-from here to keep the tar entries from having `./` as the prefix.
|
||||
# This is done as a best effor to mimic what FreeBSD packages do, having everything at the top-level as
|
||||
# file names, like "+MANIFEST" instead of "./+MANIFEST"
|
||||
safesystem("tar", "-Jcf", output_path, "-C", staging_path, "--files-from", build_path("file_list"), "--transform", 's|^\([^+]\)|/\1|')
|
||||
end # def output
|
||||
|
||||
# Handle architecture naming conversion:
|
||||
# <osname>:<osversion>:<arch>
|
||||
def architecture
|
||||
osname = 'FreeBSD'
|
||||
|
||||
arch = case @architecture
|
||||
when nil, 'native'
|
||||
%x{getconf LONG_BIT}.chomp # 'native' is current arch
|
||||
when 'arm64'
|
||||
'arm64'
|
||||
when 'aarch64'
|
||||
'arm64'
|
||||
when 'amd64'
|
||||
'amd64'
|
||||
when 'x86_64'
|
||||
'amd64'
|
||||
when 'i386'
|
||||
'i386'
|
||||
when 'i686'
|
||||
'i386'
|
||||
when 'any'
|
||||
'*'
|
||||
when 'all'
|
||||
'*'
|
||||
when 'noarch'
|
||||
'*'
|
||||
else
|
||||
%x{getconf LONG_BIT}.chomp # default to native, the current arch
|
||||
end
|
||||
|
||||
return [osname, attributes[:freebsd_osversion], arch].join(':')
|
||||
end
|
||||
|
||||
def add_path(tar, tar_path, path)
|
||||
stat = File.lstat(path)
|
||||
if stat.directory?
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ class FPM::Package::Gem < FPM::Package
|
|||
option "--gem", "PATH_TO_GEM",
|
||||
"The path to the 'gem' tool (defaults to 'gem' and searches " \
|
||||
"your $PATH)", :default => "gem"
|
||||
option "--shebang", "SHEBANG",
|
||||
"Replace the shebang in the executables in the bin path with a " \
|
||||
"custom string", :default => nil
|
||||
option "--fix-name", :flag, "Should the target package name be prefixed?",
|
||||
:default => true
|
||||
option "--fix-dependencies", :flag, "Should the package dependencies be " \
|
||||
|
|
@ -41,9 +44,36 @@ class FPM::Package::Gem < FPM::Package
|
|||
option "--disable-dependency", "gem_name",
|
||||
"The gem name to remove from dependency list",
|
||||
:multivalued => true, :attribute_name => :gem_disable_dependencies
|
||||
option "--embed-dependencies", :flag, "Should the gem dependencies " \
|
||||
"be installed?", :default => false
|
||||
|
||||
option "--version-bins", :flag, "Append the version to the bins", :default => false
|
||||
|
||||
option "--stagingdir", "STAGINGDIR",
|
||||
"The directory where fpm installs the gem temporarily before conversion. " \
|
||||
"Normally a random subdirectory of workdir."
|
||||
|
||||
option "--git-repo", "GIT_REPO",
|
||||
"Use this git repo address as the source of the gem instead of " \
|
||||
"rubygems.org.", :default => nil
|
||||
|
||||
option "--git-branch", "GIT_BRANCH",
|
||||
"When using a git repo as the source of the gem instead of " \
|
||||
"rubygems.org, use this git branch.",
|
||||
:default => nil
|
||||
|
||||
# Override parent method
|
||||
def staging_path(path=nil)
|
||||
@gem_staging_path ||= attributes[:gem_stagingdir] || Stud::Temporary.directory("package-#{type}-staging")
|
||||
@staging_path = @gem_staging_path
|
||||
|
||||
if path.nil?
|
||||
return @staging_path
|
||||
else
|
||||
return File.join(@staging_path, path)
|
||||
end
|
||||
end # def staging_path
|
||||
|
||||
def input(gem)
|
||||
# 'arg' is the name of the rubygem we should unpack.
|
||||
path_to_gem = download_if_necessary(gem, version)
|
||||
|
|
@ -70,20 +100,32 @@ class FPM::Package::Gem < FPM::Package
|
|||
|
||||
logger.info("Trying to download", :gem => gem_name, :version => gem_version)
|
||||
|
||||
gem_fetch = [ "#{attributes[:gem_gem]}", "fetch", gem_name]
|
||||
|
||||
gem_fetch += ["--prerelease"] if attributes[:gem_prerelease?]
|
||||
gem_fetch += ["--version", gem_version] if gem_version
|
||||
|
||||
download_dir = build_path(gem_name)
|
||||
FileUtils.mkdir(download_dir) unless File.directory?(download_dir)
|
||||
|
||||
::Dir.chdir(download_dir) do |dir|
|
||||
logger.debug("Downloading in directory #{dir}")
|
||||
safesystem(*gem_fetch)
|
||||
end
|
||||
if attributes[:gem_git_repo]
|
||||
logger.debug("Git cloning in directory #{download_dir}")
|
||||
safesystem("git", "-C", download_dir, "clone", attributes[:gem_git_repo], ".")
|
||||
if attributes[:gem_git_branch]
|
||||
safesystem("git", "-C", download_dir, "checkout", attributes[:gem_git_branch])
|
||||
end
|
||||
|
||||
gem_files = ::Dir.glob(File.join(download_dir, "*.gem"))
|
||||
gem_build = [ "#{attributes[:gem_gem]}", "build", "#{download_dir}/#{gem_name}.gemspec"]
|
||||
::Dir.chdir(download_dir) do |dir|
|
||||
logger.debug("Building in directory #{dir}")
|
||||
safesystem(*gem_build)
|
||||
end
|
||||
gem_files = ::Dir.glob(File.join(download_dir, "*.gem"))
|
||||
else
|
||||
gem_fetch = [ "#{attributes[:gem_gem]}", "fetch", gem_name]
|
||||
gem_fetch += ["--prerelease"] if attributes[:gem_prerelease?]
|
||||
gem_fetch += ["--version", gem_version] if gem_version
|
||||
::Dir.chdir(download_dir) do |dir|
|
||||
logger.debug("Downloading in directory #{dir}")
|
||||
safesystem(*gem_fetch)
|
||||
end
|
||||
gem_files = ::Dir.glob(File.join(download_dir, "*.gem"))
|
||||
end
|
||||
|
||||
if gem_files.length != 1
|
||||
raise "Unexpected number of gem files in #{download_dir}, #{gem_files.length} should be 1"
|
||||
|
|
@ -92,9 +134,19 @@ class FPM::Package::Gem < FPM::Package
|
|||
return gem_files.first
|
||||
end # def download
|
||||
|
||||
GEMSPEC_YAML_CLASSES = [ ::Gem::Specification, ::Gem::Version, Time, ::Gem::Dependency, ::Gem::Requirement, Symbol ]
|
||||
def load_package_info(gem_path)
|
||||
|
||||
spec = YAML.load(%x{#{attributes[:gem_gem]} specification #{gem_path} --yaml})
|
||||
# TODO(sissel): Maybe we should check if `safe_load` method exists instead of this version check?
|
||||
if ::Gem::Version.new(RUBY_VERSION) >= ::Gem::Version.new("3.1.0")
|
||||
# Ruby 3.1.0 switched to a Psych/YAML version that defaults to "safe" loading
|
||||
# and unfortunately `gem specification --yaml` emits YAML that requires
|
||||
# class loaders to process correctly
|
||||
spec = YAML.load(%x{#{attributes[:gem_gem]} specification #{gem_path} --yaml},
|
||||
:permitted_classes => GEMSPEC_YAML_CLASSES)
|
||||
else
|
||||
# Older versions of ruby call this method YAML.safe_load
|
||||
spec = YAML.safe_load(%x{#{attributes[:gem_gem]} specification #{gem_path} --yaml}, GEMSPEC_YAML_CLASSES)
|
||||
end
|
||||
|
||||
if !attributes[:gem_package_prefix].nil?
|
||||
attributes[:gem_package_name_prefix] = attributes[:gem_package_prefix]
|
||||
|
|
@ -141,7 +193,7 @@ class FPM::Package::Gem < FPM::Package
|
|||
# composing multiple packages, it's best to explicitly include it in the provides list.
|
||||
self.provides << "#{self.name} = #{self.version}"
|
||||
|
||||
if !attributes[:no_auto_depends?]
|
||||
if !attributes[:no_auto_depends?] && !attributes[:gem_embed_dependencies?]
|
||||
spec.runtime_dependencies.map do |dep|
|
||||
# rubygems 1.3.5 doesn't have 'Gem::Dependency#requirement'
|
||||
if dep.respond_to?(:requirement)
|
||||
|
|
@ -177,8 +229,18 @@ class FPM::Package::Gem < FPM::Package
|
|||
|
||||
::FileUtils.mkdir_p(installdir)
|
||||
# TODO(sissel): Allow setting gem tool path
|
||||
args = [attributes[:gem_gem], "install", "--quiet", "--no-ri", "--no-rdoc",
|
||||
"--no-user-install", "--install-dir", installdir, "--ignore-dependencies"]
|
||||
args = [attributes[:gem_gem], "install", "--quiet", "--no-user-install", "--install-dir", installdir]
|
||||
if ::Gem::VERSION =~ /^[012]\./
|
||||
args += [ "--no-ri", "--no-rdoc" ]
|
||||
else
|
||||
# Rubygems 3.0.0 changed --no-ri to --no-document
|
||||
args += [ "--no-document" ]
|
||||
end
|
||||
|
||||
if !attributes[:gem_embed_dependencies?]
|
||||
args += ["--ignore-dependencies"]
|
||||
end
|
||||
|
||||
if attributes[:gem_env_shebang?]
|
||||
args += ["-E"]
|
||||
end
|
||||
|
|
@ -196,6 +258,22 @@ class FPM::Package::Gem < FPM::Package
|
|||
args << gem_path
|
||||
safesystem(*args)
|
||||
|
||||
# Replace the shebangs in the executables
|
||||
if attributes[:gem_shebang]
|
||||
::Dir.entries(bin_path).each do |file_name|
|
||||
# exclude . and ..
|
||||
next if ['.', '..'].include?(file_name)
|
||||
# exclude everything which is not a file
|
||||
file_path = File.join(bin_path, file_name)
|
||||
next unless File.ftype(file_path) == 'file'
|
||||
# replace shebang in files if there is one
|
||||
file = File.read(file_path)
|
||||
if file.gsub!(/\A#!.*$/, "#!#{attributes[:gem_shebang]}")
|
||||
File.open(file_path, 'w'){|f| f << file}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Delete bin_path if it's empty, and any empty parents (#612)
|
||||
# Above, we mkdir_p bin_path because rubygems aborts if the parent
|
||||
# directory doesn't exist, for example:
|
||||
|
|
@ -212,6 +290,21 @@ class FPM::Package::Gem < FPM::Package
|
|||
FileUtils.mv("#{bin_path}/#{bin}", "#{bin_path}/#{bin}-#{self.version}")
|
||||
end
|
||||
end
|
||||
|
||||
if attributes[:source_date_epoch_from_changelog?]
|
||||
detect_source_date_from_changelog(installdir)
|
||||
end
|
||||
|
||||
# Remove generated Makefile and gem_make.out files, if any; they
|
||||
# are not needed, and may contain generated paths that cause
|
||||
# different output on successive runs.
|
||||
Find.find(installdir) do |path|
|
||||
if path =~ /.*(gem_make.out|Makefile|mkmf.log)$/
|
||||
logger.info("Removing no longer needed file %s to reduce nondeterminism" % path)
|
||||
File.unlink(path)
|
||||
end
|
||||
end
|
||||
|
||||
end # def install_to_staging
|
||||
|
||||
# Sanitize package name.
|
||||
|
|
@ -220,5 +313,75 @@ class FPM::Package::Gem < FPM::Package
|
|||
def fix_name(name)
|
||||
return [attributes[:gem_package_name_prefix], name].join("-")
|
||||
end # def fix_name
|
||||
|
||||
# Regular expression to accept a gem changelog line, and store date & version, if any, in named capture groups.
|
||||
# Supports formats suggested by http://keepachangelog.com and https://github.com/tech-angels/vandamme
|
||||
# as well as other similar formats that actually occur in the wild.
|
||||
# Build it in pieces for readability, and allow version and date in either order.
|
||||
# Whenever you change this, add a row to the test case in spec/fpm/package/gem_spec.rb.
|
||||
# Don't even try to handle dates that lack four-digit years.
|
||||
# Building blocks:
|
||||
P_RE_LEADIN = '^[#=]{0,3}\s?'
|
||||
P_RE_VERSION_ = '[\w\.-]+\.[\w\.-]+[a-zA-Z0-9]'
|
||||
P_RE_SEPARATOR = '\s[-=/(]?\s?'
|
||||
P_RE_DATE1 = '\d{4}-\d{2}-\d{2}'
|
||||
P_RE_DATE2 = '\w+ \d{1,2}(?:st|nd|rd|th)?,\s\d{4}'
|
||||
P_RE_DATE3 = '\w+\s+\w+\s+\d{1,2},\s\d{4}'
|
||||
P_RE_DATE = "(?<date>#{P_RE_DATE1}|#{P_RE_DATE2}|#{P_RE_DATE3})"
|
||||
P_RE_URL = '\(https?:[-\w/.%]*\)' # In parens, per markdown
|
||||
P_RE_GTMAGIC = '\[\]' # github magic version diff, per chandler
|
||||
P_RE_VERSION = "\\[?(?:Version |v)?(?<version>#{P_RE_VERSION_})\\]?(?:#{P_RE_URL}|#{P_RE_GTMAGIC})?"
|
||||
# The final RE's:
|
||||
P_RE_VERSION_DATE = "#{P_RE_LEADIN}#{P_RE_VERSION}#{P_RE_SEPARATOR}#{P_RE_DATE}"
|
||||
P_RE_DATE_VERSION = "#{P_RE_LEADIN}#{P_RE_DATE}#{P_RE_SEPARATOR}#{P_RE_VERSION}"
|
||||
|
||||
# Detect release date, if found, store in attributes[:source_date_epoch]
|
||||
def detect_source_date_from_changelog(installdir)
|
||||
name = self.name.sub("rubygem-", "") + "-" + self.version
|
||||
changelog = nil
|
||||
datestr = nil
|
||||
r1 = Regexp.new(P_RE_VERSION_DATE)
|
||||
r2 = Regexp.new(P_RE_DATE_VERSION)
|
||||
|
||||
# Changelog doesn't have a standard name, so check all common variations
|
||||
# Sort this list using LANG=C, i.e. caps first
|
||||
[
|
||||
"CHANGELIST",
|
||||
"CHANGELOG", "CHANGELOG.asciidoc", "CHANGELOG.md", "CHANGELOG.rdoc", "CHANGELOG.rst", "CHANGELOG.txt",
|
||||
"CHANGES", "CHANGES.md", "CHANGES.txt",
|
||||
"ChangeLog", "ChangeLog.md", "ChangeLog.txt",
|
||||
"Changelog", "Changelog.md", "Changelog.txt",
|
||||
"changelog", "changelog.md", "changelog.txt",
|
||||
].each do |changelogname|
|
||||
path = File.join(installdir, "gems", name, changelogname)
|
||||
if File.exist?(path)
|
||||
changelog = path
|
||||
File.open path do |file|
|
||||
file.each_line do |line|
|
||||
if line =~ /#{self.version}/
|
||||
[r1, r2].each do |r|
|
||||
if r.match(line)
|
||||
datestr = $~[:date]
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if datestr
|
||||
date = Date.parse(datestr)
|
||||
sec = date.strftime("%s")
|
||||
attributes[:source_date_epoch] = sec
|
||||
logger.debug("Gem %s has changelog date %s, setting source_date_epoch to %s" % [name, datestr, sec])
|
||||
elsif changelog
|
||||
logger.debug("Gem %s changelog %s did not have recognizable date for release %s" % [name, changelog, self.version])
|
||||
else
|
||||
logger.debug("Gem %s did not have changelog with recognized name" % [name])
|
||||
# FIXME: check rubygems.org?
|
||||
end
|
||||
end # detect_source_date_from_changelog
|
||||
|
||||
public(:input, :output)
|
||||
end # class FPM::Package::Gem
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ require "fileutils"
|
|||
require "fpm/package/dir"
|
||||
require 'tempfile' # stdlib
|
||||
require 'pathname' # stdlib
|
||||
require 'rexml/document' # stdlib
|
||||
|
||||
# Use an OS X pkg built with pkgbuild.
|
||||
#
|
||||
|
|
@ -103,6 +102,7 @@ class FPM::Package::OSXpkg < FPM::Package
|
|||
|
||||
# Extract name and version from PackageInfo XML
|
||||
def extract_info(package)
|
||||
require 'rexml/document'
|
||||
build_path("expand").tap do |path|
|
||||
doc = REXML::Document.new File.open(File.join(path, "PackageInfo"))
|
||||
pkginfo_elem = doc.elements["pkg-info"]
|
||||
|
|
@ -148,6 +148,11 @@ class FPM::Package::OSXpkg < FPM::Package
|
|||
write_scripts
|
||||
args += ["--scripts", scripts_path]
|
||||
end
|
||||
|
||||
if attributes[:prefix]
|
||||
args += ["--install-location", attributes[:prefix]]
|
||||
end
|
||||
|
||||
args << output_path
|
||||
|
||||
safesystem("pkgbuild", *args)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
require "fpm/package"
|
||||
require "fpm/util"
|
||||
require "backports"
|
||||
require "backports/latest"
|
||||
require "fileutils"
|
||||
require "find"
|
||||
|
||||
|
|
@ -18,10 +18,10 @@ class FPM::Package::Pacman < FPM::Package
|
|||
option "--group", "GROUP", "The group owner of files in this package", :default => 'root'
|
||||
|
||||
# The list of supported compression types. Default is xz (LZMA2)
|
||||
COMPRESSION_TYPES = [ "gz", "bzip2", "xz", "none" ]
|
||||
COMPRESSION_TYPES = [ "gz", "bzip2", "xz", "zstd", "none" ]
|
||||
|
||||
option "--compression", "COMPRESSION", "The compression type to use, must " \
|
||||
"be one of #{COMPRESSION_TYPES.join(", ")}.", :default => "xz" do |value|
|
||||
"be one of #{COMPRESSION_TYPES.join(", ")}.", :default => "zstd" do |value|
|
||||
if !COMPRESSION_TYPES.include?(value)
|
||||
raise ArgumentError, "Pacman compression value of '#{value}' is invalid. " \
|
||||
"Must be one of #{COMPRESSION_TYPES.join(", ")}"
|
||||
|
|
@ -37,11 +37,15 @@ class FPM::Package::Pacman < FPM::Package
|
|||
def architecture
|
||||
case @architecture
|
||||
when nil
|
||||
return %x{uname -m}.chomp # default to current arch
|
||||
when "amd64" # debian and pacman disagree on architecture names
|
||||
return "x86_64"
|
||||
return %x{uname -m}.chomp # default to current arch
|
||||
when "amd64" # Debian uses amd64
|
||||
return "x86_64" # Arch Linux uses x86_64
|
||||
when "arm64" # Debian uses arm64
|
||||
return "aarch64" # Arch Linux ARM uses aarch64
|
||||
when "armhf" # Debian uses armhf
|
||||
return "arm7hf" # Arch Linux ARM uses arm7hf
|
||||
when "native"
|
||||
return %x{uname -m}.chomp # 'native' is current arch
|
||||
return %x{uname -m}.chomp # 'native' is the current arch
|
||||
when "all", "any", "noarch"
|
||||
return "any"
|
||||
else
|
||||
|
|
@ -58,7 +62,7 @@ class FPM::Package::Pacman < FPM::Package
|
|||
end # def config_files
|
||||
|
||||
def dependencies
|
||||
bogus_regex = /[^\sA-Za-z0-9><=-]/
|
||||
bogus_regex = /[^\sA-Za-z0-9><=+._@-]/
|
||||
# Actually modifies depencies if they are not right
|
||||
bogus_dependencies = @dependencies.grep bogus_regex
|
||||
if bogus_dependencies.any?
|
||||
|
|
@ -209,31 +213,39 @@ class FPM::Package::Pacman < FPM::Package
|
|||
|
||||
def compression_option
|
||||
case self.attributes[:pacman_compression]
|
||||
when nil, "xz"
|
||||
return "--xz"
|
||||
when nil, "zstd"
|
||||
return "--zstd"
|
||||
when "none"
|
||||
return ""
|
||||
when "gz"
|
||||
return "-z"
|
||||
when "xz"
|
||||
return "--xz"
|
||||
when "bzip2"
|
||||
return "-j"
|
||||
when "zstd"
|
||||
return "--zstd"
|
||||
else
|
||||
return "--xz"
|
||||
return "--zstd"
|
||||
end
|
||||
end
|
||||
|
||||
def compression_ending
|
||||
case self.attributes[:pacman_compression]
|
||||
when nil, "xz"
|
||||
return ".xz"
|
||||
when nil, "zstd"
|
||||
return ".zst"
|
||||
when "none"
|
||||
return ""
|
||||
when "gz"
|
||||
return ".gz"
|
||||
when "xz"
|
||||
return ".xz"
|
||||
when "bzip2"
|
||||
return ".bz2"
|
||||
when "zstd"
|
||||
return ".zst"
|
||||
else
|
||||
return ".xz"
|
||||
return ".zst"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -245,7 +257,11 @@ class FPM::Package::Pacman < FPM::Package
|
|||
Find.find(staging_path) do |path|
|
||||
src = path.gsub(/^#{staging_path}/, '')
|
||||
dst = build_path(src)
|
||||
copy_entry(path, dst, preserve=true, remove_destination=true)
|
||||
begin
|
||||
copy_entry(path, dst, preserve=true, remove_destination=true)
|
||||
rescue
|
||||
copy_entry(path, dst, preserve=false, remove_destination=true)
|
||||
end
|
||||
copy_metadata(path, dst)
|
||||
end
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue