-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #13852: Merge packages into one
- Loading branch information
Showing
14 changed files
with
3,040 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/perl -w | ||
use strict; | ||
use IPC::Open2; | ||
|
||
# This scripts takes at least 2 arguments: | ||
# - 1) the string "true" or "false" to tell us whether to *not* exclude LMDB from list of requires (ie, if argument == false, then exclude it) | ||
# - 2) The command and it's arguments to run to auto-detect requirements (original RPM behaviour) | ||
my $dont_exclude_tc = $ARGV[0]; | ||
my @command = @ARGV[1 .. $#ARGV]; | ||
|
||
# This will run the original find-requires script | ||
# and then remove requirements we don't want | ||
open2(\*IN, \*OUT, @command); | ||
print OUT while (<STDIN>); | ||
close(OUT); | ||
my $list = join('', <IN>); | ||
|
||
# Apply our exclude filters | ||
$list =~ s/^perl\(.*?$//mg; | ||
$list =~ s/^perl .*?$//mg; | ||
$list =~ s/^\/opt\/rudder\/bin\/perl.*?$//mg; | ||
|
||
$list =~ s/^.*lmdb.*?$//mg unless ($dont_exclude_tc eq "true"); | ||
|
||
print $list; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# ncf settings for Apache (for ncf builder, using ncf-api-virtualenv) | ||
|
||
## Set up an alias to reach ncf builder itself | ||
Alias /ncf-builder /usr/share/ncf/builder | ||
|
||
## Set up a WSGI serving process named ncf_api_flask_app | ||
WSGIDaemonProcess ncf_api_flask_app threads=5 user=ncf-api-venv umask=0007 | ||
WSGISocketPrefix /var/run/wsgi | ||
|
||
## Make the API available on /ncf using the .wsgi file bundled with the package | ||
WSGIScriptAlias /ncf /usr/share/ncf-api-virtualenv/ncf_api_flask_app.wsgi | ||
|
||
## Set directory access permissions | ||
<Directory /usr/share/ncf/builder> | ||
# Allow access from anybody | ||
Require all granted | ||
</Directory> | ||
|
||
<Directory /usr/share/ncf/api> | ||
# Allow access from anybody | ||
Require all granted | ||
</Directory> | ||
|
||
<Directory /usr/share/ncf-api-virtualenv> | ||
# WSGI parameters | ||
WSGIProcessGroup ncf_api_flask_app | ||
WSGIApplicationGroup %{GLOBAL} | ||
|
||
# Allow access from anybody | ||
Require all granted | ||
</Directory> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/var/lib/ncf-api-venv(/.*)? gen_context(system_u:object_r:httpd_sys_rw_content_t,s0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module ncf-api-virtualenv 1.1; | ||
|
||
require { | ||
type httpd_t; | ||
type var_t; | ||
type init_exec_t; | ||
type init_t; | ||
type usr_t; | ||
class dir { read getattr open search }; | ||
class file { execute read ioctl execute_no_trans write getattr unlink open append }; | ||
} | ||
|
||
#============= httpd_t ============= | ||
allow httpd_t var_t:file { execute read getattr execute_no_trans write ioctl unlink open append }; | ||
allow httpd_t init_exec_t:file getattr; | ||
allow httpd_t init_t:dir { read getattr open search }; | ||
allow httpd_t init_t:file { read getattr open }; | ||
allow httpd_t usr_t:file { write execute execute_no_trans }; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This is ncf_api_flask_app.wsgi | ||
# | ||
# It is the main entry point for the ncf api WSGI environment, | ||
# importing the necessary elements like the Python virtualenv | ||
# and the ncf api itself. | ||
# | ||
|
||
# Import core modules | ||
import sys | ||
|
||
# Set up paths | ||
ncf_path = '/usr/share/ncf/api' | ||
virtualenv_path = '/usr/share/ncf-api-virtualenv' | ||
|
||
# Virtualenv initialization | ||
activate_this = virtualenv_path + '/bin/activate_this.py' | ||
execfile(activate_this, dict(__file__=activate_this)) | ||
|
||
# Append ncf API path to the current one | ||
sys.path.append(ncf_path) | ||
|
||
# Launch ncf_api_flask_app | ||
from ncf_api_flask_app import app as application |
Oops, something went wrong.