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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab2e4bd82a40a80b04620395aac43ee8f6063dbd919df4e0c2d3c13671466c8e
4
- data.tar.gz: c1eec7c1064f60facd9e6d2a84c1eb87d5eade071a8a6cf83ef410381b8680d4
3
+ metadata.gz: 68ba4e8da41bd5ecf1655841197a83fffce23bf35ef4a35ec53ec6a4fbc8bbbb
4
+ data.tar.gz: c187cde84ba2ff4defe871024d2f4d22d02ad066e08e80dec968f69d086f8129
5
5
  SHA512:
6
- metadata.gz: 658a9f34fa980874ef116d928b79b0fd770dee72a86bd2706bcdee1f2a40d47c08406c28fb9d9b95078cf3919d2af7d960c7a64bb53c15f28bc08f84abff8e28
7
- data.tar.gz: 9582e14b3c45262d9f97f08642c7bec1333cffc4397d277f03431b977dd6a96ce81ba40d474d326a01edd931b5758b60fcef32803a4483bfcd34f64aac9901b7
6
+ metadata.gz: 29f6169cd4f3d8afa28a865ab2feff5a7b5ee8a8ebe289272d40a54812a02ccdd96e788f40ad6942aaaf28027c91b30f6951ca739ae482df1cffb51f10166f0c
7
+ data.tar.gz: 7fe979aaf2c3f7e0e06e1ee201a30fbf7a474f185c789e1e4618d4e74d36fa4cc475a0f7a41f6b5e8295b72c1353a374584a86bd44a9bcdee370c11f7c85c45c
data/.rubocop.yml CHANGED
@@ -16,4 +16,3 @@ Minitest/AssertTruthy:
16
16
 
17
17
  Style/HashSyntax:
18
18
  Enabled: false # yuk Ruby 3.1
19
-
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.0] - 2024-10-13
4
+
5
+ * Bundle bzip2 lib dependencies
6
+
3
7
  ## [0.0.2] - 2024-10-09
4
8
 
5
9
  ### Bug fixes
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 - the binary diff/patch tool
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`. Both are verified in the [tests](https://gitlab.com/matzfan/bsdiff/-/blob/master/test/test_bsdiff.rb).
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 on GitHub at https://gitlab.com/matzfan/bsdiff.
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
@@ -3,4 +3,4 @@
3
3
 
4
4
  int diff(const char *oldfile, const char *newfile, const char *patchfile);
5
5
 
6
- #endif /* BSDIFF_H */
6
+ #endif /* BSDIFF_H */
data/ext/bsdiff/bspatch.h CHANGED
@@ -3,4 +3,4 @@
3
3
 
4
4
  int patch(const char *oldfile, const char *newfile, const char *patchfile);
5
5
 
6
- #endif /* BSPATCH_H */
6
+ #endif /* BSPATCH_H */
@@ -4,8 +4,14 @@ require 'mkmf'
4
4
 
5
5
  dir_config 'bsdiff'
6
6
 
7
- # bzip2 dependency
8
- abort 'could not find library bz2 - is libbz2-dev installed?' unless have_library 'bz2' # -lbz2 cflag
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