Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/redmine: version bump to 3.0.5

From: Markus M. May <triplem_at_javafreedom.org>
Date: Mon, 12 Oct 2015 22:06:27 +0200

bump all necessary requirements
---
 testing/redmine/APKBUILD              | 109 ++++++++++++++++++++++++++++++++++
 testing/redmine/database.yml.patch    |  70 ++++++++++++++++++++++
 testing/redmine/gemfile.patch         |  37 ++++++++++++
 testing/redmine/gemfile.patch.orig    |  46 ++++++++++++++
 testing/redmine/redmine.post-install  |  29 +++++++++
 testing/redmine/redmine.pre-install   |   7 +++
 testing/ruby-jquery-rails4.2/APKBUILD |  37 ++++++++++++
 testing/ruby-rbpdf/APKBUILD           |  45 ++++++++++++++
 testing/ruby-redcarpet/APKBUILD       |  46 ++++++++++++++
 9 files changed, 426 insertions(+)
 create mode 100644 testing/redmine/APKBUILD
 create mode 100644 testing/redmine/database.yml.patch
 create mode 100644 testing/redmine/gemfile.patch
 create mode 100644 testing/redmine/gemfile.patch.orig
 create mode 100644 testing/redmine/redmine.post-install
 create mode 100644 testing/redmine/redmine.pre-install
 create mode 100644 testing/ruby-jquery-rails4.2/APKBUILD
 create mode 100644 testing/ruby-rbpdf/APKBUILD
 create mode 100644 testing/ruby-redcarpet/APKBUILD
