image_optim_pack 0.5.0.20180605 → 0.5.1

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: 760508b176be48734451e8584fa1700c5b061cc746e07b98b15dee42016214b9
4
- data.tar.gz: 0ff1d7364e30d879192a8c3e3d918f58b089e4b21644003a101fe0f8830dffc4
3
+ metadata.gz: 9ef36e670308415aee4a6b74a8d9970ab487b592a04fcd3dd726347fb1be16f7
4
+ data.tar.gz: f76e2eeb17232023cdbaac02b3ee1655496c6ebd008e6485444b08ff0deb3473
5
5
  SHA512:
6
- metadata.gz: b5307385c7abe9aa23befc25d2da6a2e36322fb43529fad58c758a0f751b46f50cff4f8a628587843d4aa7d21e467a1307a079e2ef5e4b90ab7bd1374fd2cf4a
7
- data.tar.gz: 15767ae2b7527f38be8a8c6030a26a98fad849ec8a00b6be228483e6129133ff64860a21b062403f1217f7bf21a88a71583b84afe0c4dac3e983f042a0dc484d
6
+ metadata.gz: be3089e31aaf95538dfd17de76330337d4b7b7a5cdd2cdf51f5f4a19bb638424a4cae8d7cd96f866819b14ee84dc196199f7d2f35b4c6f97a2b0673f45c9bf61
7
+ data.tar.gz: 4204acf30eb17d46ec73afc8191741782c95491a881976bd15ac7b0506477720ef9fe167e98082c9fee5ea18bbee3e1f425f39c6dbfbff28196d13aee75bd4f0
data/.travis.yml CHANGED
@@ -19,6 +19,7 @@ before_install:
19
19
  - gem update --system
20
20
  - gem update bundler
21
21
  - if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install imagemagick; fi
22
+ - make ldd-version
22
23
  matrix:
23
24
  include:
24
25
  - dist: trusty
@@ -29,6 +30,9 @@ matrix:
29
30
  - os: osx
30
31
  rvm: default
31
32
  osx_image: xcode8.3
33
+ - os: osx
34
+ rvm: default
35
+ osx_image: xcode9.3
32
36
  - env: RUBOCOP=✓
33
37
  rvm: '2.4.4'
34
38
  script: bundle exec rubocop
data/CHANGELOG.markdown CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## unreleased
4
4
 
