Commit e07e1d76450c6ee62b9af41652b9faeb9a36fc12

Authored by Antonio Terceiro
0 parents
Exists in master and in 79 other branches add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup_not_prod, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, design_validation, dev_env_minimal, disable_email_dev, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_api, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, focus_search_field_theme, gov-user-refactoring, gov-user-refactoring-rails4, header_fix, institution_modal_on_rating, kalibro-conf-refactoring, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, prezento, refactor_download_block, refactor_software_communities, refactor_software_for_sisp, register_page, release-process, release-process-v2, remove-unused-images, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, removing_super_archives_email, review_message, scope2method, signals_user_noosfero, sisp_catalog_header, sisp_colab_config, sisp_dev, sisp_dev_master, sisp_simple_version, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_minimal_env, spb_to_rails4, spec_refactor, stable-4.1, stable-4.2, stable-4.x, temp_soft_comm_refactoring, theme_header, theme_javascript_refactory, thread_dropdown, thread_page, update_search_by_categories, update_software_api, update_softwares_boxes

initial spec

Showing 1 changed file with 107 additions and 0 deletions   Show diff stats
gitlab.spec 0 → 100644
  1 +++ a/gitlab.spec
@@ -0,0 +1,107 @@ @@ -0,0 +1,107 @@
  1 +%define pid_dir %{_localstatedir}/run/redis
  2 +%define pid_file %{pid_dir}/redis.pid
  3 +
  4 +Summary: gitlab
  5 +Name: gitlab
  6 +Version: 7.4
  7 +Release: 1
  8 +License: BSD
  9 +#Group: Applications/Multimedia
  10 +#URL: http://redis.io/
  11 +Source0: gitlab-%{version}.tar.gz
  12 +Source1: gitlab-ce-%{version}.tar.gz
  13 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  14 +Requires: nginx, postgresql-server, gitlab-deps
  15 +
  16 +BuildRequires: curl, zlib-devel, libyaml-devel, openssl-devel, libffi-devel, openssh-server, logrotate, libxml2-devel, libxslt-devel, readline-devel, ncurses-devel, libcurl-devel, python-docutils, gdbm-devel, gitlab-deps
  17 +
  18 +#Requires(post): /sbin/chkconfig /usr/sbin/useradd
  19 +#Requires(preun): /sbin/chkconfig, /sbin/service
  20 +#Requires(postun): /sbin/service
  21 +Provides: gitlab
  22 +%if 0%{?suse_version} >= 1210
  23 +BuildRequires: systemd
  24 +%endif
  25 +
  26 +
  27 +%description
  28 +
  29 +
  30 +%prep
  31 +echo "Fase de preparacao"
  32 +%setup
  33 +
  34 +%pre
  35 +adduser git
  36 +echo "Fase de pre"
  37 +service postgresql initdb
  38 +service postgresql start
  39 +sudo -u postgres psql -d template1 << EOF
  40 +CREATE USER git CREATEDB;
  41 +CREATE DATABASE gitlabhq_production OWNER git;
  42 +\q
  43 +EOF
  44 +
  45 +export PATH=$PATH:/usr/lib/gitlab/vendor/bundle/ruby/bin
  46 +
  47 +%build
  48 +
  49 +cp config/gitlab.yml.example config/gitlab.yml
  50 +cp config/unicorn.rb.example config/unicorn.rb
  51 +cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
  52 +cp config/database.yml.postgresql config/database.yml
  53 +
  54 +#bundle install --deployment --without development test mysql aws
  55 +
  56 +# Run the installation task for gitlab-shell (replace `REDIS_URL` if needed):
  57 +#bundle exec rake gitlab:shell:install REDIS_URL="redis://localhost:6379" RAILS_ENV=production
  58 +
  59 +# By default, the gitlab-shell config is generated from your main GitLab config.
  60 +# You can review (and modify) the gitlab-shell config as follows:
  61 +### vim /home/git/gitlab-shell/config.yml
  62 +
  63 +bundle exec rake gitlab:setup RAILS_ENV=production
  64 +bundle exec rake assets:precompile RAILS_ENV=production
  65 +
  66 +echo "\t\t\tFim da fase de build"
  67 +pwd
  68 +
  69 +%install
  70 +echo "#########Criando diretorio %{buildroot}%{_libdir}/gitlab"
  71 +mkdir -p %{buildroot}/usr/lib/gitlab/
  72 +cp -r . %{buildroot}/usr/lib/gitlab/
  73 +
  74 +
  75 +%post
  76 +
  77 +%preun
  78 +
  79 +%postun
  80 +
  81 +userdel git
  82 +
  83 +sudo -u postgres psql -d template1 << EOF
  84 +DROP DATABASE [ IF EXISTS ] gitlabhq_production;
  85 +DROP USER [ IF EXISTS ] git;
  86 +\q
  87 +EOF
  88 +
  89 +%clean
  90 +%{__rm} -rf %{buildroot}
  91 +
  92 +%files
  93 +/usr/lib/gitlab/
  94 +
  95 +#%defattr(-, root, root, 0755)
  96 +#%doc deps/lua/doc/*.html
  97 +#%{_sbindir}/redis-server
  98 +#%{_bindir}/redis-benchmark
  99 +#%{_bindir}/redis-cli
  100 +#%{_unitdir}/redis.service
  101 +#%config(noreplace) %{_sysconfdir}/redis.conf
  102 +#%{_sysconfdir}/logrotate.d/redis
  103 +#%dir %attr(0770,redis,redis) %{_localstatedir}/lib/redis
  104 +#%dir %attr(0755,redis,redis) %{_localstatedir}/log/redis
  105 +#%dir %attr(0755,redis,redis) %{_localstatedir}/run/redis
  106 +
  107 +%changelog