Permalink
Browse files

removed all trailing whitespace: for i in $(git ls-files); do sed -i …

…tmp -e "s/ *$//" $i; done
  • Loading branch information...
1 parent 35a2ed4 commit 92e8cb9dcc8e6b445637ed016e97fd078cc40c42 @tmm1 tmm1 committed Jul 8, 2011
View
@@ -22,6 +22,6 @@
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.
View
@@ -48,6 +48,6 @@ 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
+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.
View
@@ -61,8 +61,8 @@ Dir.glob("#{builddir}/usr/lib/node/.npm/*/*") do |path|
# So we'll specify deps of {v}-1 <= x <= {v}-999999....
depends = Dir.glob("#{path}/dependson/*@*") \
.collect { |p| PACKAGEPREFIX + File.basename(p) } \
- .collect { |p| n,v = p.split("@");
- ["#{n} (>= #{v}-1)", "#{n} (<= #{v}-99999999999999)"]
+ .collect { |p| n,v = p.split("@");
+ ["#{n} (>= #{v}-1)", "#{n} (<= #{v}-99999999999999)"]
}.flatten
if package["author"]
@@ -73,7 +73,7 @@ Dir.glob("#{builddir}/usr/lib/node/.npm/*/*") do |path|
maintainer = "#{m["name"]} <#{m["email"]}>"
end
- pkgcmd = [ "fpm",
+ pkgcmd = [ "fpm",
"-n", "#{PACKAGEPREFIX}#{package["name"]}",
"-v", package["version"],
"-m", maintainer,
@@ -16,4 +16,4 @@ Should make the package. Try installing:
Now try it:
- $ /opt/fpm/bin/fpm --help
+ $ /opt/fpm/bin/fpm --help
@@ -8,7 +8,7 @@ Should make the package. Try installing:
Now try it:
- % /opt/jruby/bin/jirb
+ % /opt/jruby/bin/jirb
>> require "java"
=> true
>> java.lang.System.out.println("Hello")
@@ -8,7 +8,7 @@ usr: twisted
cd twisted; python setup.py bdist
tar -zxf twisted/dist/Twisted-$(VERSION).linux-$(shell uname -m).tar.gz
-package: usr
+package: usr
fpm -s dir -t deb -n $(NAME) -v $(VERSION) \
-p python-$(NAME)-VERSION_ARCH.deb -d "python" \
usr
View
@@ -55,7 +55,7 @@ def initialize(settings, paths=[])
@edit = !!settings.edit
@paths = paths
- @package = package_class_for(settings.package_type).new(@source,
+ @package = package_class_for(settings.package_type).new(@source,
:settings => settings.target
)
# Append dependencies given from settings (-d flag for fpm)
View
@@ -10,7 +10,7 @@ def initialize(opts, flag_prefix, help_prefix)
def on(*args, &block)
fixed_args = args.collect do |arg|
if arg =~ /^--/
- "--#{@flag_prefix}-#{arg.gsub(/^--/, "")}"
+ "--#{@flag_prefix}-#{arg.gsub(/^--/, "")}"
else
"(#{@help_prefix}) #{arg}"
end
View
@@ -158,7 +158,7 @@ def default_output
end # def default_output
def fixpath(path)
- if path[0,1] != "/"
+ if path[0,1] != "/"
path = File.join(@source.root, path)
end
return path if File.symlink?(path)
View
@@ -109,7 +109,7 @@ def default_options(opts)
opts.on("-v VERSION", "--version VERSION",
"version to give the package") do |version|
- @settings.version = version
+ @settings.version = version
end # --version
opts.on("--iteration ITERATION",
@@ -152,7 +152,7 @@ def default_options(opts)
opts.on("-s SOURCE_TYPE", "what to build the package from") do |st|
@settings.source_type = st
- end # -s
+ end # -s
opts.on("-S PACKAGE_SUFFIX", "which suffix to append to package and dependencies") do |sfx|
@settings.suffix = sfx
View
@@ -87,11 +87,11 @@ def tar(output, paths, chdir=".")
paths = [ paths ] if paths.is_a? String
paths.each do |path|
while path != "/" and path != "."
- dirs << path if !dirs.include?(path)
+ dirs << path if !dirs.include?(path)
path = File.dirname(path)
end
end # paths.each
-
+
# Want directories to be sorted thusly: [ "/usr", "/usr/bin" ]
# Why? tar and some package managers sometimes fail if the tar is created
# like: [ "/opt/fizz", "/opt" ]
@@ -136,7 +136,7 @@ def tar(output, paths, chdir=".")
end
end # def tar
- def tar_cmd
+ def tar_cmd
# Rely on gnu tar for solaris.
case %x{uname -s}.chomp
when "SunOS"
@@ -16,7 +16,7 @@ def make_tarball!(tar_path, builddir)
@paths.each do |path|
# Trim @root (--chdir)
if @root != "." and path.start_with?(@root)
- path = path[@root.size .. -1]
+ path = path[@root.size .. -1]
end
# Copy to self[:prefix] (aka --prefix)
@@ -50,7 +50,7 @@ def run(self):
dependencies = self.distribution.install_requires
except:
pass
-
+
# In some cases (Mysql-Python) 'dependencies' is none, not empty.
if dependencies is None:
dependencies = []
@@ -30,7 +30,7 @@ def get_source(params)
return
end
- if !File.exists?(package)
+ if !File.exists?(package)
download(package, params[:version])
else
@paths = [ File.expand_path(package) ]
@@ -115,7 +115,7 @@ def fix_dependency(dep)
end
name_re = /^[^ \(]+/
- name = dep[name_re]
+ name = dep[name_re]
if name =~ /[A-Z]/
@logger.warn("Downcasing dependency '#{name}' because deb packages " \
" don't work so good with uppercase names")
@@ -36,7 +36,7 @@ def generate_specfile(builddir)
dir = File.join(builddir, "manifests", File.dirname(manifest))
@logger.info("manifests targeting: #{dir}")
::Dir.mkdir(dir) if !File.directory?(dir)
-
+
File.open(File.join(builddir, "manifests", manifest), "w") do |f|
@logger.info("manifest: #{f.path}")
template = template(File.join("puppet", "#{manifest}.erb"))
@@ -10,7 +10,7 @@ def architecture
when "all"
# Translate fpm "all" arch to what it means in RPM.
return "noarch"
- else
+ else
return @architecture
end
end # def architecture
@@ -30,7 +30,7 @@ def build!(params)
end
%w(BUILD RPMS SRPMS SOURCES SPECS).each { |d| Dir.mkdir(d) }
- args = ["rpmbuild", "-ba",
+ args = ["rpmbuild", "-ba",
"--define", "buildroot #{Dir.pwd}/BUILD",
"--define", "_topdir #{Dir.pwd}",
"--define", "_sourcedir #{Dir.pwd}",
@@ -11,7 +11,7 @@ def architecture
when nil, "native"
@architecture = %x{uname -p}.chomp
end
- # "all" is a valid arch according to
+ # "all" is a valid arch according to
# http://www.bolthole.com/solaris/makeapackage.html
return @architecture
View
@@ -23,11 +23,11 @@ def read
# At this point assume we've read and consumed the lead and signature.
#len = @rpm.signature.index_length + @rpm.signature
#
- # header size is
+ # header size is
# ( @rpm.signature.index_length * size of a header entry )
# + @rpm.signature.data_length
#
- # header 'entries' are an
+ # header 'entries' are an
# int32 (tag id), int32 (tag type), int32 (offset), uint32 (count)
#
# See rpm's header.c, the headerLoad method function for reference.
@@ -43,7 +43,7 @@ def read
@index_size = @index_count * entry_size
tag_data = @rpm.file.read(@index_size)
data = @rpm.file.read(@data_length)
-
+
#ap :data => data
(0 ... @index_count).each do |i|
@@ -55,7 +55,7 @@ def read
@tags << tag
#ap tag.tag => {
- #:type => tag.type,
+ #:type => tag.type,
#:offset => tag.offset,
#:count => tag.count,
#:value => (tag.value rescue "???"),
View
@@ -2,7 +2,7 @@
class RPMFile::Lead
#struct rpmlead {
- attr_accessor :magic #unsigned char magic[4];
+ attr_accessor :magic #unsigned char magic[4];
attr_accessor :major #unsigned char major;
attr_accessor :minor #unsigned char minor;
attr_accessor :type #short type;
@@ -12,7 +12,7 @@ class RPMFile::Lead
attr_accessor :signature_type #short signature_type;
attr_accessor :reserved #char reserved[16];
#}
-
+
attr_accessor :length
def initialize(rpm)
@@ -29,7 +29,7 @@ def type
raise "Unknown package 'type' value #{@type}"
end
end # def type
-
+
def read
# Use 'A' here instead of 'a' to trim nulls.
@length = 96
View
@@ -8,7 +8,7 @@
# source code, but mostly it started making more sense after reading this site:
# http://www.rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.html
-class RPMFile
+class RPMFile
attr_reader :file
def initialize(file)
View
@@ -11,7 +11,7 @@ if [ ! -f "build/usr/local/bin/bmake" ] ; then
# TODO(sissel): Maybe bootstrap ourselves.
echo "This script requires pkgsrc to be bootstrapped in a specific way."
echo "I expected to find file: build/usr/local/bin/bmake and did not"
- echo
+ echo
echo "Bootstrap with:"
echo "SH=/bin/bash ./bootstrap/bootstrap --unprivileged --prefix $PWD/build/usr/local --pkgdbdir $PWD/pkgdb"
exit 1
@@ -37,7 +37,7 @@ for target in $TARGETS; do
set --
eval "$(bmake -C $target show-vars-eval VARS="PKGNAME PKGVERSION")"
- name="$(echo "$PKGNAME" | sed -e "s/-$PKGVERSION\$//")"
+ name="$(echo "$PKGNAME" | sed -e "s/-$PKGVERSION\$//")"
orig_version=${PKGVERSION}
version=${PKGVERSION}-pkgsrc
@@ -52,8 +52,8 @@ for target in $TARGETS; do
clean package || exit 1
# Start building fpm args
- set -- -n "$name" -v "$version" --prefix $LOCALBASE
-
+ set -- -n "$name" -v "$version" --prefix $LOCALBASE
+
# Skip the pkgsrc package metadata files
set -- "$@" --exclude '+*'
@@ -64,9 +64,9 @@ for target in $TARGETS; do
set -- "$@" -d "$PKGNAME (= $PKGVERSION-pkgsrc)"
done
- set -- -s tar -t deb "$@"
- set -- "$@" packages/All/$name-$orig_version.tgz
- fpm "$@"
+ set -- -s tar -t deb "$@"
+ set -- "$@" packages/All/$name-$orig_version.tgz
+ fpm "$@"
done
-
+
View
@@ -14,7 +14,7 @@ Provides: <%= provides.join(", ") -%>
Replaces: <%= properrepl.flatten.join(", ") %>
<% end -%>
Standards-Version: 3.9.1
-Section: <%= category or "unknown" %>
+Section: <%= category or "unknown" %>
Priority: extra
Homepage: <%= url or "http://nourlgiven.example.com/" %>
Description: <%= name %> (FPM-generated package)
View
@@ -14,7 +14,7 @@ Group: <%= category %>
TODO: [Jay] rpms require a license
let's detect it intelligently
-%>
-License: <%= license %>
+License: <%= license %>
URL: <%= url or "http://nourlgiven.example.com/" %>
Source0: %{_sourcedir}/data.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@@ -28,7 +28,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
nextversion = version.split(".").collect { |v| v.to_i }
l = nextversion.length
nextversion[l-2] += 1
- nextversion[l-1] = 0
+ nextversion[l-1] = 0
nextversion = nextversion.join(".")
["#{name} >= #{version}", "#{name} < #{nextversion}"]
# Convert gem >= A.B.C <= X.Y.Z to '>= A.B.C' and '<= X.Y.Z'

0 comments on commit 92e8cb9

Please sign in to comment.