diff options
Diffstat (limited to 'main/redmine')
-rw-r--r-- | main/redmine/APKBUILD | 74 | ||||
-rw-r--r-- | main/redmine/additional_environment.rb | 17 | ||||
-rw-r--r-- | main/redmine/configuration.yml | 140 | ||||
-rw-r--r-- | main/redmine/database.yml | 14 | ||||
-rw-r--r-- | main/redmine/database.yml.patch | 70 |
5 files changed, 103 insertions, 212 deletions
diff --git a/main/redmine/APKBUILD b/main/redmine/APKBUILD index b37fe7cfcf..4c99251f86 100644 --- a/main/redmine/APKBUILD +++ b/main/redmine/APKBUILD @@ -3,7 +3,7 @@ _railsver=4.2 pkgname=redmine pkgver=3.0.1 -pkgrel=2 +pkgrel=3 pkgdesc="Project management web application written in Ruby" url="http://redmine.org" arch="noarch" @@ -37,12 +37,11 @@ makedepends="$depends_dev install="$pkgname.pre-install" subpackages="" pkgusers="$pkgname" -pkggroups="$pkgname" +pkggroups="$pkgname www-data" source="http://www.redmine.org/releases/redmine-$pkgver.tar.gz gemfile.patch - additional_environment.rb - configuration.yml - database.yml" + database.yml.patch + " _webapps="usr/share/webapps" _builddir="$srcdir"/redmine-$pkgver @@ -68,47 +67,40 @@ build() { package() { cd "$_builddir" - # move app to webapps dir - mkdir -p "$pkgdir/$_webapps/$pkgname" - mv * "$pkgdir/$_webapps/$pkgname" - # install default config to /etc/redmine - install -g $pkggroups -m640 -D "$srcdir"/database.yml \ - "$pkgdir"/etc/redmine/database.yml - install -g $pkggroups -m644 -D "$srcdir"/configuration.yml \ - "$pkgdir"/etc/redmine/configuration.yml - install -g $pkggroups -m644 -D "$srcdir"/additional_environment.rb \ - "$pkgdir"/etc/redmine/additional_environment.rb - cd "$pkgdir/$_webapps/$pkgname"/config - # link config to webapps dir - ln -s /etc/redmine/database.yml - ln -s /etc/redmine/configuration.yml - ln -s /etc/redmine/additional_environment.rb - cd "$pkgdir/$_webapps/$pkgname" - mkdir -p tmp tmp/pdf public/plugin_assets \ - "$pkgdir"/var/log - chmod -R 755 files log tmp public/plugin_assets - # move redmine log to /var/log - mv log "$pkgdir"/var/log/$pkgname - # symlink logs to var log - ln -s /var/log/redmine log - # set correct permissions - chown -R $pkgusers:$pkggroups \ - "$pkgdir/$_webapps/$pkgname" \ - "$pkgdir"/var/log/"$pkgname" + # 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 || return 1 + done + + # writeable data dirs + for i in 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 + + # log dir + rm -r log && ln -s /var/log/redmine log || return 1 + + mv * "$pkgdir/$_webapps/$pkgname" || return 1 } md5sums="bf63ceef4fde0d38d17d94969478d422 redmine-3.0.1.tar.gz 6115e9c82b7af28cb6849a1f8ad55c0d gemfile.patch -06fa866e699a6f867603f886be3a5eea additional_environment.rb -7347eb8fa89144c8a0ca292702203803 configuration.yml -05e17d7ca4a268b7ab7d3b6a9f5f3fcb database.yml" +d834bef9b5f01484f1e0ee82676f4109 database.yml.patch" sha256sums="9b701ff471bf1d9c9fd671e6a3d3c426850df5411a73f891f49c2cd79d489d5a redmine-3.0.1.tar.gz 3dce0dccce0931e26d81546ba2c87b776da92a1e532e560f18b2355e378c92a0 gemfile.patch -fc151100cad99bec40cd57eefcf05917b760cd1d189609b0da3c2454916363e0 additional_environment.rb -5f17d5f2e37b4487c44154b2f212811d3a52fa1b7a0bcc9664e3caac80aa887c configuration.yml -243bf7ec026af6d158706f9275d40fd046a6038200664b9329fba25b4697816f database.yml" +28b1ec099ae87c43d00d7e997edabaece01d6fc2e67b46c50735e9a1bb72f130 database.yml.patch" sha512sums="689e8625197b4668bc06c68b0502a23e50675ad13d17a67a25cb51d68b1ac15ff4395783003ce696994bd15191139adde6bc21add0b81b4a40e9979e95753e18 redmine-3.0.1.tar.gz 5cd897dd296c4f89500bb607f2e0898e0af8ec10292f23d16dbb9ea686d10a6bd2b1a9bfdec2aa722461a02ae73ba5160115e5d9ec78031387c7c337eba56ede gemfile.patch -0ac637c140ace5760067917db755a65add5362a8fbda87bdbe17c1f39c46861ecfbe096fe5d4e9ff2525d325ebd46ca995049f9cb326e376cc9074843bd0051a additional_environment.rb -a62ac016fc3e58db7db453bdb779cd0d542a610cf7d1be2fdb07d39a1531c558d81af3d91adafffee28311387b65079faf3ee3bc9c14dd12ceb5bac83254fdbd configuration.yml -a6a52d469ce390331124908bad650c190236b86439f7e38bfc2ff738c82182915ad4c35365533f6eed1216a47ef0f3fe7185e5a4107f6e7c8646222804743112 database.yml" +1b5880979f050a71d726c844369cc5340a8d4aa0b59b2301e1d32dea28f70ca2a85e619c8b845c37de08772154eef13fa63716c1beaaa50d97b80fd65c297bf9 database.yml.patch" diff --git a/main/redmine/additional_environment.rb b/main/redmine/additional_environment.rb deleted file mode 100644 index e64b2f8e12..0000000000 --- a/main/redmine/additional_environment.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Copy this file to additional_environment.rb and add any statements -# that need to be passed to the Rails::Initializer. `config` is -# available in this context. -# -# Example: -# -# config.log_level = :debug -# config.gem "example_plugin", :lib => false -# config.gem "timesheet_plugin", :lib => false, :version => '0.5.0' -# config.gem "aws-s3", :lib => "aws/s3" -# ... -# - -config.log_path = "/var/log/redmine/redmine.log" -config.logger = Logger.new(config.log_path, 2, 1000000) -config.logger.level = Logger::WARN - diff --git a/main/redmine/configuration.yml b/main/redmine/configuration.yml deleted file mode 100644 index d5dfabb9a6..0000000000 --- a/main/redmine/configuration.yml +++ /dev/null @@ -1,140 +0,0 @@ -# = Redmine configuration file -# -# Each environment has it's own configuration options. If you are only -# running in production, only the production block needs to be configured. -# Environment specific configuration options override the default ones. -# -# Note that this file needs to be a valid YAML file. -# -# == Outgoing email settings (email_delivery setting) -# -# === Common configurations -# -# ==== Sendmail command -# -# production: -# email_delivery: -# delivery_method: :sendmail -# -# ==== Simple SMTP server at localhost -# -# production: -# email_delivery: -# delivery_method: :smtp -# smtp_settings: -# address: "localhost" -# port: 25 -# -# ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com -# -# production: -# email_delivery: -# delivery_method: :smtp -# smtp_settings: -# address: "example.com" -# port: 25 -# authentication: :login -# domain: 'foo.com' -# user_name: 'myaccount' -# password: 'password' -# -# ==== SMTP server at example.com using PLAIN authentication -# -# production: -# email_delivery: -# delivery_method: :smtp -# smtp_settings: -# address: "example.com" -# port: 25 -# authentication: :plain -# domain: 'example.com' -# user_name: 'myaccount' -# password: 'password' -# -# ==== SMTP server at using TLS (GMail) -# -# This requires some additional configuration. See the article at: -# http://redmineblog.com/articles/setup-redmine-to-send-email-using-gmail/ -# -# production: -# email_delivery: -# delivery_method: :smtp -# smtp_settings: -# tls: true -# address: "smtp.gmail.com" -# port: 587 -# domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps -# authentication: :plain -# user_name: "your_email@gmail.com" -# password: "your_password" -# -# -# === More configuration options -# -# See the "Configuration options" at the following website for a list of the -# full options allowed: -# -# http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer - - -# default configuration options for all environments -default: - # Outgoing emails configuration (see examples above) - email_delivery: - delivery_method: :sendmail - - # Absolute path to the directory where attachments are stored. - # The default is the 'files' directory in your Redmine instance. - # Your Redmine instance needs to have write permission on this - # directory. - # Examples: - # attachments_storage_path: /var/redmine/files - # attachments_storage_path: D:/redmine/files - attachments_storage_path: - - # Configuration of the autologin cookie. - # autologin_cookie_name: the name of the cookie (default: autologin) - # autologin_cookie_path: the cookie path (default: /) - # autologin_cookie_secure: true sets the cookie secure flag (default: false) - autologin_cookie_name: - autologin_cookie_path: - autologin_cookie_secure: - - # Configuration of SCM executable command. - # Absolute path (e.g. /usr/local/bin/hg) or command name (e.g. hg.exe, bzr.exe) - # On Windows, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work. - # Examples: - # scm_subversion_command: svn # (default: svn) - # scm_mercurial_command: C:\Program Files\TortoiseHg\hg.exe # (default: hg) - # scm_git_command: /usr/local/bin/git # (default: git) - # scm_cvs_command: cvs # (default: cvs) - # scm_bazaar_command: bzr.exe # (default: bzr) - # scm_darcs_command: darcs-1.0.9-i386-linux # (default: darcs) - scm_subversion_command: - scm_mercurial_command: - scm_git_command: - scm_cvs_command: - scm_bazaar_command: - scm_darcs_command: - - # Key used to encrypt sensitive data in the database (SCM and LDAP passwords). - # If you don't want to enable data encryption, just leave it blank. - # WARNING: losing/changing this key will make encrypted data unreadable. - # - # If you want to encrypt existing passwords in your database: - # * set the cipher key here in your configuration file - # * encrypt data using 'rake db:encrypt RAILS_ENV=production' - # - # If you have encrypted data and want to change this key, you have to: - # * decrypt data using 'rake db:decrypt RAILS_ENV=production' first - # * change the cipher key here in your configuration file - # * encrypt data using 'rake db:encrypt RAILS_ENV=production' - database_cipher_key: - -# specific configuration options for production environment -# that overrides the default ones -production: - -# specific configuration options for development environment -# that overrides the default ones -development: diff --git a/main/redmine/database.yml b/main/redmine/database.yml deleted file mode 100644 index 9e84da06cc..0000000000 --- a/main/redmine/database.yml +++ /dev/null @@ -1,14 +0,0 @@ -# MySQL (default setup). - -production: - adapter: mysql2 - database: redmine - host: localhost - username: root - password: - encoding: utf8 - -#production: -# adapter: sqlite3 -# database: /var/lib/redmine/redmine.db - diff --git a/main/redmine/database.yml.patch b/main/redmine/database.yml.patch new file mode 100644 index 0000000000..400c4be7b6 --- /dev/null +++ b/main/redmine/database.yml.patch @@ -0,0 +1,70 @@ +--- ./config/database.yml.example.orig ++++ ./config/database.yml.example +@@ -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: +@@ -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: |