jordansissel/fpm — Issue #165: Rsync not checked for in makefile example.
Author: Darkflib
Created: 2012-02-28 15:22:22+00:00
State: open

We start off with the makefile from the jenkins example (with path altered for this machine)

root@dev:~# vi Makefile
root@dev:~# make
rm -f jenkins.war
wget http://ftp.osuosl.org/pub/hudson/war/1.396/jenkins.war
--2012-02-28 09:14:46-- http://ftp.osuosl.org/pub/hudson/war/1.396/jenkins.war
Resolving ftp.osuosl.org... 140.211.166.134
Connecting to ftp.osuosl.org|140.211.166.134|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 36665038 (35M) [text/plain]
Saving to: “jenkins.war”

100%[==============================================================================>] 36,665,038 1014K/s in 22s

2012-02-28 09:15:08 (1.57 MB/s) - “jenkins.war” saved [36665038/36665038]

/var/lib/gems/1.8/bin/fpm -s dir -t deb -n jenkins -v 1.396 --prefix /opt/jenkins jenkins.war
/var/lib/gems/1.8/gems/fpm-0.3.11/lib/fpm/util.rb:4:in `safesystem': 'system(["rsync", "-a", "jenkins.war", "/root/build-deb-jenkins_1.396_amd64.deb/tarbuild/opt/jenkins/."])' failed with error code: 127 (RuntimeError)
from /var/lib/gems/1.8/gems/fpm-0.3.11/lib/fpm/source/dir.rb:35:in `make_tarball!'
from /var/lib/gems/1.8/gems/fpm-0.3.11/lib/fpm/source/dir.rb:17:in `each'
from /var/lib/gems/1.8/gems/fpm-0.3.11/lib/fpm/source/dir.rb:17:in `make_tarball!'
from /var/lib/gems/1.8/gems/fpm-0.3.11/lib/fpm/builder.rb:97:in `assemble!'
from /var/lib/gems/1.8/gems/fpm-0.3.11/lib/fpm/builder.rb:96:in `chdir'
from /var/lib/gems/1.8/gems/fpm-0.3.11/lib/fpm/builder.rb:96:in `assemble!'
from /var/lib/gems/1.8/gems/fpm-0.3.11/lib/fpm/program.rb:56:in `run'
from /var/lib/gems/1.8/gems/fpm-0.3.11/bin/fpm:20
from /var/lib/gems/1.8/bin/fpm:19:in `load'
from /var/lib/gems/1.8/bin/fpm:19
make: *** [package] Error 1

Oopsie... missing rsync and error rather terse...

Lets install it.

root@dev:~# apt-get install rsync
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
rsync
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 359 kB of archives.
After this operation, 721 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian/ squeeze/main rsync amd64 3.0.7-2 [359 kB]
Fetched 359 kB in 0s (1,118 kB/s)
Selecting previously deselected package rsync.
(Reading database ... 23133 files and directories currently installed.)
Unpacking rsync (from .../rsync_3.0.7-2_amd64.deb) ...
Processing triggers for man-db ...
Setting up rsync (3.0.7-2) ...
update-rc.d: using dependency based boot sequencing
insserv: warning: script 'K01nova-agent' missing LSB tags and overrides
insserv: warning: script 'nova-agent' missing LSB tags and overrides
insserv: warning: script 'K01nova-agent' missing LSB tags and overrides
insserv: warning: script 'nova-agent' missing LSB tags and overrides

...and try again

root@dev:~# make
rm -f jenkins.war
wget http://ftp.osuosl.org/pub/hudson/war/1.396/jenkins.war
--2012-02-28 09:17:26-- http://ftp.osuosl.org/pub/hudson/war/1.396/jenkins.war
Resolving ftp.osuosl.org... 140.211.166.134
Connecting to ftp.osuosl.org|140.211.166.134|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 36665038 (35M) [text/plain]
Saving to: “jenkins.war”

100%[==============================================================================>] 36,665,038 1.14M/s in 26s

2012-02-28 09:17:51 (1.36 MB/s) - “jenkins.war” saved [36665038/36665038]

/var/lib/gems/1.8/bin/fpm -s dir -t deb -n jenkins -v 1.396 --prefix /opt/jenkins jenkins.war
Created /root/jenkins_1.396_amd64.deb
root@dev:~#

It works!