Skip to content

Commit 92e8cb9

Browse files
committed
removed all trailing whitespace: for i in $(git ls-files); do sed -i tmp -e "s/ *$//" $i; done
1 parent 35a2ed4 commit 92e8cb9

24 files changed

+43
-43
lines changed

CHANGELIST

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
Example:
2323
--python-bin=/usr/bin/python2.7
2424
--python-easyinstall=/usr/bin/easy_install2.7
25-
25+
2626
0.2.26 and earlier
2727
No changelist tracked. My bad, yo.

NOTES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ packages with fpm in debian. It will likely require a one-time addition to
4848
site.py (/usr/lib/python2.6/site.py) or some other PYTHONPATH hackery, though
4949
I don't know just yet.
5050

51-
It will also require special setup.py invocations as Debian has patched distutils to
51+
It will also require special setup.py invocations as Debian has patched distutils to
5252
install python packages, by default, to a place that requires again the
5353
python-central/support tools to run to make them work.

bin/fpm-npm

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ Dir.glob("#{builddir}/usr/lib/node/.npm/*/*") do |path|
6161
# So we'll specify deps of {v}-1 <= x <= {v}-999999....
6262
depends = Dir.glob("#{path}/dependson/*@*") \
6363
.collect { |p| PACKAGEPREFIX + File.basename(p) } \
64-
.collect { |p| n,v = p.split("@");
65-
["#{n} (>= #{v}-1)", "#{n} (<= #{v}-99999999999999)"]
64+
.collect { |p| n,v = p.split("@");
65+
["#{n} (>= #{v}-1)", "#{n} (<= #{v}-99999999999999)"]
6666
}.flatten
6767

6868
if package["author"]
@@ -73,7 +73,7 @@ Dir.glob("#{builddir}/usr/lib/node/.npm/*/*") do |path|
7373
maintainer = "#{m["name"]} <#{m["email"]}>"
7474
end
7575

76-
pkgcmd = [ "fpm",
76+
pkgcmd = [ "fpm",
7777
"-n", "#{PACKAGEPREFIX}#{package["name"]}",
7878
"-v", package["version"],
7979
"-m", maintainer,

examples/fpm/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ Should make the package. Try installing:
1616

1717
Now try it:
1818

19-
$ /opt/fpm/bin/fpm --help
19+
$ /opt/fpm/bin/fpm --help

examples/jruby/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Should make the package. Try installing:
88

99
Now try it:
1010

11-
% /opt/jruby/bin/jirb
11+
% /opt/jruby/bin/jirb
1212
>> require "java"
1313
=> true
1414
>> java.lang.System.out.println("Hello")

examples/python/twisted/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ usr: twisted
88
cd twisted; python setup.py bdist
99
tar -zxf twisted/dist/Twisted-$(VERSION).linux-$(shell uname -m).tar.gz
1010

11-
package: usr
11+
package: usr
1212
fpm -s dir -t deb -n $(NAME) -v $(VERSION) \
1313
-p python-$(NAME)-VERSION_ARCH.deb -d "python" \
1414
usr

lib/fpm/builder.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def initialize(settings, paths=[])
5555
@edit = !!settings.edit
5656

5757
@paths = paths
58-
@package = package_class_for(settings.package_type).new(@source,
58+
@package = package_class_for(settings.package_type).new(@source,
5959
:settings => settings.target
6060
)
6161
# Append dependencies given from settings (-d flag for fpm)

lib/fpm/flags.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def initialize(opts, flag_prefix, help_prefix)
1010
def on(*args, &block)
1111
fixed_args = args.collect do |arg|
1212
if arg =~ /^--/
13-
"--#{@flag_prefix}-#{arg.gsub(/^--/, "")}"
13+
"--#{@flag_prefix}-#{arg.gsub(/^--/, "")}"
1414
else
1515
"(#{@help_prefix}) #{arg}"
1616
end

lib/fpm/package.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def default_output
158158
end # def default_output
159159

160160
def fixpath(path)
161-
if path[0,1] != "/"
161+
if path[0,1] != "/"
162162
path = File.join(@source.root, path)
163163
end
164164
return path if File.symlink?(path)

lib/fpm/program.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def default_options(opts)
109109

110110
opts.on("-v VERSION", "--version VERSION",
111111
"version to give the package") do |version|
112-
@settings.version = version
112+
@settings.version = version
113113
end # --version
114114

115115
opts.on("--iteration ITERATION",
@@ -152,7 +152,7 @@ def default_options(opts)
152152

153153
opts.on("-s SOURCE_TYPE", "what to build the package from") do |st|
154154
@settings.source_type = st
155-
end # -s
155+
end # -s
156156

157157
opts.on("-S PACKAGE_SUFFIX", "which suffix to append to package and dependencies") do |sfx|
158158
@settings.suffix = sfx

lib/fpm/source.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ def tar(output, paths, chdir=".")
8787
paths = [ paths ] if paths.is_a? String
8888
paths.each do |path|
8989
while path != "/" and path != "."
90-
dirs << path if !dirs.include?(path)
90+
dirs << path if !dirs.include?(path)
9191
path = File.dirname(path)
9292
end
9393
end # paths.each
94-
94+
9595
# Want directories to be sorted thusly: [ "/usr", "/usr/bin" ]
9696
# Why? tar and some package managers sometimes fail if the tar is created
9797
# like: [ "/opt/fizz", "/opt" ]
@@ -136,7 +136,7 @@ def tar(output, paths, chdir=".")
136136
end
137137
end # def tar
138138

139-
def tar_cmd
139+
def tar_cmd
140140
# Rely on gnu tar for solaris.
141141
case %x{uname -s}.chomp
142142
when "SunOS"

lib/fpm/source/dir.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def make_tarball!(tar_path, builddir)
1616
@paths.each do |path|
1717
# Trim @root (--chdir)
1818
if @root != "." and path.start_with?(@root)
19-
path = path[@root.size .. -1]
19+
path = path[@root.size .. -1]
2020
end
2121

2222
# Copy to self[:prefix] (aka --prefix)

lib/fpm/source/pyfpm/get_metadata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def run(self):
5050
dependencies = self.distribution.install_requires
5151
except:
5252
pass
53-
53+
5454
# In some cases (Mysql-Python) 'dependencies' is none, not empty.
5555
if dependencies is None:
5656
dependencies = []

lib/fpm/source/python.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def get_source(params)
3030
return
3131
end
3232

33-
if !File.exists?(package)
33+
if !File.exists?(package)
3434
download(package, params[:version])
3535
else
3636
@paths = [ File.expand_path(package) ]

lib/fpm/target/deb.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def fix_dependency(dep)
115115
end
116116

117117
name_re = /^[^ \(]+/
118-
name = dep[name_re]
118+
name = dep[name_re]
119119
if name =~ /[A-Z]/
120120
@logger.warn("Downcasing dependency '#{name}' because deb packages " \
121121
" don't work so good with uppercase names")

lib/fpm/target/puppet.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def generate_specfile(builddir)
3636
dir = File.join(builddir, "manifests", File.dirname(manifest))
3737
@logger.info("manifests targeting: #{dir}")
3838
::Dir.mkdir(dir) if !File.directory?(dir)
39-
39+
4040
File.open(File.join(builddir, "manifests", manifest), "w") do |f|
4141
@logger.info("manifest: #{f.path}")
4242
template = template(File.join("puppet", "#{manifest}.erb"))

lib/fpm/target/rpm.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def architecture
1010
when "all"
1111
# Translate fpm "all" arch to what it means in RPM.
1212
return "noarch"
13-
else
13+
else
1414
return @architecture
1515
end
1616
end # def architecture
@@ -30,7 +30,7 @@ def build!(params)
3030
end
3131

3232
%w(BUILD RPMS SRPMS SOURCES SPECS).each { |d| Dir.mkdir(d) }
33-
args = ["rpmbuild", "-ba",
33+
args = ["rpmbuild", "-ba",
3434
"--define", "buildroot #{Dir.pwd}/BUILD",
3535
"--define", "_topdir #{Dir.pwd}",
3636
"--define", "_sourcedir #{Dir.pwd}",

lib/fpm/target/solaris.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def architecture
1111
when nil, "native"
1212
@architecture = %x{uname -p}.chomp
1313
end
14-
# "all" is a valid arch according to
14+
# "all" is a valid arch according to
1515
# http://www.bolthole.com/solaris/makeapackage.html
1616

1717
return @architecture

lib/rpm/header.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ def read
2323
# At this point assume we've read and consumed the lead and signature.
2424
#len = @rpm.signature.index_length + @rpm.signature
2525
#
26-
# header size is
26+
# header size is
2727
# ( @rpm.signature.index_length * size of a header entry )
2828
# + @rpm.signature.data_length
2929
#
30-
# header 'entries' are an
30+
# header 'entries' are an
3131
# int32 (tag id), int32 (tag type), int32 (offset), uint32 (count)
3232
#
3333
# See rpm's header.c, the headerLoad method function for reference.
@@ -43,7 +43,7 @@ def read
4343
@index_size = @index_count * entry_size
4444
tag_data = @rpm.file.read(@index_size)
4545
data = @rpm.file.read(@data_length)
46-
46+
4747
#ap :data => data
4848

4949
(0 ... @index_count).each do |i|
@@ -55,7 +55,7 @@ def read
5555
@tags << tag
5656

5757
#ap tag.tag => {
58-
#:type => tag.type,
58+
#:type => tag.type,
5959
#:offset => tag.offset,
6060
#:count => tag.count,
6161
#:value => (tag.value rescue "???"),

lib/rpm/lead.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class RPMFile::Lead
44
#struct rpmlead {
5-
attr_accessor :magic #unsigned char magic[4];
5+
attr_accessor :magic #unsigned char magic[4];
66
attr_accessor :major #unsigned char major;
77
attr_accessor :minor #unsigned char minor;
88
attr_accessor :type #short type;
@@ -12,7 +12,7 @@ class RPMFile::Lead
1212
attr_accessor :signature_type #short signature_type;
1313
attr_accessor :reserved #char reserved[16];
1414
#}
15-
15+
1616
attr_accessor :length
1717

1818
def initialize(rpm)
@@ -29,7 +29,7 @@ def type
2929
raise "Unknown package 'type' value #{@type}"
3030
end
3131
end # def type
32-
32+
3333
def read
3434
# Use 'A' here instead of 'a' to trim nulls.
3535
@length = 96

lib/rpm/rpmfile.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# source code, but mostly it started making more sense after reading this site:
99
# http://www.rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.html
1010

11-
class RPMFile
11+
class RPMFile
1212
attr_reader :file
1313

1414
def initialize(file)

misc/pkgsrc.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if [ ! -f "build/usr/local/bin/bmake" ] ; then
1111
# TODO(sissel): Maybe bootstrap ourselves.
1212
echo "This script requires pkgsrc to be bootstrapped in a specific way."
1313
echo "I expected to find file: build/usr/local/bin/bmake and did not"
14-
echo
14+
echo
1515
echo "Bootstrap with:"
1616
echo "SH=/bin/bash ./bootstrap/bootstrap --unprivileged --prefix $PWD/build/usr/local --pkgdbdir $PWD/pkgdb"
1717
exit 1
@@ -37,7 +37,7 @@ for target in $TARGETS; do
3737
set --
3838

3939
eval "$(bmake -C $target show-vars-eval VARS="PKGNAME PKGVERSION")"
40-
name="$(echo "$PKGNAME" | sed -e "s/-$PKGVERSION\$//")"
40+
name="$(echo "$PKGNAME" | sed -e "s/-$PKGVERSION\$//")"
4141
orig_version=${PKGVERSION}
4242
version=${PKGVERSION}-pkgsrc
4343

@@ -52,8 +52,8 @@ for target in $TARGETS; do
5252
clean package || exit 1
5353

5454
# Start building fpm args
55-
set -- -n "$name" -v "$version" --prefix $LOCALBASE
56-
55+
set -- -n "$name" -v "$version" --prefix $LOCALBASE
56+
5757
# Skip the pkgsrc package metadata files
5858
set -- "$@" --exclude '+*'
5959

@@ -64,9 +64,9 @@ for target in $TARGETS; do
6464
set -- "$@" -d "$PKGNAME (= $PKGVERSION-pkgsrc)"
6565
done
6666

67-
set -- -s tar -t deb "$@"
68-
set -- "$@" packages/All/$name-$orig_version.tgz
69-
fpm "$@"
67+
set -- -s tar -t deb "$@"
68+
set -- "$@" packages/All/$name-$orig_version.tgz
69+
fpm "$@"
7070
done
71-
71+
7272

templates/deb.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Provides: <%= provides.join(", ") -%>
1414
Replaces: <%= properrepl.flatten.join(", ") %>
1515
<% end -%>
1616
Standards-Version: 3.9.1
17-
Section: <%= category or "unknown" %>
17+
Section: <%= category or "unknown" %>
1818
Priority: extra
1919
Homepage: <%= url or "http://nourlgiven.example.com/" %>
2020
Description: <%= name %> (FPM-generated package)

templates/rpm.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Group: <%= category %>
1414
TODO: [Jay] rpms require a license
1515
let's detect it intelligently
1616
-%>
17-
License: <%= license %>
17+
License: <%= license %>
1818
URL: <%= url or "http://nourlgiven.example.com/" %>
1919
Source0: %{_sourcedir}/data.tar.gz
2020
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@@ -28,7 +28,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
2828
nextversion = version.split(".").collect { |v| v.to_i }
2929
l = nextversion.length
3030
nextversion[l-2] += 1
31-
nextversion[l-1] = 0
31+
nextversion[l-1] = 0
3232
nextversion = nextversion.join(".")
3333
["#{name} >= #{version}", "#{name} < #{nextversion}"]
3434
# Convert gem >= A.B.C <= X.Y.Z to '>= A.B.C' and '<= X.Y.Z'

0 commit comments

Comments
 (0)