diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 7c292b59920782cf7d1bf38a782b584b2475fd40..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# passenger - -#### Description -Phusion Passenger application server - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index cf25b1813ba647267e0bbe3ce172257e83d02255..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# passenger - -#### 介绍 -Phusion Passenger application server - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/apache-passenger-module.conf b/apache-passenger-module.conf new file mode 100644 index 0000000000000000000000000000000000000000..daad2f83ae3ca006ffe5fd8990b086b5ec1ffcc3 --- /dev/null +++ b/apache-passenger-module.conf @@ -0,0 +1,3 @@ +### Begin automatically installed Phusion Passenger load snippet ### +LoadModule passenger_module modules/mod_passenger.so +### End automatically installed Phusion Passenger load snippet ### diff --git a/apache-passenger.conf.in b/apache-passenger.conf.in new file mode 100644 index 0000000000000000000000000000000000000000..9bab25ec56bbcf0717cf747529edced7a0b324e6 --- /dev/null +++ b/apache-passenger.conf.in @@ -0,0 +1,25 @@ +### Begin automatically installed Phusion Passenger config snippet ### + + PassengerRoot @PASSENGERROOT@ + PassengerRuby /usr/bin/ruby + PassengerInstanceRegistryDir /var/run/passenger-instreg + +### End automatically installed Phusion Passenger config snippet ### + +# Deploying a web application: an example + +# Suppose you have a web application in /somewhere. Add a virtual host to +# your Apache configuration file and set its DocumentRoot to /somewhere/public: +# +# +# ServerName www.yourhost.com +# # Be sure to point to 'public'! +# DocumentRoot /somewhere/public +# +# # Relax Apache security settings +# AllowOverride all +# Require all granted +# # MultiViews must be turned off +# Options -MultiViews +# +# diff --git a/passenger-6.0.4-1.epel8.playground.src.rpm b/passenger-6.0.4-1.epel8.playground.src.rpm new file mode 100644 index 0000000000000000000000000000000000000000..c3d6efeef364060ae645941b73dc5318016145e2 Binary files /dev/null and b/passenger-6.0.4-1.epel8.playground.src.rpm differ diff --git a/passenger-6.0.4.tar.gz b/passenger-6.0.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..afa9b5dcc8335c9f7042d9c5112b45fd2264aa94 Binary files /dev/null and b/passenger-6.0.4.tar.gz differ diff --git a/passenger-selinux.te b/passenger-selinux.te new file mode 100644 index 0000000000000000000000000000000000000000..5ce1568fcd922e319c6fdce62ae67e31ba2cf6b8 --- /dev/null +++ b/passenger-selinux.te @@ -0,0 +1,75 @@ + +module myapp 1.0; + +require { + type httpd_t; + type fixed_disk_device_t; + type http_port_t; + type httpd_tmp_t; + type httpd_sys_script_exec_t; + type rpm_var_lib_t; + type configfs_t; + type user_tmp_t; + type usr_t; + type postgresql_port_t; + type init_t; + type httpd_sys_content_t; + class capability { fowner fsetid sys_ptrace sys_resource }; + class process ptrace; + class tcp_socket name_connect; + class blk_file getattr; + class dir { add_name create getattr read remove_name rmdir write }; + class sock_file getattr; + class fifo_file { append create getattr ioctl open read setattr unlink write }; + class file { append create map rename setattr unlink write }; +} + +#============= httpd_t ============== + +#!!!! This avc is allowed in the current policy +allow httpd_t configfs_t:dir getattr; + +#!!!! This avc is allowed in the current policy +allow httpd_t fixed_disk_device_t:blk_file getattr; + +#!!!! This avc is allowed in the current policy +allow httpd_t http_port_t:tcp_socket name_connect; + +#!!!! This avc is allowed in the current policy +allow httpd_t httpd_sys_content_t:dir { add_name create remove_name write }; + +#!!!! This avc is allowed in the current policy +allow httpd_t httpd_sys_content_t:file { append create rename setattr unlink write }; +allow httpd_t httpd_sys_script_exec_t:dir write; +allow httpd_t httpd_sys_script_exec_t:file append; + +#!!!! This avc is allowed in the current policy +#!!!! This av rule may have been overridden by an extended permission av rule +allow httpd_t httpd_tmp_t:fifo_file { append create getattr ioctl open read setattr unlink write }; + +#!!!! This avc is allowed in the current policy +allow httpd_t postgresql_port_t:tcp_socket name_connect; +allow httpd_t rpm_var_lib_t:dir write; + +#!!!! This avc is allowed in the current policy +allow httpd_t rpm_var_lib_t:file map; + +#!!!! This avc is allowed in the current policy +allow httpd_t self:capability { fowner fsetid sys_ptrace sys_resource }; + +#!!!! This avc is allowed in the current policy +allow httpd_t self:process ptrace; + +#!!!! This avc is allowed in the current policy +allow httpd_t user_tmp_t:sock_file getattr; + +#!!!! This avc is allowed in the current policy +allow httpd_t usr_t:dir create; + +#!!!! This avc is allowed in the current policy +allow httpd_t usr_t:file { create rename write }; + +#============= init_t ============== + +#!!!! This avc is allowed in the current policy +allow init_t httpd_tmp_t:dir { read remove_name rmdir write }; diff --git a/passenger.logrotate b/passenger.logrotate new file mode 100644 index 0000000000000000000000000000000000000000..a6cc52b2e6b6611413258adc09ae6bd6e9fb5670 --- /dev/null +++ b/passenger.logrotate @@ -0,0 +1,7 @@ +/var/log/passenger-analytics/*.log { + missingok + notifempty + sharedscripts + compress + delaycompress +} diff --git a/passenger.spec b/passenger.spec new file mode 100644 index 0000000000000000000000000000000000000000..1194fdf2192a2604d32e983b3555ccbadd39307e --- /dev/null +++ b/passenger.spec @@ -0,0 +1,193 @@ +%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}} +%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} +%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} +%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}} + +Name:passenger +Summary: Phusion Passenger application server +Version: 6.0.4 +Release: 2 +License: Boost and BSD and BSD with advertising and MIT and zlib +URL: https://www.phusionpassenger.com + +Source: http://s3.amazonaws.com/phusion-passenger/releases/%{name}-%{version}.tar.gz +Source10: passenger.logrotate +Source11: passenger-selinux.te +Source100: apache-passenger.conf.in +Source101: apache-passenger-module.conf +Source102: passenger.tmpfiles + +Requires: rubygems rubygem(rack) rubygem(rake) ruby(release) + +BuildRequires: gcc, gcc-c++ httpd-devel ruby ruby-devel rubygems rubygems-devel +BuildRequires: rubygem(rake) >= 0.8.1 rubygem(rack) zlib-devel pcre-devel +BuildRequires: openssl-devel libcurl-devel jsoncpp-devel + +Provides: bundled(boost) = 1.69.0 + +Obsoletes: rubygem-passenger < %{version}-%{release} +Provides: rubygem-passenger = %{version}-%{release} +Provides: rubygem-passenger%{?_isa} = %{version}-%{release} + +Obsoletes: rubygem-passenger-devel < %{version}-%{release} +Obsoletes: rubygem-passenger-native < %{version}-%{release} +Obsoletes: rubygem-passenger-native-libs < %{version}-%{release} + +%description +Phusion Passenger® is a web server and application server, designed to be fast, +robust and lightweight. It takes a lot of complexity out of deploying web apps, +adds powerful enterprise-grade features that are useful in production, +and makes administration much easier and less complex. It supports Ruby, +Python, Node.js and Meteor. + +%package -n mod_passenger +Summary: Apache Module for Phusion Passenger +BuildRequires: httpd-devel +Requires: httpd-mmn = %{_httpd_mmn} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description -n mod_passenger +This package contains the pluggable Apache server module for Phusion Passenger®. + +%package devel +Summary: Phusion Passenger development files +Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: bundled(boost-devel) = %{bundled_boost_version} + +%description devel +This package contains development files for Phusion Passenger®. Installing this +package allows it to compile native extensions for non-standard Ruby interpreters, +and allows Passenger Standalone to use a different Nginx core version. + +%package help +Summary: Phusion Passenger documentation +Requires: %{name} = %{version}-%{release} +Obsoletes: rubygem-passenger-doc < %{version}-%{release} +Provides: rubygem-passenger-doc = %{version}-%{release} +Obsoletes: %{name}-doc < %{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +BuildArch: noarch + +%description help +This package contains documentation files for Phusion Passenger®. + +%prep +%autosetup -n %{name}-%{version} + +%build +export EXTRA_CFLAGS="${CFLAGS:-%optflags} -Wno-deprecated" +export EXTRA_CXXFLAGS="${CXXFLAGS:-%optflags} -Wno-deprecated" + +export EXTRA_CFLAGS=`echo "$EXTRA_CFLAGS" | sed 's|-O2||g'` +export EXTRA_CXXFLAGS=`echo "$EXTRA_CXXFLAGS" | sed 's|-O2||g'` +export OPTIMIZE=yes + +export CACHING=false + +export CCACHE_COMPRESS=1 +export CCACHE_COMPRESSLEVEL=3 + +export LANG=en_US.UTF-8 +export LANGUAGE=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 + +rake fakeroot \ + NATIVE_PACKAGING_METHOD=rpm \ + FS_PREFIX=%{_prefix} \ + FS_BINDIR=%{_bindir} \ + FS_SBINDIR=%{_sbindir} \ + FS_DATADIR=%{_datadir} \ + FS_LIBDIR=%{_libdir} \ + FS_DOCDIR=%{_docdir} \ + RUBYLIBDIR=%{_datadir}/passenger \ + RUBYARCHDIR=%{_libdir}/passenger \ + APACHE2_MODULE_PATH=%{_httpd_moddir}/mod_passenger.so + + +%install +export LANG=en_US.UTF-8 +export LANGUAGE=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 + +%{__rm} -rf %{buildroot} +%{__mkdir} %{buildroot} +%{__cp} -a pkg/fakeroot/* %{buildroot}/ + +%{__mkdir_p} %{buildroot}%{_httpd_confdir} %{buildroot}%{_httpd_modconfdir} +%{__sed} -e 's|@PASSENGERROOT@|%{_datadir}/passenger/phusion_passenger/locations.ini|g' %{SOURCE100} > passenger.conf +%{__sed} -i -e '/^# *Require all granted/d' passenger.conf + + +%if "%{_httpd_modconfdir}" == "%{_httpd_confdir}" + %{__cat} %{SOURCE101} passenger.conf > passenger-combined.conf + touch -r %{SOURCE100} passenger-combined.conf + %{__install} -pm 0644 passenger-combined.conf %{buildroot}%{_httpd_confdir}/passenger.conf +%else + touch -r %{SOURCE100} passenger.conf + %{__install} -pm 0644 passenger.conf %{buildroot}%{_httpd_confdir}/passenger.conf + %{__install} -pm 0644 %{SOURCE101} %{buildroot}%{_httpd_modconfdir}/10-passenger.conf + touch -r %{SOURCE101} %{buildroot}%{_httpd_modconfdir}/10-passenger.conf +%endif + +%{__mkdir_p} %{buildroot}%{_localstatedir}/log/passenger-analytics +%{__mkdir_p} %{buildroot}%{_localstatedir}/run/passenger-instreg +%{__mkdir_p} %{buildroot}%{_usr}/lib/tmpfiles.d +%{__install} -m 644 -p %{SOURCE102} \ + %{buildroot}%{_usr}/lib/tmpfiles.d/passenger.conf + +%{__mkdir_p} %{buildroot}%{_sysconfdir}/logrotate.d +%{__install} -pm 0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/logrotate.d/passenger + +%{__mkdir_p} %{buildroot}%{_mandir}/man1 +%{__mkdir_p} %{buildroot}%{_mandir}/man8 +%{__cp} man/*.1 %{buildroot}%{_mandir}/man1 +%{__cp} man/*.8 %{buildroot}%{_mandir}/man8 + +%{__chmod} +x %{buildroot}%{_datadir}/passenger/helper-scripts/wsgi-loader.py + +find %{buildroot}%{_bindir} %{buildroot}%{_datadir}/passenger/helper-scripts/ -type f | xargs sed -i 's|^#!/usr/bin/env ruby$|#!/usr/bin/ruby|' +sed -i 's|^#!/usr/bin/env python$|#!/usr/bin/python3|' %{buildroot}%{_datadir}/passenger/helper-scripts/wsgi-loader.py + +%files +%doc LICENSE CONTRIBUTORS CHANGELOG +%{_bindir}/%{name}* +%exclude %{_bindir}/%{name}-install-*-module +%{_sbindir}/* +%{_usr}/lib/tmpfiles.d/passenger.conf +%{_datadir}/passenger/helper-scripts +%{_datadir}/passenger/templates +%{_datadir}/passenger/standalone_default_root +%{_datadir}/passenger/node +%{_datadir}/passenger/*.types +%{_datadir}/passenger/*.crt +%{_datadir}/passenger/*.txt +%{_datadir}/passenger/*.pem +%{_datadir}/passenger/*.p12 +%dir %{_localstatedir}/log/passenger-analytics +%dir %attr(755, root, root) %{_localstatedir}/run/passenger-instreg +%{_sysconfdir}/logrotate.d/passenger +%{_datadir}/passenger/* +%{_libdir}/passenger/support-binaries +%{_libdir}/passenger/passenger_native_support.so + +%files devel +%{_datadir}/passenger/ngx_http_passenger_module +%{_datadir}/passenger/ruby_extension_source +%{_datadir}/passenger/include +%{_libdir}/%{name}/common +%exclude %{_libdir}/%{name}/nginx_dynamic + +%files -n mod_passenger +%config(noreplace) %{_httpd_modconfdir}/*.conf +%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" + %config(noreplace) %{_httpd_confdir}/*.conf +%endif +%{_httpd_moddir}/mod_passenger.so + +%files help +%{_docdir}/%{name}/* +%{_mandir}/*/* + +%changelog +* Wed Mar 4 2020 openEuler Buildteam - 6.0.4-2 +- Package Init diff --git a/passenger.tmpfiles b/passenger.tmpfiles new file mode 100644 index 0000000000000000000000000000000000000000..3e0cc201044d088bc76e3f8fd90d5247a0e38e6e --- /dev/null +++ b/passenger.tmpfiles @@ -0,0 +1 @@ +d /run/passenger-instreg 755 root root