diff --git a/testing/redmine/APKBUILD b/testing/redmine/APKBUILD
new file mode 100644
index 0000000..9649a88
--- /dev/null
+++ b/testing/redmine/APKBUILD
_at_@ -0,0 +1,109 @@
+# Contributor: Carlo Landmeter <clandmeter_at_gmail.com>
+# Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
+_railsver=4.2
+pkgname=redmine
+pkgver=3.0.5
+pkgrel=0
+pkgdesc="Project management web application written in Ruby"
+url="http://redmine.org"
+arch="noarch"
+license="GPL2"
+depends="ruby
+	ruby-actionpack-action_caching${_railsver}
+	ruby-actionpack-xml_parser${_railsver}
+	ruby-bigdecimal
+	ruby-coderay
+	ruby-fastercsv
+	ruby-i18n
+	ruby-jquery-rails${_railsver}
+	ruby-json
+	ruby-mocha
+	ruby-net-ldap<0.4
+	ruby-openid<2.4
+	ruby-rack
+	ruby-rack-openid
+	ruby-rails${_railsver}
+	ruby-rbpdf
+	ruby-rdoc
+	ruby-redcarpet
+	ruby-request_store
+	ruby-rmagick
+	ruby-protected_attributes${_railsver}
+	"
+depends_dev=ruby-io-console
+makedepends="$depends_dev"
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages=""
+pkgusers="$pkgname"
+pkggroups="$pkgname www-data"
+source="http://www.redmine.org/releases/redmine-$pkgver.tar.gz
+	gemfile.patch
+	database.yml.patch
+	"
+_webapps="usr/share/webapps"
+
+_builddir="$srcdir"/redmine-$pkgver
+
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	# verify that all deps are installed
+	if ! bundler check; then
+		bundler list
+		return 1
+	fi
+}
+
+package() {
+	cd "$_builddir"
+	# create dirs
+	mkdir -p "$pkgdir/$_webapps/$pkgname" "$pkgdir"/etc/redmine \
+		|| return 1
+	install -o redmine -g www-data -m775 -d \
+		"$pkgdir"/var/lib/redmine "$pkgdir"/var/log/redmine \
+		|| return 1
+
+	# move config files
+	for i in database.yml.example configuration.yml.example \
+			additional_environment.rb.example routes.rb; do
+		mv config/${i} "$pkgdir"/etc/redmine/${i%.example} || return 1
+		ln -s /etc/redmine/${i%.example} config/${i%.example} \
+			|| return 1
+	done
+
+	# writeable data dirs
+	for i in db files tmp public/plugin_assets; do
+		chown redmine:www-data $i || return 1
+		chmod 775 $i || return 1
+		mv $i "$pkgdir"/var/lib/redmine/ || return 1
+		ln -s /var/lib/redmine/${i#*/} $i || return 1
+	done
+	chown redmine Gemfile.lock || return 1
+
+	# the secret token is generated by post-install
+	ln -s /var/lib/redmine/secret_token.rb config/initializers/
+
+	# log dir
+	rm -r log && ln -s /var/log/redmine log || return 1
+
+	mv * "$pkgdir/$_webapps/$pkgname" || return 1
+}
+
+md5sums="c3ef69ee258239a53cd69ddc6a99754a  redmine-3.0.5.tar.gz
+a80146b41b912f248140e616154073f6  gemfile.patch
+d834bef9b5f01484f1e0ee82676f4109  database.yml.patch"
+sha256sums="32b80317b366439be7125a0e3359349fbbe7c7e906c90f3fa08228f03091d74c  redmine-3.0.5.tar.gz
+d9d94fcb696aed05b308114c0b053f878918e3d2dbd12e5ee0b46c041bd18bcd  gemfile.patch
+28b1ec099ae87c43d00d7e997edabaece01d6fc2e67b46c50735e9a1bb72f130  database.yml.patch"
+sha512sums="9119029b4949bf821d1d5e8aa2177eecf1caee6a7493af77f8cb100b54b81a29b1561ae5ce509a1bdf3c219a8935600a462765c149cff121fc26a91a842d44b1  redmine-3.0.5.tar.gz
+9f3be9039f9c576b56d77e3e3f477fe16fdd5d0f8b8b1bb3722cad1aff669f2ee65c308d27ec8c25300b4a3991b65fcf9d4d127abd0542477f1dd8f5af82d7ee  gemfile.patch
+1b5880979f050a71d726c844369cc5340a8d4aa0b59b2301e1d32dea28f70ca2a85e619c8b845c37de08772154eef13fa63716c1beaaa50d97b80fd65c297bf9  database.yml.patch"
diff --git a/testing/redmine/database.yml.patch b/testing/redmine/database.yml.patch
new file mode 100644
index 0000000..400c4be
--- /dev/null
+++ b/testing/redmine/database.yml.patch
_at_@ -0,0 +1,70 @@
+--- ./config/database.yml.example.orig
++++ ./config/database.yml.example
+_at_@ -2,32 +2,32 @@
+ # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
+ # Line indentation must be 2 spaces (no tabs).
+ 
+-production:
+-  adapter: mysql2
+-  database: redmine
+-  host: localhost
+-  username: root
+-  password: ""
+-  encoding: utf8
++#production:
++#  adapter: mysql2
++#  database: redmine
++#  host: localhost
++#  username: root
++#  password: ""
++#  encoding: utf8
++#
++#development:
++#  adapter: mysql2
++#  database: redmine_development
++#  host: localhost
++#  username: root
++#  password: ""
++#  encoding: utf8
+ 
+-development:
+-  adapter: mysql2
+-  database: redmine_development
+-  host: localhost
+-  username: root
+-  password: ""
+-  encoding: utf8
+-
+ # Warning: The database defined as "test" will be erased and
+ # re-generated from your development database when you run "rake".
+ # Do not set this db to the same as development or production.
+-test:
+-  adapter: mysql2
+-  database: redmine_test
+-  host: localhost
+-  username: root
+-  password: ""
+-  encoding: utf8
++#test:
++#  adapter: mysql2
++#  database: redmine_test
++#  host: localhost
++#  username: root
++#  password: ""
++#  encoding: utf8
+ 
+ # PostgreSQL configuration example
+ #production:
+_at_@ -38,9 +38,9 @@
+ #  password: "postgres"
+ 
+ # SQLite3 configuration example
+-#production:
+-#  adapter: sqlite3
+-#  database: db/redmine.sqlite3
++production:
++  adapter: sqlite3
++  database: /var/lib/redmine/db.sqlite3
+ 
+ # SQL Server configuration example
+ #production:
diff --git a/testing/redmine/gemfile.patch b/testing/redmine/gemfile.patch
new file mode 100644
index 0000000..ed86389
--- /dev/null
+++ b/testing/redmine/gemfile.patch
_at_@ -0,0 +1,37 @@
+
+--- ./Gemfile.orig
++++ ./Gemfile
+_at_@ -8,7 +8,7 @@
+ gem "jquery-rails", "~> 3.1.3"
+ gem "coderay", "~> 1.1.0"
+ gem "builder", ">= 3.0.4"
+-gem "request_store", "1.0.5"
++gem "request_store", "~>1.0.5"
+ gem "mime-types"
+ gem "protected_attributes"
+ gem "actionpack-action_caching"
+_at_@ -86,17 +86,17 @@
+ 
+ group :development do
+   gem "rdoc", ">= 2.4.2"
+-  gem "yard"
++#  gem "yard"
+ end
+ 
+ group :test do
+-  gem "minitest"
+-  gem "rails-dom-testing"
+-  gem "mocha"
+-  gem "simplecov", "~> 0.9.1", :require => false
++#  gem "minitest"
++#  gem "rails-dom-testing"
++#  gem "mocha"
++#  gem "simplecov", "~> 0.9.1", :require => false
+   # For running UI tests
+-  gem "capybara"
+-  gem "selenium-webdriver"
++#  gem "capybara"
++#  gem "selenium-webdriver"
+ end
+ 
+ local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
diff --git a/testing/redmine/gemfile.patch.orig b/testing/redmine/gemfile.patch.orig
new file mode 100644
index 0000000..9b4fb9a
--- /dev/null
+++ b/testing/redmine/gemfile.patch.orig
_at_@ -0,0 +1,46 @@
+bundler cannot exclude the test and development groups so we patch those out
+
+--- ./Gemfile.orig
++++ ./Gemfile
+_at_@ -4,11 +4,11 @@
+   abort "Redmine requires Bundler 1.5.0 or higher (you're using #{Bundler::VERSION}).\nPlease update with 'gem update bundler'." 
+ end
+ 
+-gem "rails", "4.2.0"
++gem "rails", "~> 4.2.0"
+ gem "jquery-rails", "~> 3.1.1"
+ gem "coderay", "~> 1.1.0"
+ gem "builder", ">= 3.0.4"
+-gem "request_store", "1.0.5"
++gem "request_store", "~> 1.0.5"
+ gem "mime-types"
+ gem "protected_attributes"
+ gem "actionpack-action_caching"
+_at_@ -85,19 +85,19 @@
+ 
+ group :development do
+   gem "rdoc", ">= 2.4.2"
+-  gem "yard"
++#  gem "yard"
+ end
+ 
+ group :test do
+-  gem "minitest"
+-  gem "rails-dom-testing"
+-  gem "mocha"
+-  gem "simplecov", "~> 0.9.1", :require => false
++#  gem "minitest"
++#  gem "rails-dom-testing"
++#  gem "mocha"
++#  gem "simplecov", "~> 0.9.1", :require => false
+   # For running UI tests
+-  gem "capybara"
+-  gem "selenium-webdriver"
++#  gem "capybara"
++#  gem "selenium-webdriver"
+   # building ffi 1.9.7 fails in Ubuntu: https://github.com/ffi/ffi/issues/414
+-  gem "ffi", "1.9.6"
++#  gem "ffi", "1.9.6"
+ end
+ 
+ local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
diff --git a/testing/redmine/redmine.post-install b/testing/redmine/redmine.post-install
new file mode 100644
index 0000000..f68632c
--- /dev/null
+++ b/testing/redmine/redmine.post-install
_at_@ -0,0 +1,29 @@
+#!/bin/sh
+
+tokenfile=/var/lib/redmine/secret_token.rb
+if [ -e $tokenfile ]; then
+	exit 0
+fi
+
+if [ -e /dev/urandom ] && [ -x /usr/bin/hexdump ]; then
+	token=$(/usr/bin/hexdump -n 32 -v -e '/1 "%02x"' /dev/urandom)
+else
+	token=$(for i in $(seq 0 31); do echo $RANDOM; done | sha1sum | awk '{print $1}')
+fi
+
+umask 027
+cat >$tokenfile<<EOF
+# This file was generated by redmine apk post-install script, and should
+# not be made visible to public.
+# If you have a load-balancing Redmine cluster, you will need to use the
+# same version of this file on each machine. And be sure to restart your
+# server when you modify this file.
+#
+# Your secret key for verifying cookie session data integrity. If you
+# change this key, all old sessions will become invalid! Make sure the
+# secret is at least 30 characters and all random, no regular words or
+# you'll be exposed to dictionary attacks.
+RedmineApp::Application.config.secret_key_base = '$token'
+EOF
+
+chgrp www-data $tokenfile
diff --git a/testing/redmine/redmine.pre-install b/testing/redmine/redmine.pre-install
new file mode 100644
index 0000000..780b89f
--- /dev/null
+++ b/testing/redmine/redmine.pre-install
_at_@ -0,0 +1,7 @@
+#!/bin/sh
+
+addgroup -g 82 -S www-data 2>/dev/null
+adduser -S -H -h /usr/share/webapps/redmine -s /bin/sh -D redmine 2>/dev/null
+addgroup redmine www-data 2>/dev/null
+
+exit 0
diff --git a/testing/ruby-jquery-rails4.2/APKBUILD b/testing/ruby-jquery-rails4.2/APKBUILD
new file mode 100644
index 0000000..4a502d4
--- /dev/null
+++ b/testing/ruby-jquery-rails4.2/APKBUILD
_at_@ -0,0 +1,37 @@
+# Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
+_gemname=jquery-rails
+pkgname=ruby-${_gemname}4.2
+pkgver=3.1.3
+pkgrel=0
+pkgdesc="jQuery and the jQuery-ujs driver for Rails 4.2"
+url="http://rubygems.org/gems/jquery-rails"
+arch="noarch"
+license="MIT"
+depends="ruby ruby-railties4.2 ruby-thor"
+depends_dev=
+makedepends="$depends_dev ruby"
+install=""
+subpackages=""
+source="http://gems.rubyforge.org/gems/$_gemname-$pkgver.gem"
+
+_builddir="$srcdir"/$_realname-$pkgver
+build() {
+	return 0
+}
+
+package() {
+	local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
+	local _geminstdir=$_gemdir/gems/$_gemname-$pkgver
+	mkdir -p "$pkgdir" || return 1
+
+	gem install --local --install-dir "$pkgdir"/$_gemdir \
+		--ignore-dependencies --verbose --no-rdoc --no-ri \
+		"$srcdir"/$_gemname-$pkgver.gem || return 1
+	rm -rf "$pkgdir"/$_gemdir/cache \
+		"$pkgdir"/$_geminstdir/ext \
+		"$pkgdir"/$_geminstdir/.require_paths
+}
+
+md5sums="92916643c22ca2fc91e939247e61e62c  jquery-rails-3.1.3.gem"
+sha256sums="07b5b06c60464ea1d86b773eb77c146fc16ecbb6f336b99ee7c1d0d383cc07d8  jquery-rails-3.1.3.gem"
+sha512sums="e888eab43036f39335098047bab4c4c4019eccbf73f9eccf952a416dafd46750caa3f7ebd6102f4cee1f8997c585783cc8f77aee4378cda2e074e5291016fe77  jquery-rails-3.1.3.gem"
diff --git a/testing/ruby-rbpdf/APKBUILD b/testing/ruby-rbpdf/APKBUILD
new file mode 100644
index 0000000..8344272
--- /dev/null
+++ b/testing/ruby-rbpdf/APKBUILD
_at_@ -0,0 +1,45 @@
+# Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
+_gemname=rbpdf
+pkgname=ruby-$_gemname
+pkgver=1.18.6
+pkgrel=0
+pkgdesc="A template plugin allowing the inclusion of ERB-enabled RBPDF template files"
+url="https://rubygems.org/gems/rbpd"
+arch="noarch"
+license="MIT"
+depends="ruby"
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://gems.rubyforge.org/gems/$_gemname-$pkgver.gem"
+
+_builddir="$srcdir"/$_realname-$pkgver
+build() {
+	return 0
+}
+
+package() {
+	local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
+	local _geminstdir=$_gemdir/gems/$_gemname-$pkgver
+	mkdir -p "$pkgdir" || return 1
+
+	gem install --local --install-dir "$pkgdir"/$_gemdir \
+		--ignore-dependencies --verbose --no-rdoc --no-ri \
+		"$srcdir"/$_gemname-$pkgver.gem || return 1
+	rm -rf "$pkgdir"/$_gemdir/cache \
+		"$pkgdir"/$_geminstdir/ext \
+		"$pkgdir"/$_geminstdir/.require_paths
+	
+	cd "$pkgdir"
+	for i in usr/lib/ruby/gems/*/bin/*; do
+		if [ -e "$i" ]; then
+			mkdir -p "$pkgdir"/usr/bin
+			ln -s /$i "$pkgdir"/usr/bin/
+		fi
+	done
+}
+
+md5sums="de6a33865a47b7673bce91062f85f3fc  rbpdf-1.18.6.gem"
+sha256sums="d5d1e30ad1465bea5b3c1809cf2789c6795dafbfba6c2cab40c628989229b650  rbpdf-1.18.6.gem"
+sha512sums="a2c30082211d4b170c7cfea72f839541364d7e6b9da29b33a489a5900f63f2cc6ccb85c099ba2f090eec96c79c50026195f9a4a03c04274eea691188271b839b  rbpdf-1.18.6.gem"
diff --git a/testing/ruby-redcarpet/APKBUILD b/testing/ruby-redcarpet/APKBUILD
new file mode 100644
index 0000000..8b1e311
--- /dev/null
+++ b/testing/ruby-redcarpet/APKBUILD
_at_@ -0,0 +1,46 @@
+# Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
+_gemname=redcarpet
+pkgname=ruby-$_gemname
+# redmine 3.0.5 needs ~> 3.3.2
+pkgver=3.3.2
+pkgrel=0
+pkgdesc="A fast, safe and extensible Markdown to (X)HTML parser"
+url="http://github.com/vmg/redcarpet"
+arch="all"
+license="MIT"
+depends="ruby"
+depends_dev=
+makedepends="$depends_dev ruby-dev"
+install=""
+subpackages=""
+source="http://gems.rubyforge.org/gems/$_gemname-$pkgver.gem"
+
+_builddir="$srcdir"/$_realname-$pkgver
+build() {
+	return 0
+}
+
+package() {
+	local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
+	local _geminstdir=$_gemdir/gems/$_gemname-$pkgver
+	mkdir -p "$pkgdir" || return 1
+
+	gem install --local --install-dir "$pkgdir"/$_gemdir \
+		--ignore-dependencies --verbose --no-rdoc --no-ri \
+		"$srcdir"/$_gemname-$pkgver.gem || return 1
+	rm -rf "$pkgdir"/$_gemdir/cache \
+		"$pkgdir"/$_geminstdir/ext \
+		"$pkgdir"/$_geminstdir/.require_paths
+	
+	cd "$pkgdir"
+	for i in usr/lib/ruby/gems/*/bin/*; do
+		if [ -e "$i" ]; then
+			mkdir -p "$pkgdir"/usr/bin
+			ln -s /$i "$pkgdir"/usr/bin/
+		fi
+	done
+}
+
+md5sums="048b42d499b37c6dd02f2e438758f9b0  redcarpet-3.3.2.gem"
+sha256sums="d5e66126a19f09f5334bd257d53ace49dcca251d6e59f9254cfb49c4b22dc9f5  redcarpet-3.3.2.gem"
+sha512sums="625855e7d0cf92096afd013e9c4f2fac308d4885c31a5c54450a88a88ec4a887b7dfc23f24a090ee4e3b94482173fcd2d98e5046216d367b6f36a126064add90  redcarpet-3.3.2.gem"
-- 
2.4.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Oct 12 2015 - 22:06:27 GMT