bsdiff 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -1
- data/CHANGELOG.md +4 -0
- data/LICENSE.txt +42 -0
- data/README.md +5 -5
- data/Rakefile +3 -1
- data/ext/bsdiff/bsdiff.h +1 -1
- data/ext/bsdiff/bspatch.h +1 -1
- data/ext/bsdiff/extconf.rb +8 -2
- data/ext/bzip2/blocksort.c +1094 -0
- data/ext/bzip2/bzlib.c +1572 -0
- data/ext/bzip2/bzlib.h +282 -0
- data/ext/bzip2/bzlib_private.h +509 -0
- data/ext/bzip2/compress.c +672 -0
- data/ext/bzip2/crctable.c +104 -0
- data/ext/bzip2/decompress.c +652 -0
- data/ext/bzip2/huffman.c +205 -0
- data/ext/bzip2/randtable.c +84 -0
- data/lib/bsdiff/version.rb +1 -1
- data/lib/bsdiff.rb +1 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68ba4e8da41bd5ecf1655841197a83fffce23bf35ef4a35ec53ec6a4fbc8bbbb
|
4
|
+
data.tar.gz: c187cde84ba2ff4defe871024d2f4d22d02ad066e08e80dec968f69d086f8129
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29f6169cd4f3d8afa28a865ab2feff5a7b5ee8a8ebe289272d40a54812a02ccdd96e788f40ad6942aaaf28027c91b30f6951ca739ae482df1cffb51f10166f0c
|
7
|
+
data.tar.gz: 7fe979aaf2c3f7e0e06e1ee201a30fbf7a474f185c789e1e4618d4e74d36fa4cc475a0f7a41f6b5e8295b72c1353a374584a86bd44a9bcdee370c11f7c85c45c
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
bsdiff:
|
1
2
|
Copyright 2003-2005 Colin Percival
|
2
3
|
* All rights reserved
|
3
4
|
*
|
@@ -21,3 +22,44 @@ Copyright 2003-2005 Colin Percival
|
|
21
22
|
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
22
23
|
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
23
24
|
* POSSIBILITY OF SUCH DAMAGE.
|
25
|
+
|
26
|
+
--------------------------------------------------------------------------
|
27
|
+
|
28
|
+
bzip2:
|
29
|
+
This program, "bzip2", the associated library "libbzip2", and all
|
30
|
+
documentation, are copyright (C) 1996-2019 Julian R Seward. All
|
31
|
+
rights reserved.
|
32
|
+
|
33
|
+
Redistribution and use in source and binary forms, with or without
|
34
|
+
modification, are permitted provided that the following conditions
|
35
|
+
are met:
|
36
|
+
|
37
|
+
1. Redistributions of source code must retain the above copyright
|
38
|
+
notice, this list of conditions and the following disclaimer.
|
39
|
+
|
40
|
+
2. The origin of this software must not be misrepresented; you must
|
41
|
+
not claim that you wrote the original software. If you use this
|
42
|
+
software in a product, an acknowledgment in the product
|
43
|
+
documentation would be appreciated but is not required.
|
44
|
+
|
45
|
+
3. Altered source versions must be plainly marked as such, and must
|
46
|
+
not be misrepresented as being the original software.
|
47
|
+
|
48
|
+
4. The name of the author may not be used to endorse or promote
|
49
|
+
products derived from this software without specific prior written
|
50
|
+
permission.
|
51
|
+
|
52
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
53
|
+
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
54
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
55
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
56
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
57
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
58
|
+
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
59
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
60
|
+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
61
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
62
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
63
|
+
|
64
|
+
Julian Seward, jseward@acm.org
|
65
|
+
bzip2/libbzip2 version 1.0.8 of 13 July 2019
|
data/README.md
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/bsdiff.svg)](https://badge.fury.io/rb/bsdiff)
|
2
2
|
[![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)
|
3
3
|
|
4
|
-
# Bsdiff -
|
4
|
+
# Bsdiff - a binary diff/patch tool for Ruby
|
5
5
|
|
6
6
|
Ruby bindings for Colin Percival's excellent [bsdiff/bspatch](https://www.daemonology.net/bsdiff) binary patching tool.
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
|
10
|
-
Bsdiff requires the bzip2 library. If you don't already have it, install `libbz2-dev` via your package manager.
|
11
|
-
|
12
10
|
Install the gem and add it to the application's Gemfile by executing:
|
13
11
|
|
14
12
|
```bash
|
@@ -20,7 +18,7 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
20
18
|
```bash
|
21
19
|
gem install bsdiff
|
22
20
|
```
|
23
|
-
The original source archive is located in dir `src` and diffs to show changes made in creating the bindings are in dir `diffs`.
|
21
|
+
The original source archive is located in dir `src` and diffs to show changes made in creating the Ruby bindings are in dir `diffs`. The integrity of both are verified in the [tests](https://gitlab.com/matzfan/bsdiff/-/blob/master/test/test_bsdiff.rb). The tests also verify the integrity of the (unmodified) bzip2 source files in the `bzip2` dir.
|
24
22
|
|
25
23
|
## Usage
|
26
24
|
```ruby
|
@@ -41,8 +39,10 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
41
39
|
|
42
40
|
## Contributing
|
43
41
|
|
44
|
-
Bug reports and pull requests are welcome
|
42
|
+
Bug reports and pull requests are welcome at https://gitlab.com/matzfan/bsdiff.
|
45
43
|
|
46
44
|
## License
|
47
45
|
|
48
46
|
The gem is available as open source under the terms of the [FreeBSD License](https://opensource.org/license/bsd-2-clause).
|
47
|
+
|
48
|
+
Bsdiff includes selected source files from the [bzip2](https://sourceware.org/bzip2) library and its license is included.
|
data/Rakefile
CHANGED
@@ -4,12 +4,14 @@ require 'bundler/gem_tasks'
|
|
4
4
|
require 'minitest/test_task'
|
5
5
|
require 'rake/extensiontask'
|
6
6
|
|
7
|
+
Gem::PackageTask.new(Bundler.load_gemspec('bsdiff.gemspec')).define
|
8
|
+
|
7
9
|
Minitest::TestTask.create
|
8
10
|
|
9
11
|
require 'rubocop/rake_task'
|
10
12
|
|
11
|
-
RuboCop::RakeTask.new
|
12
13
|
Rake::ExtensionTask.new('bsdiff') { |ext| ext.lib_dir = 'lib' } # std rubygems install location
|
14
|
+
RuboCop::RakeTask.new
|
13
15
|
|
14
16
|
task default: %i[clobber compile test rubocop]
|
15
17
|
|
data/ext/bsdiff/bsdiff.h
CHANGED
data/ext/bsdiff/bspatch.h
CHANGED
data/ext/bsdiff/extconf.rb
CHANGED
@@ -4,8 +4,14 @@ require 'mkmf'
|
|
4
4
|
|
5
5
|
dir_config 'bsdiff'
|
6
6
|
|
7
|
-
#
|
8
|
-
|
7
|
+
# rubocop:disable Style/GlobalVars
|
8
|
+
$VPATH << '$(srcdir)/../bzip2'
|
9
|
+
$srcs = Dir["#{$srcdir}/*.c"]
|
10
|
+
$srcs += Dir["#{$srcdir}/../bzip2/*.c"]
|
11
|
+
# rubocop:enable Style/GlobalVars
|
12
|
+
|
13
|
+
append_cppflags '-I$(srcdir)/../bzip2'
|
9
14
|
|
10
15
|
create_header # default name is extconf.h
|
16
|
+
CONFIG['warnflags'].clear # suppress warns from bzip2 headers
|
11
17
|
create_makefile('bsdiff') # target bsdiff.so
|