5
+ ## v0.5.1 (2018-06-10)
6
+
7
+ * Switching back to centos (6.9) for linux to use more widely compatible glibc during compilation [#12](https://github.com/toy/image_optim_pack/issues/12) [@toy](https://github.com/toy)
8
+ * Add archive checksum verification [#10](https://github.com/toy/image_optim_pack/issues/10) [@toy](https://github.com/toy)
9
+
5
10
  ## v0.5.0.20180605 (2018-06-05)
6
11
 
7
12
  * pngquant 2.12.0 [@toy](https://github.com/toy)
@@ -29,8 +34,8 @@
29
34
 
30
35
  ## v0.5.0.20171208 (2017-12-08)
31
36
 
32
- * ensure unused libgcc is not dynamically linked with pngquant [@toy](https://github.com/toy)
33
- * don’t use lcms (colour profiles) in pngquant [@toy](https://github.com/toy)
37
+ * Ensure unused libgcc is not dynamically linked with pngquant [@toy](https://github.com/toy)
38
+ * Don’t use lcms (colour profiles) in pngquant [@toy](https://github.com/toy)
34
39
  * pngquant 2.11.2 [@toy](https://github.com/toy)
35
40
  * pngquant 2.11.1 [@toy](https://github.com/toy)
36
41
 
data/Makefile CHANGED
@@ -15,6 +15,21 @@ OPTIPNG_VER := 0.7.7
15
15
  PNGCRUSH_VER := 1.8.13
16
16
  PNGQUANT_VER := 2.12.0
17
17
 
18
+ # ====== CHECKSUMS ======
19
+
20
+ ADVANCECOMP_SHA256 := 3ac0875e86a8517011976f04107186d5c60d434954078bc502ee731480933eb8
21
+ GIFSICLE_SHA256 := 0a4ee602aa244cdcdd86a250a6b39c94d8343cf526b8fae862d8a0efc337a800
22
+ JHEAD_SHA256 := 88cc01da018e242fe2e05db73f91b6288106858dd70f27506c4989a575d2895e
23
+ JPEGARCHIVE_SHA256 := 494534f5308f99743f11f3a7c151a8d5ca8a5f1f8b61ea119098511d401bc618
24
+ JPEGOPTIM_SHA256 := 88b1eb64c2a33a2f013f068df8b0331f42c019267401ae3fa28e3277403a5ab7
25
+ LIBJPEG_SHA256 := 650250979303a649e21f87b5ccd02672af1ea6954b911342ea491f351ceb7122
26
+ LIBMOZJPEG_SHA256 := 11823198f3c677b1832fa2dcf702e458f70c959661c4bec9c8922b7c36e94739
27
+ LIBPNG_SHA256 := 574623a4901a9969080ab4a2df9437026c8a87150dfd5c235e28c94b212964a7
28
+ LIBZ_SHA256 := c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
29
+ OPTIPNG_SHA256 := 4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452
30
+ PNGCRUSH_SHA256 := fed0aaf5c098aa8c7f78c75365cd18d7341417326ecbdba547876b7b4f3df4be
31
+ PNGQUANT_SHA256 := 0e540c64bb58c05f2a05b4eaf1d3d165f0d3278500f15abfeac47f93f8fa8fa8
32
+
18
33
  # ====== CONSTANTS ======
19
34
 
20
35
  OS := $(shell uname -s | tr A-Z a-z)
@@ -46,6 +61,7 @@ downcase = $(shell echo $1 | tr A-Z a-z)
46
61
 
47
62
  ln_s := ln -sf
48
63
  tar := $(shell if command -v gtar >/dev/null 2>&1; then echo gtar; else echo tar; fi)
64
+ sha256sum := $(shell if command -v sha256sum >/dev/null 2>&1; then echo sha256sum; elif command -v shasum >/dev/null 2>&1; then echo shasum -a 256; else echo sha256; fi)
49
65
 
50
66
  # ====== ARCHIVES ======
51
67
 
@@ -59,6 +75,7 @@ $1_TGZ := $(DL_DIR)/$(call downcase,$1)-$($1_VER).tar.gz
59
75
  $1_EXTRACTED := $$($1_DIR)/__$$(notdir $$($1_TGZ))__
60
76
  $$($1_EXTRACTED) : $$($1_TGZ)
61
77
  rm -rf $$(@D)
78
+ echo "$$($1_SHA256) $$($1_TGZ)" | $(sha256sum) -c
62
79
  mkdir $$(@D)
63
80
  $(tar) -C $$(@D) --strip-components=1 -xzf $$<
64
81
  touch $$(@D)/__$$(notdir $$<)__
@@ -87,23 +104,23 @@ $(eval $(call archive-dl,LIBPNG, http://prdownloads.sourceforge.net/libpng/
87
104
  $(eval $(call archive-dl,LIBZ, http://prdownloads.sourceforge.net/libpng/zlib-[VER].tar.gz?download))
88
105
  $(eval $(call archive-dl,OPTIPNG, http://prdownloads.sourceforge.net/optipng/optipng-[VER].tar.gz?download))
89
106
  $(eval $(call archive-dl,PNGCRUSH, http://prdownloads.sourceforge.net/pmt/pngcrush-[VER]-nolib.tar.gz?download))
90
- $(eval $(call archive,PNGQUANT))
91
-
92
- PNGQUANT_GIT := $(DL_DIR)/pngquant.git
93
- $(PNGQUANT_GIT) :; git clone --recursive https://github.com/kornelski/pngquant.git $@
94
- $(PNGQUANT_TGZ) : $(PNGQUANT_GIT)
95
- while ! mkdir $@.lock 2> /dev/null; do sleep 1; done
96
- cd $(PNGQUANT_GIT) && git fetch && git checkout -q $(PNGQUANT_VER) && git submodule -q update
97
- cd $(PNGQUANT_GIT) && $(tar) --exclude=.git -czf $(PNGQUANT_TGZ) .
98
- rm -r $@.lock
107
+ $(eval $(call archive-dl,PNGQUANT, http://pngquant.org/pngquant-[VER]-src.tar.gz))
99
108
 
100
109
  download : $(foreach archive,$(ARCHIVES),$($(archive)_TGZ))
101
110
  .PHONY : download
102
111
 
103
112
  download-tidy-up :
104
- rm -f $(filter-out $(foreach archive,$(ARCHIVES),$($(archive)_TGZ)) $(PNGQUANT_GIT),$(wildcard $(DL_DIR)/*.*))
113
+ rm -f $(filter-out $(foreach archive,$(ARCHIVES),$($(archive)_TGZ)),$(wildcard $(DL_DIR)/*.*))
105
114
  .PHONY : download-tidy-up
106
115
 
116
+ checksum : download
117
+ @$(sha256sum) $(foreach archive,$(ARCHIVES),$($(archive)_TGZ))
118
+ .PHONY : checksum
119
+
120
+ checksum-verify : download
121
+ @printf '%s %s\n' $(foreach archive,$(ARCHIVES),$($(archive)_SHA256) $($(archive)_TGZ)) | $(sha256sum) -c
122
+ .PHONY : checksum
123
+
107
124
  # ====== PRODUCTS ======
108
125
 
109
126
  PRODUCTS :=
@@ -168,6 +185,9 @@ else
168
185
  ldd := ldd
169
186
  endif
170
187
 
188
+ ldd-version :; $(ldd) --version
189
+ .PHONY : ldd-version
190
+
171
191
  define check_exists
172
192
  @test -f $(OUTPUT_DIR)/$1 || \
173
193
  { printf "$1: $(ANSI_RED)not found$(ANSI_RESET)\n"; exit 1; }
data/Vagrantfile CHANGED
@@ -17,8 +17,8 @@ Vagrant.configure('2') do |config|
17
17
  config.vm.synced_folder '.', '/vagrant', disabled: true
18
18
 
19
19
  {
20
- 'linux-x86_64' => 'ubuntu/trusty64',
21
- 'linux-i686' => 'ubuntu/trusty32',
20
+ 'linux-x86_64' => 'boxes/centos-amd64.box',
21
+ 'linux-i686' => 'boxes/centos-i386.box',
22
22
  'freebsd-amd64' => 'boxes/freebsd-amd64.box',
23
23
  'freebsd-i386' => 'boxes/freebsd-i386.box',
24
24
  'openbsd-amd64' => 'boxes/openbsd-amd64.box',
@@ -32,7 +32,12 @@ Vagrant.configure('2') do |config|
32
32
  when /^linux/
33
33
  <<-SH
34
34
  set -ex
35
- apt-get -y install rsync ntpdate make wget gcc g++ chrpath perl pkg-config autoconf automake libtool nasm
35
+ if command -v apt-get; then
36
+ apt-get update
37
+ apt-get -y install rsync ntpdate make wget gcc g++ chrpath perl pkg-config autoconf automake libtool nasm
38
+ else
39
+ yum -y install rsync ntpdate make wget gcc gcc-c++ chrpath perl pkg-config autoconf automake libtool nasm
40
+ fi
36
41
  SH
37
42
  when /^freebsd/
38
43
  <<-SH
@@ -0,0 +1,30 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1',
3
+ :memory_size => '512',
4
+ :disk_size => '8192',
5
+ :disk_format => 'VDI',
6
+ :hostiocache => 'off',
7
+ :os_type_id => 'RedHat6_64',
8
+ :iso_file => 'CentOS-6.9-x86_64-minimal.iso',
9
+ :iso_src => 'http://artfiles.org/centos.org/6.9/isos/x86_64/CentOS-6.9-x86_64-minimal.iso',
10
+ :iso_sha256 => '422af57b493b8af49d485885a730c5a1d955f803fac85aa51311c393168b9080',
11
+ :iso_download_timeout => '1000',
12
+ :boot_wait => '10',
13
+ :boot_cmd_sequence => [
14
+ '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>',
15
+ ],
16
+ :kickstart_port => '7122',
17
+ :kickstart_timeout => '300',
18
+ :kickstart_file => 'ks.cfg',
19
+ :ssh_login_timeout => '10000',
20
+ :ssh_user => 'veewee',
21
+ :ssh_password => 'veewee',
22
+ :ssh_key => '',
23
+ :ssh_host_port => '7222',
24
+ :ssh_guest_port => '22',
25
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
26
+ :shutdown_cmd => '/sbin/halt -h -p',
27
+ :postinstall_files => %w[../centos-postinstall.sh],
28
+ :postinstall_timeout => '10000',
29
+ :skip_iso_transfer => true,
30
+ })
@@ -0,0 +1,37 @@
1
+ install
2
+ cdrom
3
+ lang en_US.UTF-8
4
+ keyboard us
5
+ network --bootproto=dhcp
6
+ rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/
7
+ firewall --enabled --service=ssh
8
+ authconfig --enableshadow --passalgo=sha512
9
+ selinux --disabled
10
+ timezone UTC
11
+ bootloader --location=mbr
12
+
13
+ text
14
+ skipx
15
+ zerombr
16
+
17
+ clearpart --all --initlabel
18
+ autopart
19
+
20
+ auth --useshadow --enablemd5
21
+ firstboot --disabled
22
+ reboot
23
+
24
+ %packages --nobase
25
+ @core
26
+ openssh-clients
27
+ %end
28
+
29
+ %post
30
+ /usr/bin/yum -y install sudo
31
+ /usr/sbin/groupadd veewee
32
+ /usr/sbin/useradd veewee -g veewee -G wheel
33
+ echo "veewee"|passwd --stdin veewee
34
+ echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/veewee
35
+ chmod 0440 /etc/sudoers.d/veewee
36
+ %end
37
+
@@ -0,0 +1,30 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1',
3
+ :memory_size => '512',
4
+ :disk_size => '8192',
5
+ :disk_format => 'VDI',
6
+ :hostiocache => 'off',
7
+ :os_type_id => 'RedHat',
8
+ :iso_file => 'CentOS-6.9-i386-minimal.iso',
9
+ :iso_src => 'http://artfiles.org/centos.org/6.9/isos/i386/CentOS-6.9-i386-minimal.iso',
10
+ :iso_sha256 => 'e104b3bc2261e40c020e4047d31a4454a00435787c54fb0a376261f9348382b7',
11
+ :iso_download_timeout => '1000',
12
+ :boot_wait => '10',
13
+ :boot_cmd_sequence => [
14
+ '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>',
15
+ ],
16
+ :kickstart_port => '7122',
17
+ :kickstart_timeout => '300',
18
+ :kickstart_file => 'ks.cfg',
19
+ :ssh_login_timeout => '10000',
20
+ :ssh_user => 'veewee',
21
+ :ssh_password => 'veewee',
22
+ :ssh_key => '',
23
+ :ssh_host_port => '7222',
24
+ :ssh_guest_port => '22',
25
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
26
+ :shutdown_cmd => '/sbin/halt -h -p',
27
+ :postinstall_files => %w[../centos-postinstall.sh],
28
+ :postinstall_timeout => '10000',
29
+ :skip_iso_transfer => true,
30
+ })
@@ -0,0 +1,37 @@
1
+ install
2
+ cdrom
3
+ lang en_US.UTF-8
4
+ keyboard us
5
+ network --bootproto=dhcp
6
+ rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/
7
+ firewall --enabled --service=ssh
8
+ authconfig --enableshadow --passalgo=sha512
9
+ selinux --disabled
10
+ timezone UTC
11
+ bootloader --location=mbr
12
+
13
+ text
14
+ skipx
15
+ zerombr
16
+
17
+ clearpart --all --initlabel
18
+ autopart
19
+
20
+ auth --useshadow --enablemd5
21
+ firstboot --disabled
22
+ reboot
23
+
24
+ %packages --nobase
25
+ @core
26
+ openssh-clients
27
+ %end
28
+
29
+ %post
30
+ /usr/bin/yum -y install sudo
31
+ /usr/sbin/groupadd veewee
32
+ /usr/sbin/useradd veewee -g veewee -G wheel
33
+ echo "veewee"|passwd --stdin veewee
34
+ echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/veewee
35
+ chmod 0440 /etc/sudoers.d/veewee
36
+ %end
37
+
@@ -0,0 +1,33 @@
1
+ set -ex
2
+
3
+ sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
4
+
5
+ yum -y install wget
6
+
7
+ # Make ssh faster by not waiting on DNS
8
+ echo "UseDNS no" >> /etc/ssh/sshd_config
9
+
10
+ # Vagrant specific
11
+ date > /etc/vagrant_box_build_time
12
+
13
+ # Add vagrant user
14
+ /usr/sbin/groupadd vagrant
15
+ /usr/sbin/useradd vagrant -g vagrant -G wheel
16
+ echo "vagrant"|passwd --stdin vagrant
17
+ echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
18
+ chmod 0440 /etc/sudoers.d/vagrant
19
+
20
+ # Installing vagrant keys
21
+ mkdir -pm 700 /home/vagrant/.ssh
22
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
23
+ chmod 0600 /home/vagrant/.ssh/authorized_keys
24
+ chown -R vagrant /home/vagrant/.ssh
25
+
26
+ yum -y clean all
27
+
28
+ # Remove traces of mac address from network configuration
29
+ sed -i /HWADDR/d /etc/sysconfig/network-scripts/ifcfg-eth0
30
+ rm /etc/udev/rules.d/70-persistent-net.rules
31
+
32
+ # Zero out the free space to save space in the final image
33
+ dd if=/dev/zero of=/filler bs=1M || rm /filler
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'image_optim_pack'
5
- s.version = '0.5.0.20180605'
5
+ s.version = '0.5.1'
6
6
  s.summary = %q{Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegtran, optipng, pngcrush, pngquant}
7
7
  s.homepage = "http://github.com/toy/#{s.name}"
8
8
  s.authors = ['Ivan Kuchin']
data/script/livecheck CHANGED
@@ -203,5 +203,5 @@ pngcrush:
203
203
  url: https://sourceforge.net/projects/pmt/rss?path=/pngcrush
204
204
  regexp: /pngcrush/(\d+(?:\.\d+)*)/
205
205
  pngquant:
206
- url: https://github.com/kornelski/pngquant/releases.atom
207
- regexp: /kornelski/pngquant/releases/tag/(\d+(?:\.\d+)*)
206
+ url: https://pngquant.org/releases.html
207
+ regexp: <span itemprop='version'>(\d+(?:\.\d+)*)</span>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_optim_pack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.20180605
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Kuchin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-05 00:00:00.000000000 Z
11
+ date: 2018-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: image_optim
@@ -114,6 +114,11 @@ files:
114
114
  - boxes/.rubocop.yml
115
115
  - boxes/Gemfile
116
116
  - boxes/Rakefile
117
+ - boxes/definitions/centos-amd64/definition.rb
118
+ - boxes/definitions/centos-amd64/ks.cfg
119
+ - boxes/definitions/centos-i386/definition.rb
120
+ - boxes/definitions/centos-i386/ks.cfg
121
+ - boxes/definitions/centos-postinstall.sh
117
122
  - boxes/definitions/freebsd-amd64/definition.rb
118
123
  - boxes/definitions/freebsd-amd64/install.sh
119
124
  - boxes/definitions/freebsd-i386/definition.rb