Move commone recipes and classes to meta-stak-common

Signed-off-by: Sar Ashki, Babak <Babak.SarAshki@windriver.com>
This commit is contained in:
Sar Ashki, Babak 2020-04-16 16:49:06 -07:00
parent 691fee25b4
commit c04019d98a
130 changed files with 0 additions and 10930 deletions

View File

@ -1,45 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
python __anonymous() {
if bb.utils.contains('DEPENDS', 'openssl', True, False, d) or \
bb.utils.contains('DEPENDS', 'openssl-native', True, False, d):
d.setVar('DEPENDS', d.getVar('DEPENDS').replace('openssl', 'openssl10'))
d.setVar('DEPENDS', d.getVar('DEPENDS').replace('openssl-native', 'openssl10-native'))
}
python do_ssl10_mk_symlink() {
import shutil
l = d.getVar("STAGING_INCDIR") + "/openssl"
if os.path.islink(l):
os.unlink(l)
elif os.path.isdir(l):
shutil.rmtree(l)
os.symlink("openssl10/openssl",l)
l = d.getVar("STAGING_LIBDIR")
if os.path.islink(l + "/libssl.so"):
os.unlink(l + "/libssl.so")
os.unlink(l + "/libcrypto.so")
os.symlink("libssl.so.1.0.2", l + "/libssl.so")
os.symlink("libcrypto.so.1.0.2", l + "/libcrypto.so")
}
addtask ssl10_mk_symlink before do_configure after do_prepare_recipe_sysroot

View File

@ -1,35 +0,0 @@
From 223013ada4792ab0d8f9b02c89aa139969f99a97 Mon Sep 17 00:00:00 2001
From: "Sar Ashki, Babak" <Babak.SarAshki@windriver.com>
Date: Sun, 29 Dec 2019 21:41:38 -0800
Subject: [PATCH] barbican: fix path to find configuration files
From 3364915002aa2deaf63841e338375648e5dc8f24 Mon Sep 17 00:00:00 2001
From: Keith Holman <Keith.Holman@windriver.com>
Date: Fri, 13 Jun 2014 13:46:04 -0400
Barbican attempts to find configuration files for tests based on where
the files are located within the source tree. On deployment,
configuration files are installed to a directory specified by a build
recipe. This fix updates the location for the configuration files
with an identifier that is replaced during deployment.
---
barbican/tests/api/test_resources_policy.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/barbican/tests/api/test_resources_policy.py b/barbican/tests/api/test_resources_policy.py
index 37a1630f..d9bd9d72 100644
--- a/barbican/tests/api/test_resources_policy.py
+++ b/barbican/tests/api/test_resources_policy.py
@@ -37,8 +37,7 @@ from barbican.tests import utils
# Point to the policy.json file located in source control.
-TEST_VAR_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__),
- '../../../etc', 'barbican'))
+TEST_VAR_DIR = "%BARBICAN_CONF_DIR%"
CONF = config.new_config()
--
2.23.0

View File

@ -1,16 +0,0 @@
import multiprocessing
bind = '0.0.0.0:9311'
user = 'barbican'
group = 'barbican'
timeout = 30
backlog = 2048
keepalive = 2
workers = multiprocessing.cpu_count() * 2
loglevel = 'info'
errorlog = '-'
accesslog = '-'

View File

@ -1,19 +0,0 @@
[Unit]
Description=Openstack Barbican API server
After=syslog.target network.target
Before=httpd.service
[Service]
PIDFile=/run/barbican/pid
User=barbican
Group=barbican
RuntimeDirectory=barbican
RuntimeDirectoryMode=770
ExecStart=/usr/bin/gunicorn --pid /run/barbican/pid -c /etc/barbican/gunicorn-config.py --paste /etc/barbican/barbican-api-paste.ini
ExecReload=/usr/bin/kill -s HUP $MAINPID
ExecStop=/usr/bin/kill -s TERM $MAINPID
StandardError=syslog
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -1,13 +0,0 @@
[Unit]
Description=Openstack Barbican worker daemon
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/usr/bin/barbican-keystone-listener
User=barbican
Group=barbican
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -1,13 +0,0 @@
[Unit]
Description=Openstack Barbican worker daemon
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/usr/bin/barbican-worker
User=barbican
Group=barbican
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -1,12 +0,0 @@
#
# Matches bootstrap data in keystone-init
#
export OS_PROJECT_DOMAIN_NAME=Default
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_NAME=admin
export OS_USERNAME=%ADMIN_USER%
export OS_PASSWORD=%ADMIN_PASSWORD%
export OS_AUTH_URL=http://%CONTROLLER_IP%:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
export OS_REGION_NAME=RegionOne

View File

@ -1,43 +0,0 @@
#!/usr/bin/python
import sys
import ConfigParser
import shutil
path = "/etc/keystone/keystone.conf"
if len(sys.argv) != 2:
sys.stderr.write("Usage: "+sys.argv[0]+" [sql|hybrid]\n")
sys.exit(1)
backend = sys.argv[1]
if backend == "hybrid":
identity_backend = 'keystone.identity.backends.hybrid_identity.Identity'
assignment_backend = 'keystone.assignment.backends.hybrid_assignment.Assignment'
elif backend == "sql":
identity_backend = 'keystone.identity.backends.sql.Identity'
assignment_backend = 'keystone.assignment.backends.sql.Assignment'
else:
sys.stderr.write("Usage: "+sys.argv[0]+" [sql|hybrid]\n")
sys.exit(1)
shutil.copyfile(path, path + ".bak")
cfg = ConfigParser.ConfigParser()
c = cfg.read(path)
if not cfg.has_section("identity"):
cfg.add_section("identity")
cfg.set("identity", "driver", identity_backend)
if not cfg.has_section("assignment"):
cfg.add_section("assignment")
cfg.set("assignment", "driver", assignment_backend)
fp = open(path, "w")
cfg.write(fp)
fp.close()
exit(0)

View File

@ -1,6 +0,0 @@
#!/bin/sh
/etc/keystone/convert_keystone_backend.py hybrid
/etc/init.d/openldap start
/etc/init.d/keystone restart

View File

@ -1,226 +0,0 @@
#!/bin/bash
#
# Copyright (C) 2014 Wind River Systems, Inc.
#
# The identity.sh provides utilities for services to add tenant/role/users,
# and service/endpoints into keystone database
#
# Use shared secret for authentication before any user created.
export OS_SERVICE_TOKEN="password"
export OS_SERVICE_ENDPOINT="http://localhost:35357/v2.0"
declare -A PARAMS
# Shortcut function to get a newly generated ID
function get_field () {
while read data; do
if [ "$1" -lt 0 ]; then
field="(\$(NF$1))"
else
field="\$$(($1 + 1))"
fi
echo "$data" | awk -F'[ \t]*\\|[ \t]*' "{print $field}"
done
}
# Usage help
help () {
if [ $# -eq 0 ]; then
echo "Usage: $0 <subcommand> ..."
echo ""
echo "Keystone CLI wrapper to create tenant/user/role, and service/endpoint."
echo "It uses the default tenant, user and password from environment variables"
echo "(OS_TENANT_NAME, OS_USERNAME, OS_PASSWORD) to authenticate with keystone."
echo ""
echo "Positional arguments:"
echo " <subcommand>"
echo " user-create"
echo " service-create"
echo ""
echo "See \"identity.sh help COMMAND\" for help on a specific command."
exit 0
fi
case "$2" in
service-create)
echo "Usage: $0 $2 [--name=<name>] [--type=<type>] [--description=<description>] [--region=<region>] [--publicurl=<public url>] [--adminurl=<admin url>] [--internalurl=<internal url>]"
echo ""
echo "Create service and endpoint in keystone."
echo ""
echo "Arguments:"
echo " --name=<name>"
echo " The name of the service"
echo " --type=<type>"
echo " The type of the service"
echo " --description=<description>"
echo " Description of the service"
echo " --region=<region>"
echo " The region of the service"
echo " --publicurl=<public url>"
echo " Public URL of the service endpoint"
echo " --adminurl=<admin url>"
echo " Admin URL of the service endpoint"
echo " --internalurl=<internal url>"
echo " Internal URL of the service endpoint"
;;
user-create)
echo "Usage: $0 $2 [--name=<name>] [--pass=<password>] [--tenant=<tenant>] [--role=<role>] [--email=<email>]"
echo ""
echo "Arguments:"
echo " --name=<name>"
echo " The name of the user"
echo " --pass=<password>"
echo " The password of the user"
echo " --tenant=<tenant>"
echo " The tenant of the user belongs to"
echo " --role=<role>"
echo " The role of the user in the <tenant>"
echo " --email=<email>"
echo " The email of the user"
;;
*)
echo "Usage: $0 help <subcommand> ..."
echo ""
exit 0
;;
esac
}
# Parse the command line parameters in an map
parse_param () {
while [ $# -ne 0 ]; do
param=$1
shift
key=`echo $param | cut -d '=' -f 1`
key=`echo $key | tr -d '[-*2]'`
PARAMS[$key]=`echo $param | cut -d '=' -f 2`
done
}
# Create tenant/role/user, and add user to the tenant as role
user-create () {
# validation checking
if [[ "$@" =~ ^--name=.*\ --pass=.*\ --tenant=.*\ --role=.*\ --email=.*$ ]]; then
params=`echo "$@" | sed -e 's%--name=\(.*\) --pass=\(.*\) --tenant=\(.*\) --role=\(.*\) --email=\(.*\)%--name=\1|--pass=\2|--tenant=\3|--role=\4|--email=\5%g'`
else
help
exit 1
fi
# parse the cmdline parameters
IFS="|"
parse_param $params
unset IFS
echo "Adding user in keystone ..."
if [ "x${PARAMS["tenant"]}" != "x" ]; then
# check if tenant exist, create it if not
TENANT_ID=$(keystone tenant-get ${PARAMS["tenant"]} | grep " id " | get_field 2)
if [ "x$TENANT_ID" == "x" ]; then
echo "Creating tenant ${PARAMS["tenant"]} in keystone ..."
TENANT_ID=$(keystone tenant-create --name=${PARAMS["tenant"]} | grep " id " | get_field 2)
fi
echo "Tenant list:"
keystone tenant-list
fi
if [ "x${PARAMS["role"]}" != "x" ]; then
# check if role exist, create it if not
ROLE_ID=$(keystone role-get ${PARAMS["role"]} | grep " id " | get_field 2)
if [ "x$ROLE_ID" == "x" ]; then
echo "Creating role ${PARAMS["role"]} in keystone ..."
ROLE_ID=$(keystone role-create --name=${PARAMS["role"]} | grep " id " | get_field 2)
fi
echo "Role list:"
keystone role-list
fi
if [ "x${PARAMS["name"]}" != "x" ]; then
# check if user exist, create it if not
USER_ID=$(keystone user-get ${PARAMS["name"]} | grep " id " | get_field 2)
if [ "x$USER_ID" == "x" ]; then
echo "Creating user ${PARAMS["name"]} in keystone ..."
USER_ID=$(keystone user-create --name=${PARAMS["name"]} --pass=${PARAMS["pass"]} --tenant-id $TENANT_ID --email=${PARAMS["email"]} | grep " id " | get_field 2)
fi
echo "User list:"
keystone user-list
fi
if [ "x$USER_ID" != "x" ] && [ "x$TENANT_ID" != "x" ] && [ "x$ROLE_ID" != "x" ]; then
# add the user to the tenant as role
keystone user-role-list --user-id $USER_ID --tenant-id $TENANT_ID | grep $ROLE_ID &> /dev/null
if [ $? -eq 1 ]; then
echo "Adding user ${PARAMS["name"]} in tenant ${PARAMS["tenant"]} as ${PARAMS["role"]} ..."
keystone user-role-add --tenant-id $TENANT_ID --user-id $USER_ID --role-id $ROLE_ID
fi
fi
if [ "x$USER_ID" != "x" ] && [ "x$TENANT_ID" != "x" ]; then
echo "User ${PARAMS["name"]} in Tenant ${PARAMS["tenant"]} role list:"
keystone user-role-list --user-id $USER_ID --tenant-id $TENANT_ID
fi
}
# Create service and its endpoint
service-create () {
# validation checking
if [[ "$@" =~ ^--name=.*\ --type=.*\ --description=.*\ --region=.*\ --publicurl=.*\ --adminurl=.*\ --internalurl=.*$ ]]; then
params=`echo "$@" | sed -e 's%--name=\(.*\) --type=\(.*\) --description=\(.*\) --region=\(.*\) --publicurl=\(.*\) --adminurl=\(.*\) --internalurl=\(.*\)%--name=\1|--type=\2|--description=\3|--region=\4|--publicurl=\5|--adminurl=\6|--internalurl=\7%g'`
else
help
exit 1
fi
# parse the cmdline parameters
IFS=$"|"
parse_param $params
unset IFS
echo "Creating service in keystone ..."
if [ "x${PARAMS["name"]}" != "x" ]; then
# check if service already created, create it if not
SERVICE_ID=$(keystone service-get ${PARAMS["name"]} | grep " id " | get_field 2)
if [ "x$SERVICE_ID" == "x" ]; then
echo "Adding service ${PARAMS["name"]} in keystone ..."
SERVICE_ID=$(keystone service-create --name ${PARAMS["name"]} --type ${PARAMS["type"]} --description "${PARAMS["description"]}" | grep " id " | get_field 2)
fi
echo "Service list:"
keystone service-list
fi
if [ "x$SERVICE_ID" != "x" ]; then
# create its endpoint
keystone endpoint-list | grep $SERVICE_ID | grep ${PARAMS["region"]} | grep ${PARAMS["publicurl"]} | grep ${PARAMS["adminurl"]} | grep ${PARAMS["internalurl"]}
if [ $? -eq 1 ]; then
echo "Creating endpoint for ${PARAMS["name"]} in keystone ..."
keystone endpoint-create --region ${PARAMS["region"]} --service-id $SERVICE_ID --publicurl ${PARAMS["publicurl"]} --adminurl ${PARAMS["adminurl"]} --internalurl ${PARAMS["internalurl"]}
fi
echo "Endpoints list:"
keystone endpoint-list
fi
}
case "$1" in
service-create)
shift
service-create $@
;;
user-create)
shift
user-create $@
;;
help)
help $@
;;
*)
help
exit 0
;;
esac
exit 0

View File

@ -1,32 +0,0 @@
From 0d6b66b2d5314b454a421bd22fcc8173baf0bc95 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@windriver.com>
Date: Mon, 20 Oct 2014 15:59:33 -0400
Subject: [PATCH] keystone: explicitly import localcontext from oslo.messaging
When using apache as a front end to keystone, juno has a problem when
authenticating clients due to a failure to import localcontext from
oslo.
We can work around this issue by doing the export explicitly in the
entry routine versus in the library itself.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
httpd/keystone.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/httpd/keystone.py b/httpd/keystone.py
index f5ce498c5152..b2b9285ad2ab 100644
--- a/httpd/keystone.py
+++ b/httpd/keystone.py
@@ -32,6 +32,7 @@ from keystone.common import sql
from keystone import config
from keystone.openstack.common import log
from keystone import service
+from oslo.messaging import localcontext
CONF = config.CONF
--
1.9.1

View File

@ -1,34 +0,0 @@
From 205ee3cfa4c7efd39f5fe991b53327c1bd771f97 Mon Sep 17 00:00:00 2001
From: Keith Holman <Keith.Holman@windriver.com>
Date: Tue, 3 Jun 2014 16:19:54 -0400
Subject: [PATCH] keystone: fix location of files for tests
Keystone tests define the location of certificate files
as the location of the files in the source tree. However,
when installed on the system these files are put in a
different location. This patch provides a symbol, which
is replaced, for the base path of the location of the test
files.
Signed-off-by: Keith Holman <Keith.Holman@windriver.com>
---
keystone/tests/test_overrides.conf | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/keystone/tests/test_overrides.conf b/keystone/tests/test_overrides.conf
index 801b0d2..ba35343 100644
--- a/keystone/tests/test_overrides.conf
+++ b/keystone/tests/test_overrides.conf
@@ -21,6 +21,6 @@ debug_cache_backend = True
proxies = keystone.tests.test_cache.CacheIsolatingProxy
[signing]
-certfile = ../../examples/pki/certs/signing_cert.pem
-keyfile = ../../examples/pki/private/signing_key.pem
-ca_certs = ../../examples/pki/certs/cacert.pem
+certfile = %KEYSTONE_PACKAGE_DIR%/examples/pki/certs/signing_cert.pem
+keyfile = %KEYSTONE_PACKAGE_DIR%/examples/pki/private/signing_key.pem
+ca_certs = %KEYSTONE_PACKAGE_DIR%/examples/pki/certs/cacert.pem
--
1.9.3

View File

@ -1,60 +0,0 @@
#!/bin/bash
#
# Basic keystone setup as described on:
# https://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-install.html
# https://docs.openstack.org/keystone/pike/install/keystone-install-ubuntu.html
#
# Prerequisites: /etc/postgresql/postgresql-init must be run first to create the DB
#
# After complete you should be able to query keystone with something like the
# following (https://docs.openstack.org/keystone/latest/api_curl_examples.html)
#
#curl -i \
# -H "Content-Type: application/json" \
# -d '
#{ "auth": {
# "identity": {
# "methods": ["password"],
# "password": {
# "user": {
# "name": "%ADMIN_USER%",
# "domain": { "id": "default" },
# "password": "%ADMIN_PASSWORD%"
# }
# }
# }
# }
#}' \
# "http://localhost:5000/v3/auth/tokens" ; echo
# Substitutions setup at do_intall()
DB_USER=%DB_USER%
KEYSTONE_USER=%KEYSTONE_USER%
KEYSTONE_GROUP=%KEYSTONE_GROUP%
CONTROLLER_IP=%CONTROLLER_IP%
ADMIN_USER=%ADMIN_USER%
ADMIN_PASSWORD=%ADMIN_PASSWORD%
ADMIN_ROLE=%ADMIN_ROLE%
# Create the keystone DB and grant the necessary permissions
sudo -u postgres psql -c "CREATE DATABASE keystone" 2> /dev/null
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE keystone TO ${DB_USER}" 2> /dev/null
keystone-manage db_sync
keystone-manage fernet_setup --keystone-user ${KEYSTONE_USER} --keystone-group ${KEYSTONE_GROUP}
keystone-manage credential_setup --keystone-user ${KEYSTONE_USER} --keystone-group ${KEYSTONE_GROUP}
keystone-manage bootstrap \
--bootstrap-password ${ADMIN_PASSWORD} \
--bootstrap-username ${ADMIN_USER} \
--bootstrap-project-name admin \
--bootstrap-role-name ${ADMIN_ROLE} \
--bootstrap-service-name keystone \
--bootstrap-region-id RegionOne \
--bootstrap-admin-url http://${CONTROLLER_IP}:35357 \
--bootstrap-internal-url http://${CONTROLLER_IP}:5000 \
--bootstrap-public-url http://${CONTROLLER_IP}:5000
#keystone-manage pki_setup --keystone-user=root --keystone-group=daemon

View File

@ -1,12 +0,0 @@
[Unit]
Description=Barebones OpenStack keystone initialization
After=postgresql-init.service
[Service]
Type=oneshot
ExecStart=%SYSCONFIGDIR%/keystone/keystone-init
ExecStartPost=/bin/systemctl --no-reload disable keystone-init.service
RemainAfterExit=No
[Install]
WantedBy=multi-user.target

View File

@ -1,39 +0,0 @@
From d2ee135a3c97f714e6da59adf45a91a2f1632057 Mon Sep 17 00:00:00 2001
From: Keith Holman <Keith.Holman@windriver.com>
Date: Wed, 4 Jun 2014 11:30:53 -0400
Subject: [PATCH] keystone: remove git commands in tests
Keystone tests are designed to be used during development
and will use git to download the latest keystoneclient from
source to test against. However, on the system installation
we install keystone-client as a separate package, and do not
want to download an external version to test. In order to
test against the version installed as a separate package,
remove the git calls that clone the keystone-client repository
and just returned the desired directory.
Signed-off-by: Keith Holman <Keith.Holman@windriver.com>
---
keystone/tests/core.py | 2 ++
1 file changed, 2 insertions(+)
Index: git/keystone/tests/core.py
===================================================================
--- git.orig/keystone/tests/core.py
+++ git/keystone/tests/core.py
@@ -125,6 +125,7 @@
working_dir = os.getcwd()
revdir = os.path.join(VENDOR, '%s-%s' % (name, rev.replace('/', '_')))
+ """
modcheck = os.path.join(VENDOR, '.%s-%s' % (name, rev.replace('/', '_')))
try:
if os.path.exists(modcheck):
@@ -145,6 +146,7 @@
fd.write('1')
except environment.subprocess.CalledProcessError:
LOG.warning(_('Failed to checkout %s'), repo)
+ """
os.chdir(working_dir)
return revdir

View File

@ -1,41 +0,0 @@
From ed3c1f7c8eb90506eda1aafbc6d4de3b9e2abe71 Mon Sep 17 00:00:00 2001
From: Keith Holman <Keith.Holman@windriver.com>
Date: Tue, 3 Jun 2014 11:28:23 -0400
Subject: [PATCH] keystone: search in etc directory for config files
The core.py file in the tests directory is setup to find
the file as they exist in the source code tree. When
deployed some configuration files are moved to the /etc
directory. This modification changes the test code to
find the files in the new location.
Signed-off-by: Keith Holman <Keith.Holman@windriver.com>
---
keystone/tests/core.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: git/keystone/tests/core.py
===================================================================
--- git.orig/keystone/tests/core.py
+++ git/keystone/tests/core.py
@@ -68,9 +68,9 @@
PID = six.text_type(os.getpid())
TESTSDIR = os.path.dirname(os.path.abspath(__file__))
TESTCONF = os.path.join(TESTSDIR, 'config_files')
-ROOTDIR = os.path.normpath(os.path.join(TESTSDIR, '..', '..'))
+ROOTDIR = os.path.normpath(os.path.join(TESTSDIR, '..'))
VENDOR = os.path.join(ROOTDIR, 'vendor')
-ETCDIR = os.path.join(ROOTDIR, 'etc')
+ETCDIR = "/etc/keystone"
def _calc_tmpdir():
@@ -560,7 +560,7 @@
def _paste_config(self, config):
if not config.startswith('config:'):
test_path = os.path.join(TESTSDIR, config)
- etc_path = os.path.join(ROOTDIR, 'etc', config)
+ etc_path = os.path.join(ETCDIR, config)
for path in [test_path, etc_path]:
if os.path.exists('%s-paste.ini' % path):
return 'config:%s-paste.ini' % path

File diff suppressed because it is too large Load Diff

View File

@ -1,156 +0,0 @@
#!/bin/sh
# Copyright (c) 2013-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
### BEGIN INIT INFO
# Provides: OpenStack Keystone-wsgi
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: OpenStack Keystone
# Description: Openstack Identitiy service running on WSGI compatable gunicorn web server
#
### END INIT INFO
RETVAL=0
#public 5000
DESC_PUBLIC="openstack-keystone"
PIDFILE_PUBLIC="/var/run/$DESC_PUBLIC.pid"
PYTHON=`which python`
source /etc/keystone/keystone-extra.conf
source /etc/platform/platform.conf
if [ -n ${@:2:1} ] ; then
if [ ${@:2:1}="--public-bind-addr" ] ; then
PUBLIC_BIND_ADDR_CMD=${@:3:1}
fi
fi
###
EXEC="/usr/bin/gunicorn"
WORKER="eventlet"
# Increased timeout to facilitate large image uploads
TIMEOUT="200"
# Calculate the no of workers based on the number of workers retrieved by
# Platform Eng which is retreived from the keystone-extra.conf
if [ "$system_type" == "All-in-one" ]; then
TIS_WORKERS_FACTOR=1
else
TIS_WORKERS_FACTOR=1.5
fi
TIS_WORKERS=$(echo "${TIS_WORKERS_FACTOR}*${TIS_PUBLIC_WORKERS}"|bc )
TIS_WORKERS=${TIS_WORKERS%.*}
#--max-requests , --max-requests-jitter Configuration
#--max-requests = The max number of requests a worker will process before restarting
#--max-requests-jitter = The maximum jitter to add to the max_requests setting.
MAX_REQUESTS=100000
MAX_REQ_JITTER_CAP_FACTOR=0.5
MAX_REQ_JITTER_PUBLIC=$(echo "${TIS_WORKERS}*${MAX_REQ_JITTER_CAP_FACTOR}+1"|bc)
MAX_REQ_JITTER_PUBLIC=${MAX_REQ_JITTER_PUBLIC%.*}
start()
{
# Got proper no of workers . Starting gunicorn now
echo -e "Initialising keystone service using gunicorn .. \n"
if [ -z "$PUBLIC_BIND_ADDR" ]; then
echo "Keystone floating ip not found . Cannot start services. Exiting .."
exit 1
fi
BIND_PUBLIC=$PUBLIC_BIND_ADDR:5000
if [ -e $PIDFILE_PUBLIC ]; then
PIDDIR=/proc/$(cat $PIDFILE_PUBLIC)
if [ -d ${PIDDIR} ]; then
echo "$DESC_PUBLIC already running."
exit 1
else
echo "Removing stale PID file $PIDFILE_PUBLIC"
rm -f $PIDFILE_PUBLIC
fi
fi
echo -e "Starting $DESC_PUBLIC...\n";
echo -e "Worker is ${WORKER} --workers ${TIS_WORKERS} --timeout ${TIMEOUT} --max_requests ${MAX_REQUESTS} --max_request_jitter public ${MAX_REQ_JITTER_PUBLIC}\n" ;
echo -e "Starting keystone process at port 5000 \n" ;
start-stop-daemon --start --quiet --background --pidfile ${PIDFILE_PUBLIC} \
--make-pidfile --exec ${PYTHON} -- ${EXEC} --bind ${BIND_PUBLIC} \
--worker-class ${WORKER} --workers ${TIS_WORKERS} --timeout ${TIMEOUT} \
--max-requests ${MAX_REQUESTS} --max-requests-jitter ${MAX_REQ_JITTER_PUBLIC} \
--log-syslog \
--pythonpath '/usr/share/keystone' public:application --name keystone-public
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo -e "Keystone started at port 5000... \n"
else
echo -e "Failed to start Keystone .. \n"
fi
}
stop()
{
if [ -e $PIDFILE_PUBLIC ]; then
start-stop-daemon --stop --quiet --pidfile $PIDFILE_PUBLIC
RETVAL_PUBLIC=$?
if [ $RETVAL_PUBLIC -eq 0 ]; then
echo "Stopped $DESC_PUBLIC."
else
echo "Stopping failed - $PIDFILE_PUBLIC"
fi
rm -f $PIDFILE_PUBLIC
else
echo "Already stopped - $PIDFILE_PUBLIC"
fi
}
status()
{
pid_public=`cat $PIDFILE_PUBLIC 2>/dev/null`
if [ -n "$pid_public" ]; then
echo -e "\033[32m $DESC_PUBLIC is running..\033[0m"
else
echo -e "\033[31m $DESC_PUBLIC is not running..\033[0m"
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|force-reload|reload)
stop
start
;;
status)
status
;;
*)
#echo "Usage: $0 {start|stop|force-reload|restart|reload|status} OR {/usr/bin/keystone-all start --public-bind-addr xxx.xxx.xxx}"
start
#RETVAL=1
;;
esac
exit $RETVAL

View File

@ -1,64 +0,0 @@
#!/bin/bash
#
# Wrapper script to rotate keystone fernet keys on active controller only
#
KEYSTONE_KEYS_ROTATE_INFO="/var/run/keystone-keys-rotate.info"
KEYSTONE_KEYS_ROTATE_CMD="/usr/bin/nice -n 2 /usr/bin/keystone-manage fernet_rotate --keystone-user keystone --keystone-group keystone"
function is_active_pgserver()
{
# Determine whether we're running on the same controller as the service.
local service=postgres
local enabledactive=$(/usr/bin/sm-query service $service| grep enabled-active)
if [ "x$enabledactive" == "x" ]
then
# enabled-active not found for that service on this controller
return 1
else
# enabled-active found for that resource
return 0
fi
}
if is_active_pgserver
then
if [ ! -f ${KEYSTONE_KEYS_ROTATE_INFO} ]
then
echo delay_count=0 > ${KEYSTONE_KEYS_ROTATE_INFO}
fi
source ${KEYSTONE_KEYS_ROTATE_INFO}
sudo -u postgres psql -d sysinv -c "SELECT alarm_id, entity_instance_id from i_alarm;" | grep -P "^(?=.*100.101)(?=.*${HOSTNAME})" &>/dev/null
if [ $? -eq 0 ]
then
source /etc/platform/platform.conf
if [ "${system_type}" = "All-in-one" ]
then
source /etc/init.d/task_affinity_functions.sh
idle_core=$(get_most_idle_core)
if [ "$idle_core" -ne "0" ]
then
sh -c "exec taskset -c $idle_core ${KEYSTONE_KEYS_ROTATE_CMD}"
sed -i "/delay_count/s/=.*/=0/" ${KEYSTONE_KEYS_ROTATE_INFO}
exit 0
fi
fi
if [ "$delay_count" -lt "3" ]
then
newval=$(($delay_count+1))
sed -i "/delay_count/s/=.*/=$newval/" ${KEYSTONE_KEYS_ROTATE_INFO}
(sleep 3600; /usr/bin/keystone-fernet-keys-rotate-active) &
exit 0
fi
fi
eval ${KEYSTONE_KEYS_ROTATE_CMD}
sed -i "/delay_count/s/=.*/=0/" ${KEYSTONE_KEYS_ROTATE_INFO}
fi
exit 0

View File

@ -1,14 +0,0 @@
[Unit]
Description=OpenStack Identity Service (code-named Keystone)
After=syslog.target network.target
[Service]
Type=forking
#ReminAfterExit is set to yes as we have 2 pids to monitor
RemainAfterExit=yes
ExecStart=/usr/bin/keystone-all start
ExecStop=/usr/bin/keystone-all stop
ExecReload=/usr/bin/keystone-all reload
[Install]
WantedBy=multi-user.target

View File

@ -1,49 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# The password rules captures the [security_compliance]
# section of the generic Keystone configuration (keystone.conf)
# This configuration is used to statically define the password
# rules for password validation in pre-Keystone environments
#
# N.B: Only set non-default keys here (default commented configuration
# items not needed)
[security_compliance]
#
# From keystone
#
# This controls the number of previous user password iterations to keep in
# history, in order to enforce that newly created passwords are unique. Setting
# the value to one (the default) disables this feature. Thus, to enable this
# feature, values must be greater than 1. This feature depends on the `sql`
# backend for the `[identity] driver`. (integer value)
# Minimum value: 1
unique_last_password_count = 2
# The regular expression used to validate password strength requirements. By
# default, the regular expression will match any password. The following is an
# example of a pattern which requires at least 1 letter, 1 digit, and have a
# minimum length of 7 characters: ^(?=.*\d)(?=.*[a-zA-Z]).{7,}$ This feature
# depends on the `sql` backend for the `[identity] driver`. (string value)
password_regex = ^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()<>{}+=_\\\[\]\-?|~`,.;:]).{7,}$
# Describe your password regular expression here in language for humans. If a
# password fails to match the regular expression, the contents of this
# configuration variable will be returned to users to explain why their
# requested password was insufficient. (string value)
password_regex_description = Password must have a minimum length of 7 characters, and must contain at least 1 upper case, 1 lower case, 1 digit, and 1 special character

View File

@ -1,21 +0,0 @@
# Copyright (c) 2013-2017 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from keystone.server import wsgi as wsgi_server
import sys
sys.argv = sys.argv[:1]
application = wsgi_server.initialize_public_application()

View File

@ -1,67 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Listen 5000
Listen 35357
<VirtualHost *:5000>
WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
WSGIProcessGroup keystone-public
WSGIScriptAlias / /usr/bin/keystone-wsgi-public
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
ErrorLogFormat "%{cu}t %M"
ErrorLog /var/log/apache2/keystone.log
CustomLog /var/log/apache2/keystone_access.log combined
<Directory /usr/bin>
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:35357>
WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
WSGIProcessGroup keystone-admin
WSGIScriptAlias / /usr/bin/keystone-wsgi-admin
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
ErrorLogFormat "%{cu}t %M"
ErrorLog /var/log/apache2/keystone.log
CustomLog /var/log/apache2/keystone_access.log combined
<Directory /usr/bin>
Require all granted
</Directory>
</VirtualHost>
Alias /identity /usr/bin/keystone-wsgi-public
<Location /identity>
SetHandler wsgi-script
Options +ExecCGI
WSGIProcessGroup keystone-public
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
</Location>
Alias /identity_admin /usr/bin/keystone-wsgi-admin
<Location /identity_admin>
SetHandler wsgi-script
Options +ExecCGI
WSGIProcessGroup keystone-admin
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
</Location>

View File

@ -1,640 +0,0 @@
From ecaf5c44da357e2ee5279a3f84a060f7af2c9dd1 Mon Sep 17 00:00:00 2001
From: zhipengl <zhipengs.liu@intel.com>
Date: Fri, 21 Jun 2019 01:50:14 +0800
Subject: [PATCH] Adapt-redfishtool-to-python2
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
---
redfishtool/AccountService.py | 18 +++++++++---------
redfishtool/Chassis.py | 22 +++++++++++-----------
redfishtool/Managers.py | 29 ++++++++++++++---------------
redfishtool/ServiceRoot.py | 2 +-
redfishtool/SessionService.py | 10 +++++-----
redfishtool/Systems.py | 36 ++++++++++++++++++------------------
redfishtool/raw.py | 2 +-
redfishtool/redfishtoolTransport.py | 29 ++++++++++++++---------------
setup.py | 1 +
9 files changed, 74 insertions(+), 75 deletions(-)
diff --git a/redfishtool/AccountService.py b/redfishtool/AccountService.py
index e0ec106..bfb17f8 100644
--- a/redfishtool/AccountService.py
+++ b/redfishtool/AccountService.py
@@ -34,7 +34,7 @@ import getopt
import re
import sys
from .ServiceRoot import RfServiceRoot
-from urllib.parse import urljoin
+from urlparse import urljoin
class RfAccountServiceMain():
def __init__(self):
@@ -259,13 +259,13 @@ class RfAccountServiceOperations():
#loop through the members and create the list sub-operation response
rc,r,j,d=rft.listCollection(rft, r, d, prop="UserName")
if(rc==0):
- rft.printVerbose(1," list {} Collection member info: Id, URI, UserName".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," list {} Collection member info: Id, URI, UserName".format(collName), skip1=True, printV12=cmdTop)
# else: check if no account was specified. If not, return the collection
elif(rft.IdLevel2OptnCount==0):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=accountsLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
# else: check if the -a (all) option is set. If not, return the session specific by -i or -m or -l
# search collection to find path using getPath2
@@ -287,14 +287,14 @@ class RfAccountServiceOperations():
elif( r is None ):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
# else, return ALL of the Accounts members
else:
rft.printVerbose(4,"getting expanded Accounts Collection")
rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=accountsLink)
if(rc==0):
- rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
return(rc,r,j,d)
@@ -324,13 +324,13 @@ class RfAccountServiceOperations():
#loop through the members and create the list sub-operation response
rc,r,j,d=rft.listCollection(rft, r, d, prop="IsPredefined")
if(rc==0):
- rft.printVerbose(1," list {} Collection member info: Id, URI, IsPredefined".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," list {} Collection member info: Id, URI, IsPredefined".format(collName), skip1=True, printV12=cmdTop)
# else: check if no account was specified. If not, return the collection
elif(rft.IdLevel2OptnCount==0):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=rolesLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
# else: check if the -a (all) option is set. If not, return the session specific by -i or -m or -l
# search collection to find path using getPath2
@@ -352,14 +352,14 @@ class RfAccountServiceOperations():
elif( r is None ):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
# else, return ALL of the Accounts members
else:
rft.printVerbose(4,"getting expanded Roles Collection")
rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=rolesLink)
if(rc==0):
- rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
return(rc,r,j,d)
diff --git a/redfishtool/Chassis.py b/redfishtool/Chassis.py
index d8f0bf5..0494bd9 100644
--- a/redfishtool/Chassis.py
+++ b/redfishtool/Chassis.py
@@ -37,7 +37,7 @@ import getopt
import re
import sys
from .ServiceRoot import RfServiceRoot
-from urllib.parse import urljoin
+from urlparse import urljoin
class RfChassisMain():
def __init__(self):
@@ -208,7 +208,7 @@ class RfChassisOperations():
rft.printVerbose(4,"Expand Chassis collection to return ALL Chassis collection members fully expanded in response")
rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=systemsLink)
if(rc==0):
- rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
# otherwise, just return the collection
# now read the /Chassis collection
@@ -217,7 +217,7 @@ class RfChassisOperations():
if cmdTop is True: prop=rft.prop
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=systemsLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," Chassis Collection:",skip1=True, printV12=cmdTop)
+ rft.printVerbose(1," Chassis Collection:", skip1=True, printV12=cmdTop)
return(rc,r,j,d)
@@ -262,7 +262,7 @@ class RfChassisOperations():
#loop through the members and create the list sub-operation response
rc,r,j,d=rft.listCollection(rft, r, d, prop="AssetTag")
if(rc==0):
- rft.printVerbose(1," list {} Collection member info: Id, URI, AssetTag".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," list {} Collection member info: Id, URI, AssetTag".format(collName), skip1=True, printV12=cmdTop)
return(rc,r,j,d)
@@ -439,7 +439,7 @@ class RfChassisOperations():
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=resLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Resource ".format(resName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Resource ".format(resName), skip1=True, printV12=cmdTop)
return(rc,r,j,d)
@@ -464,7 +464,7 @@ class RfChassisOperations():
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=resLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Resource ".format(resName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Resource ".format(resName), skip1=True, printV12=cmdTop)
return(rc,r,j,d)
@@ -521,13 +521,13 @@ class RfChassisOperations():
if( prop in powerControl[indx] ):
respDataVal=powerControl[indx][prop]
respData={prop: respDataVal}
- rft.printVerbose(1," Get Current Power consumption (PowerConsumedWatts) of PowerControl[{}] resource".format(indx,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," Get Current Power consumption (PowerConsumedWatts) of PowerControl[{}] resource".format(indx), skip1=True, printV12=cmdTop)
else:
rft.printErr("Error: Property {} not not returned in PowerControl[{}] resource".format(prop,indx))
return(4,r,j,d)
else:
respData=powerControl[indx] #return the full powerControl array
- rft.printVerbose(1," Chassis PowerControl[{}] array:".format(indx,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," Chassis PowerControl[{}] array:".format(indx), skip1=True, printV12=cmdTop)
return(rc,r,j,respData)
@@ -684,13 +684,13 @@ class RfChassisOperations():
#loop through the members and create the list sub-operation response
rc,r,j,d=rft.listCollection(rft, r, d, prop="Name")
if(rc==0):
- rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
# else: check if no Log was specified. If not, return the collection
elif(rft.IdLevel2OptnCount==0):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=logLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
# else: check if the -a (all) option is set. If not, return the proc specific by -i or -m
# search collection to find path using getPath2
@@ -712,7 +712,7 @@ class RfChassisOperations():
elif( r is None ):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
# If '--Entries' specified, get "Entries" nav link and read it
if rc == 0 and rft.gotEntriesOptn:
diff --git a/redfishtool/Managers.py b/redfishtool/Managers.py
index 586a871..400dad7 100644
--- a/redfishtool/Managers.py
+++ b/redfishtool/Managers.py
@@ -37,7 +37,7 @@ import getopt
import re
import sys
from .ServiceRoot import RfServiceRoot
-from urllib.parse import urljoin
+from urlparse import urljoin
class RfManagersMain():
def __init__(self):
@@ -211,7 +211,7 @@ class RfManagersOperations():
rft.printVerbose(4,"Expand Managers collection to return ALL Managers collection members fully expanded in response")
rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=systemsLink)
if(rc==0):
- rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
# otherwise, just return the collection
# now read the /Managers collection
@@ -467,7 +467,7 @@ class RfManagersOperations():
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=resLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Resource ".format(resName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Resource ".format(resName), skip1=True, printV12=cmdTop)
return(rc,r,j,d)
@@ -503,13 +503,13 @@ class RfManagersOperations():
#loop through the members and create the list sub-operation response
rc,r,j,d=rft.listCollection(rft, r, d, prop="Name")
if(rc==0):
- rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
# else: check if no NIC was specified. If not, return the collection
elif(rft.IdLevel2OptnCount==0):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=nicLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
# else: check if the -a (all) option is set. If not, return the proc specific by -i or -m
# search collection to find path using getPath2
@@ -531,14 +531,14 @@ class RfManagersOperations():
elif( r is None ):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
# else, return ALL of the EthernetInterfaces members
else:
rft.printVerbose(4,"getting expanded EthernetInterfaces Collection")
rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=nicLink)
if(rc==0):
- rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
return(rc,r,j,d)
@@ -568,13 +568,13 @@ class RfManagersOperations():
#loop through the members and create the list sub-operation response
rc,r,j,d=rft.listCollection(rft, r, d, prop="Name" )
if(rc==0):
- rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
# else: check if no SerialInterfaces controller was specified. If not, return the collection
elif(rft.IdLevel2OptnCount==0):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=cntlrLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
# else: check if the -a (all) option is set. If not, return the proc specific by -i or -m
# search collection to find path using getPath2
@@ -596,14 +596,14 @@ class RfManagersOperations():
elif( r is None ):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
# else, return ALL of the SerialInterfaces members
else:
rft.printVerbose(4,"getting expanded SerialInterfaces Collection")
rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=cntlrLink)
if(rc==0):
- rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
return(rc,r,j,d)
@@ -633,13 +633,12 @@ class RfManagersOperations():
#loop through the members and create the list sub-operation response
rc,r,j,d=rft.listCollection(rft, r, d, prop="Name")
if(rc==0):
- rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
-
+ rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
# else: check if no Log was specified. If not, return the collection
elif(rft.IdLevel2OptnCount==0):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=logLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
# else: check if the -a (all) option is set. If not, return the proc specific by -i or -m
# search collection to find path using getPath2
@@ -661,7 +660,7 @@ class RfManagersOperations():
elif( r is None ):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
# If '--Entries' specified, get "Entries" nav link and read it
if rc == 0 and rft.gotEntriesOptn:
diff --git a/redfishtool/ServiceRoot.py b/redfishtool/ServiceRoot.py
index 5d85b5d..9395b83 100644
--- a/redfishtool/ServiceRoot.py
+++ b/redfishtool/ServiceRoot.py
@@ -12,7 +12,7 @@
#
import requests
import json
-from urllib.parse import urljoin, urlparse, urlunparse
+from urlparse import urljoin, urlparse, urlunparse
class RfServiceRoot:
def __init__(self):
diff --git a/redfishtool/SessionService.py b/redfishtool/SessionService.py
index 7a07811..c7a1624 100644
--- a/redfishtool/SessionService.py
+++ b/redfishtool/SessionService.py
@@ -30,7 +30,7 @@ import getopt
import re
import sys
from .ServiceRoot import RfServiceRoot
-from urllib.parse import urljoin
+from urlparse import urljoin
class RfSessionServiceMain():
def __init__(self):
@@ -267,13 +267,13 @@ class RfSessionServiceOperations():
#loop through the members and create the list sub-operation response
rc,r,j,d=rft.listCollection(rft, r, d, prop="UserName")
if(rc==0):
- rft.printVerbose(1," list {} Collection member info: Id, URI, Socket".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," list {} Collection member info: Id, URI, Socket".format(collName), skip1=True, printV12=cmdTop)
# else: check if no session was specified. If not, return the collection
elif(rft.IdLevel2OptnCount==0):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=sessionsLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
# else: check if the -a (all) option is set. If not, return the session specific by -i or -m or -l
# search collection to find path using getPath2
@@ -295,14 +295,14 @@ class RfSessionServiceOperations():
elif( r is None ):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
# else, return ALL of the Sessions members
else:
rft.printVerbose(4,"getting expanded Sessions Collection")
rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=sessionsLink)
if(rc==0):
- rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
return(rc,r,j,d)
diff --git a/redfishtool/Systems.py b/redfishtool/Systems.py
index 9a7dfbe..9a9148a 100644
--- a/redfishtool/Systems.py
+++ b/redfishtool/Systems.py
@@ -39,7 +39,7 @@ import getopt
import re
import sys
from .ServiceRoot import RfServiceRoot
-from urllib.parse import urljoin
+from urlparse import urljoin
class RfSystemsMain():
def __init__(self):
@@ -216,7 +216,7 @@ class RfSystemsOperations():
rft.printVerbose(4,"Expand Systems collection to return ALL Systems collection members fully expanded in response")
rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=systemsLink)
if(rc==0):
- rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
# otherwise, just return the collection
# now read the /Systems collection
@@ -419,7 +419,7 @@ class RfSystemsOperations():
reqData=reqPostData)
if(rc==0):
- rft.printVerbose(1," Systems reset: ", resetType, skip1=True, printV12=cmdTop)
+ rft.printVerbose(1,(" Systems reset: {}").format(resetType), skip1=True, printV12=cmdTop)
resetd=None
return(rc,r,False,resetd)
else: return(rc,r,False,None)
@@ -623,13 +623,13 @@ class RfSystemsOperations():
#loop through the members and create the list sub-operation response
rc,r,j,d=rft.listCollection(rft, r, d, prop="Socket")
if(rc==0):
- rft.printVerbose(1," list {} Collection member info: Id, URI, Socket".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," list {} Collection member info: Id, URI, Socket".format(collName), skip1=True, printV12=cmdTop)
# else: check if no proc was specified. If not, return the collection
elif(rft.IdLevel2OptnCount==0):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=procsLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
# else: check if the -a (all) option is set. If not, return the proc specific by -i or -m
# search collection to find path using getPath2
@@ -651,14 +651,14 @@ class RfSystemsOperations():
elif( r is None ):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
# else, return ALL of the processor members
else:
rft.printVerbose(4,"getting expanded Processor Collection")
rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=procsLink)
if(rc==0):
- rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
return(rc,r,j,d)
@@ -688,13 +688,13 @@ class RfSystemsOperations():
#loop through the members and create the list sub-operation response
rc,r,j,d=rft.listCollection(rft, r, d, prop="Name")
if(rc==0):
- rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
# else: check if no NIC was specified. If not, return the collection
elif(rft.IdLevel2OptnCount==0):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=nicLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
# else: check if the -a (all) option is set. If not, return the proc specific by -i or -m
# search collection to find path using getPath2
@@ -716,14 +716,14 @@ class RfSystemsOperations():
elif( r is None ):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
# else, return ALL of the EthernetInterfaces members
else:
rft.printVerbose(4,"getting expanded EthernetInterfaces Collection")
rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=nicLink)
if(rc==0):
- rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
return(rc,r,j,d)
@@ -753,13 +753,13 @@ class RfSystemsOperations():
#loop through the members and create the list sub-operation response
rc,r,j,d=rft.listCollection(rft, r, d, prop="Name" )
if(rc==0):
- rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
# else: check if no SimpleStorage controller was specified. If not, return the collection
elif(rft.IdLevel2OptnCount==0):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=cntlrLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
# else: check if the -a (all) option is set. If not, return the proc specific by -i or -m
# search collection to find path using getPath2
@@ -781,14 +781,14 @@ class RfSystemsOperations():
elif( r is None ):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
# else, return ALL of the SimpleStorage members
else:
rft.printVerbose(4,"getting expanded SimpleStorage Collection")
rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=cntlrLink)
if(rc==0):
- rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
return(rc,r,j,d)
@@ -818,13 +818,13 @@ class RfSystemsOperations():
#loop through the members and create the list sub-operation response
rc,r,j,d=rft.listCollection(rft, r, d, prop="Name")
if(rc==0):
- rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
# else: check if no Log was specified. If not, return the collection
elif(rft.IdLevel2OptnCount==0):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=logLink, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
# else: check if the -a (all) option is set. If not, return the proc specific by -i or -m
# search collection to find path using getPath2
@@ -846,7 +846,7 @@ class RfSystemsOperations():
elif( r is None ):
rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
if(rc==0):
- rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
+ rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
# If '--Entries' specified, get "Entries" nav link and read it
if rc == 0 and rft.gotEntriesOptn:
diff --git a/redfishtool/raw.py b/redfishtool/raw.py
index bfb617c..1b32d0b 100644
--- a/redfishtool/raw.py
+++ b/redfishtool/raw.py
@@ -30,7 +30,7 @@ import getopt
import re
import sys
#from .ServiceRoot import RfServiceRoot
-from urllib.parse import urljoin, urlparse, urlunparse
+from urlparse import urljoin, urlparse, urlunparse
class RfRawMain():
def __init__(self):
diff --git a/redfishtool/redfishtoolTransport.py b/redfishtool/redfishtoolTransport.py
index 017fa11..f157eff 100644
--- a/redfishtool/redfishtoolTransport.py
+++ b/redfishtool/redfishtoolTransport.py
@@ -39,7 +39,7 @@ import json
import sys
import socket
import time
-from urllib.parse import urljoin, urlparse, urlunparse
+from urlparse import urljoin, urlparse, urlunparse
from requests.auth import HTTPBasicAuth, AuthBase
from .ServiceRoot import RfServiceRoot
@@ -730,31 +730,32 @@ class RfTransport():
return(0)
- def printVerbose(self,v,*argv, skip1=False, printV12=True,**kwargs):
+ def printVerbose(self,v, argv, skip1=False, printV12=True):
if(self.quiet):
return(0)
if( (v==1 or v==2) and (printV12 is True) and (self.verbose >= v )):
if(skip1 is True): print("#")
- print("#",*argv, **kwargs)
+ print("#", argv)
elif( (v==1 or v==2) and (self.verbose >4 )):
if(skip1 is True): print("#")
- print("#",*argv, **kwargs)
+ print("#", argv)
elif((v==3 ) and (printV12 is True) and (self.verbose >=v)):
if(skip1 is True): print("#")
- print("#REQUEST:",*argv,file=sys.stdout,**kwargs)
+ sys.stdout.write("#REQUEST:",argv)
+ # print("#REQUEST:",argv,file=sys.stdout)
elif((v==4 or v==5) and (self.verbose >=v)):
if(skip1 is True): print("#")
- print("#DB{}:".format(v),*argv,file=sys.stdout,**kwargs)
+ sys.stdout.write("#DB{}:".format(v),argv)
+ # print("#DB{}:".format(v),argv,file=sys.stdout)
elif( v==0): #print no mater value of verbose, but not if quiet=1
if(skip1 is True): print("")
- print(*argv, **kwargs)
+ print(argv)
else:
pass
sys.stdout.flush()
#if you set v= anything except 0,1,2,3,4,5 it is ignored
-
def printStatus(self, s, r=None, hdrs=None, authMsg=None, addSessionLoginInfo=False):
if(self.quiet):
return(0)
@@ -785,22 +786,20 @@ class RfTransport():
sys.stdout.flush()
-
-
- def printErr(self,*argv,noprog=False,prepend="",**kwargs):
+ def printErr(self,argv,noprog=False,prepend=""):
if( self.quiet == False):
if(noprog is True):
- print(prepend,*argv, file=sys.stderr, **kwargs)
+ sys.stderr.write("{}{}".format(prepend,argv))
else:
- print(prepend," {}:".format(self.program),*argv, file=sys.stderr, **kwargs)
+ sys.stderr.write("{} {}:{}".format(prepend, self.program, argv))
else:
pass
-
+
sys.stderr.flush()
return(0)
- def printStatusErr4xx(self, status_code,*argv,noprog=False, prepend="",**kwargs):
+ def printStatusErr4xx(self, status_code):
if(self.quiet):
return(0)
if( status_code < 400 ):
diff --git a/setup.py b/setup.py
index d37d099..481f429 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,6 @@
from setuptools import setup
from os import path
+from io import open
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
--
2.7.4

View File

@ -1,26 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "HPE 3PAR HTTP REST Client"
HOMEPAGE = "https://pythonhosted.org/python-3parclient/"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=c6f4d3b3208673edc0228bbc3ad053cc"
SRC_URI[md5sum] = "845e688b5607a71fc307e8371daf5d40"
SRC_URI[sha256sum] = "fcd1c5c7d9356f4244a6c0b2b6dd6c64366399642c348b02999ea8fbf79e3a8d"
PYPI_PACKAGE = "python-3parclient"
inherit setuptools pypi

View File

@ -1,41 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Microsoft Azure Active Directory Authentication Library (ADAL) for Python"
HOMEPAGE = "https://github.com/AzureAD/azure-activedirectory-library-for-python"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://setup.py;beginline=2;endline=27;md5=43b81fae9d7baa1f0b1c9774a68ca33a"
inherit pypi setuptools
PYPI_PACKAGE = "adal"
SRC_URI[md5sum] = "895791621c696fbbb00dee975260f890"
SRC_URI[sha256sum] = "4c020807b3f3cfd90f59203077dd5e1f59671833f8c3c5028ec029ed5072f9ce"
RDEPENDS_${PN} += " \
${PYTHON_PN}-requests \
${PYTHON_PN}-dateutil \
${PYTHON_PN}-pyjwt \
${PYTHON_PN}-crypt \
${PYTHON_PN}-datetime \
${PYTHON_PN}-json \
${PYTHON_PN}-logging \
${PYTHON_PN}-netclient \
${PYTHON_PN}-threading \
${PYTHON_PN}-xml \
"

View File

@ -1,29 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = " \
Alabaster is a visually (c)lean, responsive, configurable theme for the \
Sphinx documentation system. It is Python 2+3 compatible. \
"
HOMEPAGE = "https://alabaster.readthedocs.io/en/latest/"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=da053683d66d543813a727e8a30c96ca"
SRC_URI[md5sum] = "3591827fde96d1dd23970fb05410ed04"
SRC_URI[sha256sum] = "a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"
PYPI_PACKAGE = "alabaster"
inherit setuptools pypi

View File

@ -1,30 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Low-level AMQP client for Python"
HOMEPAGE = "https://pypi.python.org/pypi/amqp/"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9d6ba772ac59c08a25a12ce15bd5f27b"
SRC_URI[md5sum] = "852ecff645c00f124c78915fcc8ea7c0"
SRC_URI[sha256sum] = "77f1aef9410698d20eaeac5b73a87817365f457a507d82edf292e12cbb83b08d"
PYPI_PACKAGE = "amqp"
inherit setuptools pypi
RDEPENDS_${PN} += " \
python-vine \
"

View File

@ -1,61 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "client library for Aodh built on the Aodh API"
HOMEPAGE = "https://launchpad.net/python-aodhclient"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRCREV = "6d03e61986418a3a95635405ae65ae9f28a5c61e"
SRCNAME = "python-aodhclient"
BRANCH = "stable/train"
PROTOCOL = "https"
PV = "1.2.0+git${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools monitor rmargparse
DEPENDS += " \
python-pip \
python-pbr-native\
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
RDEPENDS_${PN} += " \
python-pbr \
python-cliff \
python-oslo.i18n \
python-oslo.serialization \
python-oslo.utils \
python-keystoneauth1 \
python-six \
python-osc-lib \
python-pyparsing \
"
do_install_append() {
:
}
FILES_${PN} += " \
"

View File

@ -1,5 +0,0 @@
# A Python "namespace package" http://www.python.org/dev/peps/pep-0382/
# This always goes inside of a namespace package's __init__.py
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)

View File

@ -1,40 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SUMMARY = "Helper package to avoid backports/__init__.py conflicts"
DETAIL = "backports packages in python2 suffer from a flaw in the namespace \
implementation and can conflict with each other. For OE purposes, at least \
fix the conflicting install of .../site-packages/backports/__init__.py"
AUTHOR = "Tim Orling <ticotimo@gmail.com>"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://backports/__init__.py"
inherit python-dir
# provide to avoid warnings
do_compile() {
:
}
do_install() {
install -d ${D}${PYTHON_SITEPACKAGES_DIR}/backports
install ${WORKDIR}/backports/__init__.py ${D}${PYTHON_SITEPACKAGES_DIR}/backports/
}
FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py"

View File

@ -1,169 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Barbican is a ReST API designed for the secure storage, provisioning and management of secrets."
HOMEPAGE = "https://wiki.openstack.org/wiki/Barbican"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fc8be9e7dffe97390d1216b01fd0be01"
PR = "r0"
SRCNAME = "barbican"
BARBICAN_MAX_PACKET_SIZE ?= "65535"
SRC_URI = " \
git://github.com/openstack/barbican.git;branch=${BRANCH} \
file://${BPN}/barbican-fix-path-to-find-configuration-files.patch \
file://${BPN}/openstack-barbican-api.service \
file://${BPN}/openstack-barbican-worker.service \
file://${BPN}/openstack-barbican-keystone-listener.service \
file://${BPN}/gunicorn-config.py \
"
SRCREV = "4c0ddda941289fba8e5ec4341b5d02d155d46162"
BRANCH = "stable/stein"
PV = "8.0.0+git${SRCPV}"
S = "${WORKDIR}/git"
inherit update-rc.d setuptools identity hosts useradd default_configs monitor systemd
SYSTEMD_SERVICE_${SRCNAME} = " \
openstack-barbican-api.service \
openstack-barbican-worker.service \
openstack-barbican-keystone-listener.service \
"
SYSTEMD_AUTO_ENABLE_${SRCNAME} = "disable"
SERVICECREATE_PACKAGES = "${SRCNAME}-setup"
KEYSTONE_HOST="${CONTROLLER_IP}"
# USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set.
# If the flag for a parameter in the list is not set here, the default value will be given to that parameter.
# Parameters not in the list will be set to empty.
USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl"
python () {
flags = {'type':'keystore',\
'description':'Barbican Key Management Service',\
'publicurl':"'http://${KEYSTONE_HOST}:9311/v1'",\
'adminurl':"'http://${KEYSTONE_HOST}:9312/v1'",\
'internalurl':"'http://${KEYSTONE_HOST}:9313/v1'"}
d.setVarFlags("SERVICECREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags)
}
SERVICECREATE_PACKAGES[vardeps] += "KEYSTONE_HOST"
do_install_append() {
TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME}
BARBICAN_CONF_DIR=${D}${sysconfdir}/${SRCNAME}
install -d ${BARBICAN_CONF_DIR}
cp -r ${TEMPLATE_CONF_DIR}/* ${BARBICAN_CONF_DIR}
install -d ${D}${localstatedir}/lib/barbican
# Install the systemd service files
install -d ${D}${systemd_system_unitdir}/
install -m 644 ${WORKDIR}/${BPN}/*.service ${D}${systemd_system_unitdir}
# python-gunicorn and gunicorn-config.py are required by openstack-barbican-api.service
install -m 644 ${WORKDIR}/${PN}/gunicorn-config.py ${BARBICAN_CONF_DIR}
# Modify barbican-api-paste.ini for gunicorn
echo '[server:main]' >> ${BARBICAN_CONF_DIR}/barbican-api-paste.ini
echo 'use = egg:gunicorn#main' >> ${BARBICAN_CONF_DIR}/barbican-api-paste.ini
sed -e "s:%BARBICAN_CONF_DIR%:${sysconfdir}/${SRCNAME}:g" \
-i ${D}/${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/tests/api/test_resources_policy.py
}
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system barbican"
USERADD_PARAM_${PN} = "--system --home /var/lib/barbican -g barbican \
--no-create-home --shell /bin/false barbican"
PACKAGES += "${SRCNAME} \
${SRCNAME}-setup "
FILES_${PN} = "${libdir}/* \
"
FILES_${SRCNAME} = "${sysconfdir}/${SRCNAME}/* \
${sysconfdir}/init.d/barbican-api \
${bindir} \
${bindir}/* \
${localstatedir}/* \
${systemd_system_unitdir} \
"
ALLOW_EMPTY_${SRCNAME}-setup = "1"
pkg_postinst_${SRCNAME}-setup () {
if [ -z "$D" ]; then
chown -R barbican:barbican ${sysconfdir}/${SRCNAME}
chown -R barbican:barbican ${localstatedir}/lib/barbican
fi
}
DEPENDS += " \
python-pip \
python-pbr-native \
"
# Stx config files
DEPENDS += " \
openstack-barbican-api \
"
RDEPENDS_${SRCNAME} = "${PN} \
${SRCNAME}-setup \
uwsgi \
python-falcon \
python-oslo.messaging"
RDEPENDS_${PN} += " \
python-pip \
python-pbr \
python-alembic \
python-babel \
python-eventlet \
python-falcon \
python-iso8601 \
python-jsonschema \
python-kombu \
python-netaddr \
python-pastedeploy \
python-paste \
python-pycrypto \
python-pysqlite \
python-keystoneclient \
python-sqlalchemy \
python-stevedore \
python-webob \
python-wsgiref \
python-barbicanclient \
python-gunicorn \
python-castellan \
python-ldap3 \
"
INITSCRIPT_PACKAGES = "${SRCNAME}"
INITSCRIPT_NAME_${SRCNAME} = "barbican-api"
INITSCRIPT_PARAMS_${SRCNAME} = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
MONITOR_SERVICE_PACKAGES = "${SRCNAME}"
MONITOR_SERVICE_${SRCNAME} = "barbican"
FILES_${PN}_append = " ${datadir}/"

View File

@ -1,49 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Generic Key Manager interface for OpenStack"
HOMEPAGE = "https://github.com/openstack/castellan"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRCREV = "8e2929b8779eaa03f15a25da5cf64ef8539a026b"
SRCNAME = "castellan"
PROTOCOL = "https"
BRANCH = "stable/stein"
S = "${WORKDIR}/git"
PV = "0.17.0+git${SRCPV}"
SRC_URI = "git://opendev.org/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
DEPENDS += " \
python-pip \
python-pbr-native \
"
RDEPENDS_${PN} += " \
python-pbr \
python-babel \
python-cryptography \
python-barbicanclient \
python-oslo.config \
python-oslo.context \
python-oslo.i18n \
python-oslo.log \
python-oslo.utils \
python-keystoneauth1 \
"

View File

@ -1,14 +0,0 @@
#! /bin/bash
CMD="cinder list"
data=$($CMD 2>&1)
res=$?
if [ ${res} -eq 127 ]; then
exit 0
elif [ ${res} -ne 0 ]; then
echo "OpenStack \"cinder api\" failed: "
echo $data
exit $res
fi
exit 0

View File

@ -1,63 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Client for the OpenStack Cinder API"
HOMEPAGE = "https://opendev.org/openstack/python-cinderclient"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3572962e13e5e739b30b0864365e0795"
SRCREV = "4e17e1d1912f1902a37e4db543e38cdbe3961358"
SRCNAME = "python-cinderclient"
BRANCH = "stable/train"
PROTOCOL = "https"
PV = "4.1.0+git${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
DEPENDS += " \
python-pip \
python-pbr-native\
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
RDEPENDS_${PN} += " \
bash \
python-pbr \
python-prettytable \
python-keystoneauth1 \
python-oslo.i18n \
python-oslo.utils \
python-six \
python-osc-lib \
python-babel \
python-requests \
python-simplejson \
"
do_install_append() {
:
}
FILES_${PN} += " \
"

View File

@ -1,47 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Command Line Interface Formulation Framework"
HOMEPAGE = "https://github.com/dreamhost/cliff"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRC_URI[md5sum] = "4c5d43d98970c79b091e25676cce2b10"
SRC_URI[sha256sum] = "b47387a344898ccb28ca7f386f017ade9eb66dc1713e5c642a0bc09ec606cc67"
inherit setuptools pypi
DEPENDS += "\
python-pbr \
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
RDEPENDS_${PN} += "python-prettytable \
python-cmd2 \
python-pbr \
python-pyparsing \
python-prettytable \
python-six \
python-stevedore \
python-unicodecsv \
python-pyyaml \
"
CLEANBROKEN = "1"

View File

@ -1,38 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SUMMARY = "Extensions to the standard Python datetime module"
DESCRIPTION = "The dateutil module provides powerful extensions to the datetime module available in the Python standard library."
HOMEPAGE = "https://dateutil.readthedocs.org"
LICENSE = "BSD-3-Clause & Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3155c7bdc71f66e02678411d2abf996"
SRC_URI[md5sum] = "f2a1d4b680b297b367a974664ca3a4f6"
SRC_URI[sha256sum] = "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"
PYPI_PACKAGE = "python-dateutil"
inherit pypi
PACKAGES =+ "${PN}-zoneinfo"
FILES_${PN}-zoneinfo = "${libdir}/${PYTHON_DIR}/site-packages/dateutil/zoneinfo"
DEPENDS += "${PYTHON_PN}-setuptools-scm-native"
RDEPENDS_${PN}_class-target = "\
${PYTHON_PN}-datetime \
${PYTHON_PN}-numbers \
${PYTHON_PN}-six \
${PYTHON_PN}-stringold \
"

View File

@ -1,17 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
inherit setuptools
require python-dateutil.inc

View File

@ -1,26 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SUMMARY = "defusedxml -- defusing XML bombs and other exploits"
HOMEPAGE = "https://github.com/tiran/defusedxml"
LICENSE = "Python-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=056fea6a4b395a24d0d278bf5c80249e"
#a5c8025e305fb49e6d405769358851f6
SRC_URI[md5sum] = "a59741f675c4cba649de40a99f732897"
SRC_URI[sha256sum] = "f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5"
inherit pypi setuptools

View File

@ -1,39 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Tools for using Babel with Django"
HOMEPAGE = "https://github.com/python-babel/django-babel"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=5ae97ab65116b8d7890c59de57577b46"
SRCREV = "1da5c0ba7ef3b12810154d9e64b3e847ecbb06cc"
SRCNAME = "django-babel"
BRANCH = "master"
PROTOCOL = "https"
PV = "0.6.2+git${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/python-babel/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
DEPENDS += " python-pip"
RDEPENDS_${PN}_append = " \
python-django \
python-babel \
"

View File

@ -1,36 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "client library for Aodh built on the Aodh API"
HOMEPAGE = "https://launchpad.net/python-aodhclient"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause & Python-2.0"
LIC_FILES_CHKSUM = " \
file://LICENSE;md5=f09eb47206614a4954c51db8a94840fa\
file://LICENSE.python;md5=6b60258130e4ed10d3101517eb5b9385 \
"
SRCREV = "1c9cb948d7b0c264d244763b6682ab790a6b90a0"
SRCNAME = "django"
BRANCH = "stable/1.11.x"
PROTOCOL = "https"
PV = "1.11.20+git${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/django/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
FILES_${PN} += "${datadir}/django/"

View File

@ -1,30 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "A Python library for the Docker Engine API"
HOMEPAGE = "https://pypi.org/project/docker/3.3.0"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=34f3846f940453127309b920eeb89660"
SRC_URI[md5sum] = "660c3c0c3776cb88f34fc549d7c89ed2"
SRC_URI[sha256sum] = "dc5cc0971a0d36fe94c5ce89bd4adb6c892713500af7b0818708229c3199911a"
inherit setuptools pypi
RDEPENDS_${PN}_append = " \
python-docker-pycreds \
python-backports-ssl \
"

View File

@ -1,40 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Useful additions to futures, from the future"
HOMEPAGE = "https://pypi.python.org/pypi/futurist"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRC_URI[md5sum] = "3e5a4b8254ded1624ec807cb7ae04ba5"
SRC_URI[sha256sum] = "499ee57728a987028725f836ac22aa18899702162fa0a0f1bbe2ecd5c8daf1eb"
inherit setuptools pypi
DEPENDS += " \
python-pip \
python-pbr-native \
"
RDEPENDS_${PN} += " \
python-pbr \
python-six \
python-monotonic \
python-futures \
python-contextlib2 \
python-prettytable \
"

View File

@ -1,62 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Client library for Glance built on the OpenStack Images API."
HOMEPAGE = "https://opendev.org/openstack/python-glanceclient"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658"
SRCREV = "44a4dbd6ce2642daeaca9f45ac99e2d1b39e805a"
SRCNAME = "python-glanceclient"
BRANCH = "stable/train"
PROTOCOL = "https"
PV = "2.16.0+git${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools monitor rmargparse
DEPENDS += " \
python-pip \
python-pbr-native\
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
RDEPENDS_${PN} += " \
bash \
python-pbr \
python-prettytable \
python-keystoneauth1 \
python-warlock \
python-six \
python-oslo.utils \
python-oslo.i18n \
python-wrapt \
python-pyopenssl \
"
do_install_append() {
:
}
FILES_${PN} += " \
"

View File

@ -1,36 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "python-gnocchiclient"
STABLE = "master"
PROTOCOL = "https"
BRANCH = "master"
SRCREV = "64814b9ace54e0151e9c28f4e57b87dafc984241"
S = "${WORKDIR}/git"
PV = "7.0.4"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRC_URI = "git://github.com/gnocchixyz/python-gnocchiclient.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
DEPENDS += " \
python \
python-pbr-native \
"
RDEPENDS_${PN}_append = " python-ujson"
inherit setuptools

View File

@ -1,28 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = " \
This module analyzes JPEG/JPEG 2000/PNG/GIF/TIFF/SVG image headers and returns image size. \
"
HOMEPAGE = "https://github.com/shibukawa/imagesize_py"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=0c128f0f7e8a02e1b83884c0b5a41cda"
SRC_URI[md5sum] = "3a1e124594183778a8f87e4bcdb6dca9"
SRC_URI[sha256sum] = "b1f6b5a4eab1f73479a50fb79fcf729514a900c341d8503d62a62dbc4127a2b1"
PYPI_PACKAGE = "imagesize"
inherit setuptools pypi

View File

@ -1,42 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SUMMARY = "Read metadata from Python packages"
DESCRIPTION = "Read metadata from Python packages"
HOMEPAGE = "https://pypi.org/project/importlib-metadata/"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e88ae122f3925d8bde8319060f2ddb8e"
SRC_URI[md5sum] = "80d677d744995336c9c22d21a85ddeb8"
SRC_URI[sha256sum] = "aa18d7378b00b40847790e7c27e11673d7fed219354109d0e7b9e5b25dc3ad26"
DEPENDS += "${PYTHON_PN}-setuptools-scm-native"
PYPI_PACKAGE = "importlib_metadata"
inherit pypi setuptools
S = "${WORKDIR}/importlib_metadata-${PV}"
RDEPENDS_${PN} += "\
${PYTHON_PN}-zipp \
${PYTHON_PN}-pathlib2 \
python-compression \
python-configparser \
python-contextlib2 \
python-pathlib2 \
"
BBCLASSEXTEND = "native nativesdk"

View File

@ -1,39 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "python-ironicclient"
STABLE = "master"
PROTOCOL = "https"
BRANCH = "master"
PV = "2.7.0"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRC_URI = "https://tarballs.openstack.org/python-ironicclient/python-ironicclient-${PV}.tar.gz"
SRC_URI[md5sum] = "6b13e133eb0c521a09c377f28fef139e"
DEPENDS += " \
python \
python-pbr-native \
"
inherit setuptools
RDEPENDS_${PN}_append = " \
bash \
python-dogpile.cache \
"

View File

@ -1,317 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Authentication service for OpenStack"
HOMEPAGE = "http://www.openstack.org"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRCREV = "c78581b4608f3dc10e945d358963000f284f188a"
SRCNAME = "keystone"
PROTOCOL = "git"
BRANCH = "stable/stein"
S = "${WORKDIR}/git"
PV = "15.0.0+git${SRCPV}"
SRC_URI = " \
git://opendev.org/openstack/${SRCNAME}.git;protocol=${PROTOCOL};branch=${BRANCH} \
file://${PN}/keystone.conf \
file://${PN}/identity.sh \
file://${PN}/convert_keystone_backend.py \
file://${PN}/wsgi-keystone.conf \
file://${PN}/admin-openrc \
file://${PN}/keystone-init.service \
file://${PN}/stx-files/openstack-keystone.service \
file://${PN}/stx-files/keystone-all \
file://${PN}/stx-files/keystone-fernet-keys-rotate-active \
file://${PN}/stx-files/public.py \
file://${PN}/stx-files/password-rules.conf \
"
inherit setuptools identity hosts default_configs monitor useradd systemd
SERVICE_TOKEN = "password"
TOKEN_FORMAT ?= "PKI"
USERADD_PACKAGES = "${PN}"
USERADD_PARAM_${PN} = "--system -m -s /bin/false keystone"
LDAP_DN ?= "dc=my-domain,dc=com"
SERVICECREATE_PACKAGES = "${SRCNAME}-setup"
KEYSTONE_HOST="${CONTROLLER_IP}"
# USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be
# set. If the flag for a parameter in the list is not set here, the default
# value will be given to that parameter. Parameters not in the list will be set
# to empty.
USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
python () {
flags = {'name':'${ADMIN_USER}',\
'pass':'${ADMIN_PASSWORD}',\
'tenant':'${ADMIN_TENANT}',\
'role':'${ADMIN_ROLE}',\
'email':'${ADMIN_USER_EMAIL}',\
}
d.setVarFlags("USERCREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags)
}
SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl"
python () {
flags = {'type':'identity',\
'description':'OpenStack Identity',\
'publicurl':"'http://${KEYSTONE_HOST}:8081/keystone/main/v2.0'",\
'adminurl':"'http://${KEYSTONE_HOST}:8081/keystone/admin/v2.0'",\
'internalurl':"'http://${KEYSTONE_HOST}:8081/keystone/main/v2.0'"}
d.setVarFlags("SERVICECREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags)
}
do_install_append() {
KEYSTONE_CONF_DIR=${D}${sysconfdir}/keystone
KEYSTONE_DATA_DIR=${D}${localstatedir}/lib/keystone
KEYSTONE_PACKAGE_DIR=${D}${PYTHON_SITEPACKAGES_DIR}/keystone
APACHE_CONF_DIR=${D}${sysconfdir}/apache2/conf.d/
# Create directories
install -m 755 -d ${KEYSTONE_CONF_DIR}
install -m 755 -d ${KEYSTONE_DATA_DIR}
install -m 755 -d ${APACHE_CONF_DIR}
install -d ${D}${localstatedir}/log/${SRCNAME}
# Setup the systemd service file
install -d ${D}${systemd_system_unitdir}/
install -m 644 ${WORKDIR}/${PN}/keystone-init.service ${D}${systemd_system_unitdir}/keystone-init.service
mv ${D}/${datadir}/etc/keystone/sso_callback_template.html ${KEYSTONE_CONF_DIR}/
rm -rf ${D}/${datadir}
# Setup the admin-openrc file
KS_OPENRC_FILE=${KEYSTONE_CONF_DIR}/admin-openrc
install -m 600 ${WORKDIR}/${PN}/admin-openrc ${KS_OPENRC_FILE}
sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${KS_OPENRC_FILE}
sed -e "s:%ADMIN_USER%:${ADMIN_USER}:g" -i ${KS_OPENRC_FILE}
sed -e "s:%ADMIN_PASSWORD%:${ADMIN_PASSWORD}:g" -i ${KS_OPENRC_FILE}
# Install various configuration files. We have to select suitable
# permissions as packages such as Apache require read access.
#
# Apache needs to read the keystone.conf
install -m 644 ${WORKDIR}/${PN}/keystone.conf ${KEYSTONE_CONF_DIR}/
# Apache needs to read the wsgi-keystone.conf
install -m 644 ${WORKDIR}/${PN}/wsgi-keystone.conf ${APACHE_CONF_DIR}/keystone.conf
install -m 600 ${S}${sysconfdir}/logging.conf.sample ${KEYSTONE_CONF_DIR}/logging.conf
# Copy examples from upstream
cp -r ${S}/examples ${KEYSTONE_PACKAGE_DIR}
# Edit the configuration to allow it to work out of the box
KEYSTONE_CONF_FILE=${KEYSTONE_CONF_DIR}/keystone.conf
sed "/# admin_endpoint = .*/a \
public_endpoint = http://%CONTROLLER_IP%:5000/ " \
-i ${KEYSTONE_CONF_FILE}
sed "/# admin_endpoint = .*/a \
admin_endpoint = http://%CONTROLLER_IP%:35357/ " \
-i ${KEYSTONE_CONF_FILE}
sed -e "s:%SERVICE_TOKEN%:${SERVICE_TOKEN}:g" -i ${KEYSTONE_CONF_FILE}
sed -e "s:%DB_USER%:${DB_USER}:g" -i ${KEYSTONE_CONF_FILE}
sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${KEYSTONE_CONF_FILE}
sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${KEYSTONE_CONF_FILE}
sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${KEYSTONE_CONF_FILE}
sed -e "s:%TOKEN_FORMAT%:${TOKEN_FORMAT}:g" -i ${KEYSTONE_CONF_FILE}
install -d ${KEYSTONE_PACKAGE_DIR}/tests/tmp
if [ -e "${KEYSTONE_PACKAGE_DIR}/tests/test_overrides.conf" ];then
sed -e "s:%KEYSTONE_PACKAGE_DIR%:${PYTHON_SITEPACKAGES_DIR}/keystone:g" \
-i ${KEYSTONE_PACKAGE_DIR}/tests/test_overrides.conf
fi
if ${@bb.utils.contains('DISTRO_FEATURES', 'OpenLDAP', 'true', 'false', d)};
then
sed -i -e '/^\[identity\]/a \
driver = keystone.identity.backends.hybrid_identity.Identity \
\
[assignment]\
driver = keystone.assignment.backends.hybrid_assignment.Assignment\
' ${D}${sysconfdir}/keystone/keystone.conf
sed -i -e '/^\[ldap\]/a \
url = ldap://localhost \
user = cn=Manager,${LDAP_DN} \
password = secret \
suffix = ${LDAP_DN} \
use_dumb_member = True \
\
user_tree_dn = ou=Users,${LDAP_DN} \
user_attribute_ignore = enabled,email,tenants,default_project_id \
user_id_attribute = uid \
user_name_attribute = uid \
user_mail_attribute = email \
user_pass_attribute = keystonePassword \
\
tenant_tree_dn = ou=Groups,${LDAP_DN} \
tenant_desc_attribute = description \
tenant_domain_id_attribute = businessCategory \
tenant_attribute_ignore = enabled \
tenant_objectclass = groupOfNames \
tenant_id_attribute = cn \
tenant_member_attribute = member \
tenant_name_attribute = ou \
\
role_attribute_ignore = enabled \
role_objectclass = groupOfNames \
role_member_attribute = member \
role_id_attribute = cn \
role_name_attribute = ou \
role_tree_dn = ou=Roles,${LDAP_DN} \
' ${KEYSTONE_CONF_FILE}
install -m 0755 ${WORKDIR}/${PN}/convert_keystone_backend.py \
${D}${sysconfdir}/keystone/convert_keystone_backend.py
fi
install -m 755 ${WORKDIR}/${PN}/stx-files/keystone-fernet-keys-rotate-active ${D}/${bindir}/keystone-fernet-keys-rotate-active
install -m 440 ${WORKDIR}/${PN}/stx-files/password-rules.conf ${KEYSTONE_CONF_DIR}/password-rules.conf
install -m 755 ${WORKDIR}/${PN}/stx-files/public.py ${KEYSTONE_DATA_DIR}/public.py
install -m 644 ${WORKDIR}/${PN}/stx-files/openstack-keystone.service ${D}${systemd_system_unitdir}/openstack-keystone.service
install -m 755 ${WORKDIR}/${PN}/stx-files/keystone-all ${D}${bindir}/keystone-all
}
# By default tokens are expired after 1 day so by default we can set
# this token flush cronjob to run every 2 days
KEYSTONE_TOKEN_FLUSH_TIME ??= "0 0 */2 * *"
pkg_postinst_${SRCNAME}-cronjobs () {
if [ -z "$D" ]; then
# By default keystone expired tokens are not automatic removed out of the
# database. So we create a cronjob for cleaning these expired tokens.
echo "${KEYSTONE_TOKEN_FLUSH_TIME} root /usr/bin/keystone-manage token_flush" >> /etc/crontab
fi
}
pkg_postinst_${SRCNAME} () {
# openstak-keystone will be run in httpd/apache2 instead of standalone
ln -sf ${systemd_system_unitdir}/apache2.service $D${sysconfdir}/systemd/system/openstack-keystone.service
}
PACKAGES += " ${SRCNAME}-tests ${SRCNAME} ${SRCNAME}-setup ${SRCNAME}-cronjobs"
SYSTEMD_PACKAGES += "${SRCNAME}-setup"
SYSTEMD_SERVICE_${SRCNAME}-setup = "keystone-init.service"
SYSTEMD_SERVICE_${SRCNAME} = "openstack-keystone.service"
SYSTEMD_AUTO_ENABLE_${SRCNAME}-setup = "disable"
SYSTEMD_AUTO_ENABLE_${SRCNAME} = "disable"
FILES_${SRCNAME}-setup = " \
${systemd_system_unitdir}/keystone-init.service \
"
ALLOW_EMPTY_${SRCNAME}-cronjobs = "1"
FILES_${PN} = "${libdir}/* \
"
FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/run_tests.sh"
FILES_${SRCNAME} = "${bindir}/* \
${sysconfdir}/${SRCNAME}/* \
${localstatedir}/* \
${datadir}/openstack-dashboard/openstack_dashboard/api/keystone-httpd.py \
${sysconfdir}/apache2/conf.d/keystone.conf \
${systemd_system_unitdir}/openstack-keystone.service \
"
DEPENDS += " \
python-pip \
python-pbr-native \
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
RDEPENDS_${PN} += " \
python-babel \
python-pbr \
python-webob \
python-pastedeploy \
python-paste \
python-routes \
python-cryptography \
python-six \
python-sqlalchemy \
python-sqlalchemy-migrate \
python-stevedore \
python-passlib \
python-keystoneclient \
python-keystonemiddleware \
python-bcrypt \
python-scrypt \
python-oslo.cache \
python-oslo.concurrency \
python-oslo.config \
python-oslo.context \
python-oslo.messaging \
python-oslo.db \
python-oslo.i18n \
python-oslo.log \
python-oslo.middleware \
python-oslo.policy \
python-oslo.serialization \
python-oslo.utils \
python-oauthlib \
python-pysaml2 \
python-dogpile.cache \
python-jsonschema \
python-pycadf \
python-msgpack \
python-osprofiler \
python-flask \
python-flask-restful \
python-pytz \
"
RDEPENDS_${SRCNAME}-tests += " bash"
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'OpenLDAP', 'OpenLDAP', '', d)}"
PACKAGECONFIG[OpenLDAP] = ",,,python-ldap python-keystone-hybrid-backend"
# TODO:
# if DISTRO_FEATURE contains "tempest" then add *-tests to the main RDEPENDS
RDEPENDS_${SRCNAME} = " \
${PN} \
postgresql \
postgresql-client \
python-psycopg2 \
apache2 \
"
RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}"
RDEPENDS_${SRCNAME}-cronjobs = "cronie ${SRCNAME}"
MONITOR_SERVICE_PACKAGES = "${SRCNAME}"
MONITOR_SERVICE_${SRCNAME} = "keystone"

View File

@ -1,43 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Authentication Library for OpenStack Identity"
HOMEPAGE = "https://pypi.python.org/pypi/keystoneauth1"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=96f840d59b245a1c817fbcb901afc574"
SRC_URI[md5sum] = "0864f3485db8709d1dec0c8fa6073a31"
SRC_URI[sha256sum] = "db91ccab5cc43dac4a25dc2c090642d7c31f9ceb28df2c685620d7c12335a8cd"
inherit pypi
DEPENDS += " \
${PYTHON_PN}-pbr \
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
${PYTHON_PN}-pbr-native \
"
RDEPENDS_${PN} += " \
${PYTHON_PN}-pbr \
${PYTHON_PN}-iso8601 \
${PYTHON_PN}-requests \
${PYTHON_PN}-six \
${PYTHON_PN}-stevedore \
python2-os-service-types \
"

View File

@ -1,17 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
inherit setuptools
require python-keystoneauth1.inc

View File

@ -1,60 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Middleware for Openstack identity API"
HOMEPAGE = "https://launchpad.net/keystonemiddleware"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4a4d0e932ffae1c0131528d30d419c55"
SRCREV = "83d0612e03471f56be3be2b521cc21974118cebe"
SRCNAME = "keystonemiddleware"
BRANCH = "stable/train"
PROTOCOL = "https"
PV = "5.1.0"
S = "${WORKDIR}/git"
SRC_URI = "git://git.openstack.org/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
DEPENDS += " \
python-pip \
python-pbr-native \
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
RDEPENDS_${PN} += " \
python-keystoneauth1 \
python-oslo.cache \
python-oslo.config \
python-oslo.context \
python-oslo.i18n \
python-oslo.log \
python-oslo.serialization \
python-oslo.utils \
python-pbr \
python-positional \
python-pycadf \
python-keystoneclient \
python-requests \
python-six \
python-webob \
"

View File

@ -1,31 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Kubernetes python client"
HOMEPAGE = "https://pypi.org/project/kubernetes/8.0.0"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=ad09685d909e7a9f763d2bb62d4bd6fb"
SRC_URI[md5sum] = "c1d6d0ac57a8a49c5fd383a39ee9ab4b"
SRC_URI[sha256sum] = "54f8e7bb1dd9a55cf416dff76a63c4ae441764280942d9913f2243676f29d02c"
inherit setuptools pypi
RDEPENDS_${PN}_append = " \
${PYTHON_PN}-adal \
${PYTHON_PN}-google-auth \
${PYTHON_PN}-requests-oauthlib \
"

View File

@ -1,46 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright (C) 2012 Wind River Systems, Inc.
#
SUMMARY = "Provides a wrapper in Python to LDAP"
DESCRIPTION = "This module provides access to the LDAP \
(Lightweight Directory Access Protocol) through Python operations \
instead of C API. The module mainly acts as a wrapper for the \
OpenLDAP 2.x libraries. Errors will appear as exceptions."
LICENSE = "PSF"
HOMEPAGE = "http://www.python-ldap.org/"
DEPENDS = "python openldap cyrus-sasl"
PYPI_PACKAGE = "python-ldap"
inherit pypi setuptools
LIC_FILES_CHKSUM = "file://LICENCE;md5=36ce9d726d0321b73c1521704d07db1b"
SRC_URI[md5sum] = "fe22522208dc9b06d16eb70f8553eaab"
SRC_URI[sha256sum] = "7d1c4b15375a533564aad3d3deade789221e450052b21ebb9720fb822eccdb8e"
do_configure_prepend() {
sed -i -e 's:^library_dirs =.*::' setup.cfg
sed -i -e 's:^include_dirs =.*:include_dirs = =/usr/include/sasl/:' setup.cfg
}
RDEPENDS_${PN} = " \
${PYTHON_PN}-pprint \
${PYTHON_PN}-threading \
${PYTHON_PN}-pyasn1 \
${PYTHON_PN}-pyasn1-modules \
"

View File

@ -1,51 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Python client for containers service"
HOMEPAGE = "https://github.com/openstack/python-magnumclient"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
SRCREV = "37e602d160632a386c2960ec8777bfc65642a9a9"
SRCNAME = "python-magnumclient"
PROTOCOL = "https"
BRANCH = "master"
S = "${WORKDIR}/git"
PV = "2.12.0+git${SRCPV}"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
DEPENDS += " \
python-pip \
python-pbr-native \
"
RDEPENDS_${PN} +=" \
python-pbr \
python-babel \
python-stevedore \
python-requests \
python-oslo.i18n \
python-oslo.serialization \
python-oslo.utils \
python-os-client-config \
python-osc-lib \
python-prettytable \
python-cryptography \
python-decorator \
"
inherit setuptools

View File

@ -1,56 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "python-muranoclient"
STABLE = "master"
PROTOCOL = "https"
BRANCH = "master"
SRCREV = "70b4392c7f8524ac25dbf3ab0feb3ac4127c1ecf"
S = "${WORKDIR}/git"
PV = "1.1.1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRC_URI = "git://github.com/openstack/python-muranoclient.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
DEPENDS += " \
python \
python-pbr-native \
"
inherit setuptools
RDEPENDS_${PN}_append = " \
bash \
python-pbr \
python-prettytable \
python-glanceclient \
python-keystoneclient \
python-iso8601 \
python-six \
python-babel \
python-pyopenssl \
python-requests \
python-pyyaml \
python-yaql \
python-osc-lib \
python-murano-pkg-check \
python-oslo.serialization \
python-oslo.utils \
python-oslo.log \
python-oslo.i18n \
"

View File

@ -1,76 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "CLI and python client library for OpenStack Neutron"
HOMEPAGE = "https://launchpad.net/neutron"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRCREV = "680b417111dbbda9e318700286c4efd9055f1af3"
SRCNAME = "python-neutronclient"
BRANCH = "stable/train"
PROTOCOL = "https"
PV = "6.12.0+git${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools monitor rmargparse
DEPENDS += " \
python-pip \
python-pbr-native\
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
RDEPENDS_${PN} += " \
python-pbr \
python-cliff \
python-debtcollector \
python-iso8601 \
python-netaddr \
python-osc-lib \
python-oslo.i18n \
python-oslo.serialization \
python-oslo.utils \
python-os-client-config \
python-keystoneauth1 \
python-keystoneclient \
python-requests \
python-simplejson \
python-six \
python-babel \
"
PACKAGECONFIG ?= "bash-completion"
PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion"
do_install_append() {
install -d ${D}/${sysconfdir}/bash_completion.d
install -m 664 ${S}/tools/neutron.bash_completion ${D}/${sysconfdir}/bash_completion.d
}
PACKAGES =+ "${BPN}-bash-completion"
FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*"
MONITOR_CHECKS_${PN} += "\
neutron-api-check.sh \
"

View File

@ -1,14 +0,0 @@
#! /bin/bash
CMD="nova list"
data=$($CMD 2>&1)
res=$?
if [ ${res} -eq 127 ]; then
exit 0
elif [ ${res} -ne 0 ]; then
echo "OpenStack \"nova api\" failed: "
echo $data
exit $res
fi
exit 0

View File

@ -1,77 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Client library for OpenStack Compute API"
HOMEPAGE = "https://github.com/openstack/python-novaclient"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7cdb54622cacc9bc9b2883091e6dd669"
SRC_URI = "git://github.com/openstack/python-novaclient.git;branch=stable/pike"
SRCREV = "62bf8809c660ed0675f301c235b1d434caeaf580"
SRCNAME = "python-novaclient"
PROTOCOL = "https"
BRANCH = "stable/train"
S = "${WORKDIR}/git"
PV = "13.0.0+git${SRCPV}"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools python-dir
DEPENDS += " \
python-pip \
python-pbr-native \
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
RDEPENDS_${PN} += " \
python-pbr \
python-keystoneauth1 \
python-iso8601 \
python-oslo.i18n \
python-oslo.serialization \
python-oslo.utils \
python-prettytable \
python-simplejson \
python-six \
python-babel \
"
PACKAGECONFIG ?= "bash-completion"
PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion"
do_install_append() {
install -d ${D}/${sysconfdir}/bash_completion.d
install -m 664 ${S}/tools/nova.bash_completion ${D}/${sysconfdir}/bash_completion.d
mv ${D}/${bindir}/nova ${D}/${bindir}/nova-${PYTHON_BASEVERSION}
ln -s ./nova-${PYTHON_BASEVERSION} ${D}/${bindir}/nova-2
ln -s ./nova-2 ${D}/${bindir}/nova
if [ -e "${D}/${PYTHON_SITEPACKAGES_DIR}/novaclient/tests/v1_1/test_servers.py" ]; then
sed -e "s:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g" \
-i ${D}/${PYTHON_SITEPACKAGES_DIR}/novaclient/tests/v1_1/test_servers.py
fi
}
PACKAGES =+ "${BPN}-bash-completion"
FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*"

View File

@ -1,45 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "OpenStackClient Library"
HOMEPAGE = "http://opensource.perlig.de/rcssmin/"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRC_URI[md5sum] = "73c8bd90b8325b2595b814f41d06fdb8"
SRC_URI[sha256sum] = "26d3e32c8c4eff47240c458cddb6b75db52034d643f01de2841ad9e84904d7aa"
inherit setuptools pypi
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
RDEPENDS_${PN} += " \
python-pbr \
python-six \
python-babel \
python-cliff \
python-keystoneauth1 \
python-os-client-config \
python-oslo.i18n \
python-oslo.utils \
python-simplejson \
python-stevedore \
"
CLEANBROKEN = "1"

View File

@ -1,50 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "oslo.config enabled dogpile cache"
HOMEPAGE = "https://github.com/openstack/oslo.cache"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRCREV = "3b8d9c3f6c87d62e5502cf4a9ae89e4067180c1f"
SRCNAME = "oslo.cache"
PROTOCOL = "https"
BRANCH = "stable/train"
S = "${WORKDIR}/git"
PV = "1.26.0+git${SRCPV}"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools rmargparse
DEPENDS += " \
python-pbr \
python-pip \
"
DEPENDS += " \
python-pbr-native \
"
# RDEPENDS_default:
RDEPENDS_${PN} += " \
python-dogpile.cache \
python-six \
python-oslo.config \
python-oslo.i18n \
python-oslo.log \
python-oslo.utils \
"

View File

@ -1,51 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "oslo.concurrency library"
HOMEPAGE = "https://github.com/openstack/oslo.concurrency"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658"
SRCREV = "5b42d276350666410a7d010a5152467ad509d3f9"
SRCNAME = "oslo.concurrency"
PROTOCOL = "https"
BRANCH = "stable/train"
S = "${WORKDIR}/git"
PV = "3.26.0+git${SRCPV}"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools rmargparse
DEPENDS += " \
python-pbr \
python-pip \
"
DEPENDS += " \
python-pbr-native \
"
# RDEPENDS_default:
RDEPENDS_${PN} += " \
python-pbr \
python-fasteners \
python-oslo.config \
python-oslo.i18n \
python-oslo.utils \
python-six \
python-enum34 \
"

View File

@ -1,54 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "API supporting parsing command line arguments and .ini style configuration files."
HOMEPAGE = "https://pypi.python.org/pypi/oslo.config/5.2.0"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c46f31914956e4579f9b488e71415ac8"
SRCREV = "31c11ab4289efa1a91835f3daa928fe927ac4276"
SRCNAME = "oslo.config"
PROTOCOL = "https"
BRANCH = "stable/queens"
S = "${WORKDIR}/git"
PV = "5.2.0+git${SRCPV}"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools rmargparse
DEPENDS += " \
python-pbr \
python-pip \
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
RDEPENDS_${PN} += " \
python-pbr \
python-netaddr \
python-six \
python-stevedore \
python-debtcollector \
python-oslo.i18n \
python-rfc3986 \
python-pyyaml \
python-importlib-metadata \
"

View File

@ -1,49 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Oslo Context Library"
HOMEPAGE = "https://launchpad.net/oslo"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRCREV = "76a07f9022f0fa967707c9f6cb5a4a24aac6b3ef"
SRCNAME = "oslo.context"
PROTOCOL = "https"
BRANCH = "stable/stein"
S = "${WORKDIR}/git"
PV = "2.22.1+git${SRCPV}"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
DEPENDS += " \
python-pip \
python-pbr-native \
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
# RDEPENDS_default:
RDEPENDS_${PN} += " \
bash \
python-pbr \
python-debtcollector \
python-positional \
"

View File

@ -1,50 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Oslo db library"
HOMEPAGE = "http://launchpad.net/oslo"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658"
SRCREV = "4de33ebd504a2c3dbddc2492bdb96ae7bca77d66"
SRCNAME = "oslo.db"
PROTOCOL = "https"
BRANCH = "stable/stein"
S = "${WORKDIR}/git"
PV = "4.27.0+git${SRCPV}"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
DEPENDS += " \
python-pip \
python-pbr-native \
"
RDEPENDS_${PN} += " \
python-oslo.config \
python-oslo.i18n \
python-oslo.serialization \
python-oslo.utils \
python-six \
python-alembic \
python-sqlalchemy \
python-sqlalchemy-migrate \
python-stevedore \
python-pbr \
python-debtcollector \
"

View File

@ -1,58 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Oslo Log Library"
HOMEPAGE = "https://launchpad.net/oslo"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658"
SRCREV = "110191aa505cfefafee1c8579213b2f9c3397b6c"
SRCNAME = "oslo.log"
PROTOCOL = "https"
BRANCH = "stable/train"
S = "${WORKDIR}/git"
PV = "3.38.0+git${SRCPV}"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
DEPENDS += " \
python-pip \
python-babel \
python-pbr-native \
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
# RDEPENDS_default:
RDEPENDS_${PN} += " \
bash \
python-pbr \
python-six \
python-oslo.config \
python-oslo.context \
python-oslo.i18n \
python-oslo.utils \
python-oslo.serialization \
python-pyinotify \
python-debtcollector \
python-dateutil \
python-monotonic \
"

View File

@ -1,56 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Oslo Middleware Library"
HOMEPAGE = "https://launchpad.net/oslo"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658"
SRCREV = "8812bc3fc490f0db4977418eaedf58190a0df394"
SRCNAME = "oslo.middleware"
PROTOCOL = "https"
BRANCH = "stable/train"
S = "${WORKDIR}/git"
PV = "3.31.0+git${SRCPV}"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
DEPENDS += " \
python-pip \
python-pbr-native \
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
# RDEPENDS_default:
RDEPENDS_${PN} += " \
python-pbr \
python-jinja2 \
python-oslo.config \
python-oslo.context \
python-oslo.i18n \
python-oslo.utils \
python-six \
python-stevedore \
python-webob \
python-debtcollector \
python-statsd \
"

View File

@ -1,46 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Oslo policy library"
HOMEPAGE = "https://github.com/openstack/oslo.policy"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRCREV = "b9fd10e2612f26c93d49c168a0408aba6d20e5bf"
SRCNAME = "oslo.policy"
PROTOCOL = "https"
BRANCH = "stable/train"
S = "${WORKDIR}/git"
PV = "1.43.1+git${SRCPV}"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
DEPENDS += " \
python-pip \
python-pbr-native \
"
RDEPENDS_${PN} += " \
python-oslo.config \
python-oslo.i18n \
python-oslo.serialization \
python-oslo.utils \
python-six \
python-pyyaml \
python-requests \
"

View File

@ -1,53 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Oslo Serialization API"
HOMEPAGE = "https://launchpad.net/oslo"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658"
SRCREV = "576b13ec26baa671da05df56a8d14aba6fa3e826"
SRCNAME = "oslo.serialization"
PROTOCOL = "https"
BRANCH = "stable/train"
S = "${WORKDIR}/git"
PV = "2.23.0+git${SRCPV}"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
# DEPENDS_default: python-pip
DEPENDS += " \
python-pip \
python-pbr-native\
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
# RDEPENDS_default:
RDEPENDS_${PN} += " \
python-pbr \
python-six \
python-oslo.utils \
python-pytz \
python-msgpack \
"

View File

@ -1,51 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Oslo versionedobjects library"
HOMEPAGE = "https://wiki.openstack.org/wiki/Oslo"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRCREV = "c95f0c876840e36f37acb14d5eec5238d85e7dce"
SRCNAME = "oslo.versionedobjects"
PROTOCOL = "https"
BRANCH = "stable/queens"
S = "${WORKDIR}/git"
PV = "1.31.2+git${SRCPV}"
SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
DEPENDS += " \
python-pip \
python-pbr-native \
"
RDEPENDS_${PN} += " \
python-six \
python-oslo.concurrency \
python-oslo.config \
python-oslo.context \
python-oslo.messaging \
python-oslo.serialization \
python-oslo.utils \
python-oslo.log \
python-oslo.i18n \
python-webob \
python-iso8601 \
python-netaddr \
"

View File

@ -1,45 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Library for cross-project profiling library"
HOMEPAGE = "https://docs.openstack.org/osprofiler/latest/"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=19cbd64715b51267a47bf3750cc6a8a5"
SRCREV = "6d68170f72ef303e6564e164aafb1ec53a8b8314"
SRCNAME = "osprofiler"
BRANCH = "master"
PROTOCOL = "https"
PV = "2.3.0+git${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI = "git://opendev.org/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
DEPENDS += " python-pbr-native"
RDEPENDS_${PN}_append = " \
python-pbr \
python-six \
python-oslo.messaging \
python-oslo.log \
python-oslo.utils \
python-webob \
python-requests \
python-netaddr \
python-oslo.concurrency \
"

View File

@ -1,29 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = " \
Core utilities for Python packages. \
The packaging project includes the following: version handling, specifiers, markers, requirements, tags, utilities. \
"
HOMEPAGE = "https://github.com/pypa/packaging"
SECTION = "devel/python"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=faadaedca9251a90b205c9167578ce91"
SRC_URI[md5sum] = "a02ce566f10c701b4c42e39a4ce59c93"
SRC_URI[sha256sum] = "e665345f9eef0c621aa0bf2f8d78cf6d21904eef16a93f020240b704a57f1334"
PYPI_PACKAGE = "packaging"
inherit setuptools pypi

View File

@ -1,35 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "python-pankoclient"
STABLE = "master"
PROTOCOL = "https"
BRANCH = "master"
SRCREV = "572aee9cf6ac618eb5d1ea325f9e59414d387dbf"
S = "${WORKDIR}/git"
PV = "0.5.0"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRC_URI = "git://github.com/openstack/python-pankoclient.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
DEPENDS += " \
python \
python-pbr-native \
"
inherit setuptools

View File

@ -1,34 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "HPE 3PAR HTTP REST Client"
HOMEPAGE = "https://pythonhosted.org/python-3parclient/"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=d3dfac7b0d23cb44b097e35518879438"
SRC_URI[md5sum] = "b49dd03782fd5eda09cd9210ae979f6a"
SRC_URI[sha256sum] = "4c2b0be4e3b8a517c1718e39e1eeb3e62f73810bb9910278000716f6074e5a69"
PYPI_PACKAGE = "pyghmi"
inherit setuptools pypi
DEPENDS += " \
python-pbr-native \
"
RDEPENDS_${PN}_append = " \
python-dateutil \
"

View File

@ -1,41 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Python implementation of SAML Version 2 to be used in a WSGI environment"
HOMEPAGE = "https://github.com/rohe/pysaml2"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=861cc9087857b5bea2e11356c3de95d9"
SRCREV = "c740a3a270037d6fcb42a12112db594705d3878f"
SRCNAME = "pysaml2"
PROTOCOL = "git"
BRANCH = "v4.9.0"
S = "${WORKDIR}/git"
PV = "4.5.0+git${SRCPV}"
SRC_URI = "git://github.com/rohe/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools
DEPENDS += " \
python-pip \
"
RDEPENDS_${PN} += " \
python-zopeinterface \
python-repoze.who \
python-defusedxml \
"

View File

@ -1,46 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Client side API implementation of the Redfish RESTful API for Data Center Hardware Management."
HOMEPAGE = "https://github.com/DMTF/Redfishtool"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=cee7a7694b5bf14bc9d3e0fbe78a64af"
SRCREV = "2bdcd905e1ad227f40809ec298804d5401047612"
SRCNAME = "Redfishtool"
BRANCH = "master"
PROTOCOL = "https"
PV = "1.1.0+git${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI = " \
git://github.com/DMTF/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH} \
file://${PN}/0001-Adapt-redfishtool-to-python2.patch \
"
inherit setuptools
RDEPENDS_${PN} += " \
python-requests \
"
do_install_append() {
:
}
FILES_${PN} += " \
"

View File

@ -1,38 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "requests-toolbelt"
STABLE = "master"
PROTOCOL = "https"
BRANCH = "master"
SRCREV = "1e384626476f7afbff0f649fe41886d0f27473d6"
S = "${WORKDIR}/git"
PV = "0.9.1+${SRCPV}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=71760e0f1dda8cff91b0bc9246caf571"
SRC_URI = "git://github.com/requests/toolbelt.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
DEPENDS = " \
python \
python-pbr-native \
"
inherit setuptools
RDEPENDS_${PN} += " bash"

View File

@ -1,25 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "The ordereddict module in short"
HOMEPAGE = "https://pypi.org/project/ruamel.ordereddict/"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=0caf06c5d151e57e100341eb28dcb6f5"
SRC_URI[md5sum] = "d160714193a0ec470cc26f614b1aa0e7"
SRC_URI[sha256sum] = "7058c470f131487a3039fb9536dda9dd17004a7581bdeeafa836269a36a2b3f6"
inherit setuptools pypi

View File

@ -1,38 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "YAML 1.2 loader/dumper package for Python"
HOMEPAGE = "https://pypi.org/project/ruamel.yaml/"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=84e9d7d823d2abac052e70de2051ca1c"
SRC_URI[md5sum] = "d53315f8ccb93748d00ccca39486ac78"
SRC_URI[sha256sum] = "350496f6fdd8c2bb17a0fa3fd2ec98431280cf12d72dae498b19ac0119c2bbad"
inherit setuptools pypi python-dir
DEPENDS += " \
${PYTHON_PN}-native \
${PYTHON_PN}-cryptography-native \
"
RDEPENDS_${PN}_append = " \
${PYTHON_PN}-ruamel.ordereddict \
"
do_install_prepend() {
export RUAMEL_NO_PIP_INSTALL_CHECK=1
}

View File

@ -1,54 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Ryu is a component-based software defined networking framework."
HOMEPAGE = "https://github.com/osrg/ryu"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = " \
file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57\
"
SRCREV = "1c008060fa3dab51c3a59c1485a7529b13cf0dd1"
SRCNAME = "ryu"
BRANCH = "master"
PROTOCOL = "https"
PV = "4.24+git${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/osrg/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools python-dir
DEPENDS += " \
python-pip \
python-pbr-native \
"
RDEPENDS_${PN}_append = " \
${PYTHON_PN}-eventlet \
${PYTHON_PN}-msgpack \
${PYTHON_PN}-netaddr \
${PYTHON_PN}-oslo.config \
${PYTHON_PN}-ovs \
${PYTHON_PN}-routes \
${PYTHON_PN}-six \
${PYTHON_PN}-tinyrpc \
${PYTHON_PN}-webob \
"
FILES_${PN}_append = " \
${datadir}/etc/${SRCNAME} \
"

View File

@ -1,45 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "CLI and python client library for OpenStack Sahara"
HOMEPAGE = "https://launchpad.net/sahara"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
DEPENDS += " \
python-pip \
python-pbr \
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
python-pbr-native \
"
RDEPENDS_${PN} += " \
python-pbr \
"
SRCNAME = "saharaclient"
SRC_URI = "git://github.com/openstack/python-saharaclient.git;branch=master"
PV = "2.3.0+git${SRCPV}"
SRCREV = "3107b452467537f4eef3d9ecfb5e35d110d19662"
S = "${WORKDIR}/git"
inherit setuptools

View File

@ -1,30 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = " \
Snowball is a small string processing language designed for creating stemming algorithms \
for use in Information Retrieval. This site describes Snowball, and presents several useful \
stemmers which have been implemented using it. \
"
HOMEPAGE = "https://github.com/snowballstem/snowball"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=2750797da77c1d784e7626b3f7d7ff3e"
SRC_URI[md5sum] = "c05ec4a897be3c953c8b8b844c4241d4"
SRC_URI[sha256sum] = "df3bac3df4c2c01363f3dd2cfa78cce2840a79b9f1c2d2de9ce8d31683992f52"
PYPI_PACKAGE = "snowballstemmer"
inherit setuptools pypi

View File

@ -1,29 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = " \
sphinxcontrib-websupport provides a Python API to easily integrate Sphinx\
documentation into your Web application. \
"
HOMEPAGE = "https://www.sphinx-doc.org/en/master/"
SECTION = "devel/python"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=819a10ab58e77e03e61a584de6339f7c"
SRC_URI[md5sum] = "ca6435e7b4eb9408df4f54972361e9d3"
SRC_URI[sha256sum] = "9de47f375baf1ea07cdb3436ff39d7a9c76042c10a769c52353ec46e4e8fc3b9"
PYPI_PACKAGE = "sphinxcontrib-websupport"
inherit setuptools pypi

View File

@ -1,29 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Backport of pathlib-compatible object wrapper for zip files"
HOMEPAGE = "https://github.com/jaraco/zipp"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a33f38bbf47d48c70fe0d40e5f77498e"
SRC_URI[md5sum] = "d4451a749d8a7c3c392a9edd1864a937"
SRC_URI[sha256sum] = "3718b1cbcd963c7d4c5511a8240812904164b7f381b647143a89d3b98f9bcd8e"
DEPENDS += "${PYTHON_PN}-setuptools-scm-native"
RDEPENDS_${PN} += "${PYTHON_PN}-more-itertools"
inherit pypi setuptools
BBCLASSEXTEND = "native nativesdk"

View File

@ -1,43 +0,0 @@
#
## Copyright (C) 2019 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESCRIPTION = "Client side API implementation of the Redfish RESTful API for Data Center Hardware Management."
HOMEPAGE = "https://github.com/DMTF/Redfishtool"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=cee7a7694b5bf14bc9d3e0fbe78a64af"
SRCREV = "2bdcd905e1ad227f40809ec298804d5401047612"
SRCNAME = "Redfishtool"
BRANCH = "master"
PROTOCOL = "https"
PV = "1.1.0+git${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/DMTF/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
inherit setuptools3
RDEPENDS_${PN} += " \
python3-requests \
"
do_install_append() {
:
}
FILES_${PN} += " \
"

View File

@ -1,40 +0,0 @@
From e3eff024826550aec4a6a5baef7210a29faf299d Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 9 Mar 2017 18:54:02 +0200
Subject: [PATCH] Add a color setting for mips64_n32 binaries
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
build/rpmfc.c | 1 +
rpmrc.in | 2 ++
2 files changed, 3 insertions(+)
diff --git a/build/rpmfc.c b/build/rpmfc.c
index d38a10916..c8e2f876a 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -622,6 +622,7 @@ exit:
static const struct rpmfcTokens_s rpmfcTokens[] = {
{ "directory", RPMFC_INCLUDE },
+ { "N32 MIPS64", RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
{ "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE },
{ "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE },
diff --git a/rpmrc.in b/rpmrc.in
index abc08fc31..f5bc820d8 100644
--- a/rpmrc.in
+++ b/rpmrc.in
@@ -133,6 +133,8 @@ archcolor: mipsr6el 1
archcolor: mips64r6 2
archcolor: mips64r6el 2
+archcolor: mips64_n32 4
+
archcolor: m68k 1
archcolor: m68kmint 1
--
2.11.0

View File

@ -1,33 +0,0 @@
From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 9 Jan 2017 18:52:11 +0200
Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in
a short-circuited way.
Upstream permits short-circuiting only for local testing; Yocto on the other
hand produces rpms that way by design.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
build/pack.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/build/pack.c b/build/pack.c
index 1261cdbba..bb2d6f4f6 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -595,10 +595,6 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
}
- if (cheating) {
- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
- }
-
{ char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
char *binRpm, *binDir;
binRpm = headerFormat(pkg->header, binFormat, &errorString);
--
2.11.0

View File

@ -1,58 +0,0 @@
From bd08eb0ae1312f347f49949481daa7c923752df2 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 27 Feb 2017 09:43:30 +0200
Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
default configuration and macros.
Upstream-Status: Denied [https://github.com/rpm-software-management/rpm/pull/263]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
configure.ac | 2 +-
macros.in | 2 +-
rpm.am | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 09af7c4..9bd6903 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1055,7 +1055,7 @@ else
usrprefix=$prefix
fi
-RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
+RPMCONFIGDIR="`echo ${libdir}/rpm`"
AC_SUBST(RPMCONFIGDIR)
AC_SUBST(OBJDUMP)
diff --git a/macros.in b/macros.in
index a3aa7a9..62cee5c 100644
--- a/macros.in
+++ b/macros.in
@@ -970,7 +970,7 @@ package or when debugging this package.\
%_sharedstatedir %{_prefix}/com
%_localstatedir %{_prefix}/var
%_lib lib
-%_libdir %{_exec_prefix}/%{_lib}
+%_libdir @libdir@
%_includedir %{_prefix}/include
%_infodir %{_datadir}/info
%_mandir %{_datadir}/man
diff --git a/rpm.am b/rpm.am
index 82c2d7c..6341b51 100644
--- a/rpm.am
+++ b/rpm.am
@@ -1,10 +1,10 @@
# Internal binaries
## HACK: It probably should be $(libexecdir)/rpm or $(libdir)/rpm
-rpmlibexecdir = $(prefix)/lib/rpm
+rpmlibexecdir = $(libdir)/rpm
# Host independent config files
## HACK: it probably should be $(datadir)/rpm
-rpmconfigdir = $(prefix)/lib/rpm
+rpmconfigdir = $(libdir)/rpm
# Libtool version (current-revision-age) for all our libraries
rpm_version_info = 9:0:1

View File

@ -1,38 +0,0 @@
From 35381b6cd6c1b571bf7e6b0640de0f54dbf94386 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 10 Jan 2017 14:11:30 +0200
Subject: [PATCH] Do not read config files from $HOME
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
lib/rpmrc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index 4ed991321..19fe80f98 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -458,8 +458,7 @@ static void setDefaults(void)
if (!defrcfiles) {
defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":",
confdir, "/" RPMCANONVENDOR "/rpmrc", ":",
- SYSCONFDIR "/rpmrc", ":",
- "~/.rpmrc", NULL);
+ SYSCONFDIR "/rpmrc", ":");
}
#ifndef MACROFILES
@@ -471,8 +470,7 @@ static void setDefaults(void)
confdir, "/" RPMCANONVENDOR "/macros", ":",
SYSCONFDIR "/rpm/macros.*", ":",
SYSCONFDIR "/rpm/macros", ":",
- SYSCONFDIR "/rpm/%{_target}/macros", ":",
- "~/.rpmmacros", NULL);
+ SYSCONFDIR "/rpm/%{_target}/macros", ":");
}
#else
macrofiles = MACROFILES;
--
2.11.0

View File

@ -1,28 +0,0 @@
From a674b9cc7af448d7c6748bc163bf37dc14a57f09 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 20 Jan 2017 13:32:06 +0200
Subject: [PATCH] Do not reset the PATH environment variable before running
scriptlets.
We add lots of native stuff into it and scriptlets rely on that.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
lib/rpmscript.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rpmscript.c b/lib/rpmscript.c
index 6a31e0d..2b0e438 100644
--- a/lib/rpmscript.c
+++ b/lib/rpmscript.c
@@ -184,7 +184,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes,
if (ipath && ipath[5] != '%')
path = ipath;
- xx = setenv("PATH", path, 1);
+ //xx = setenv("PATH", path, 1);
free(ipath);
}

View File

@ -1,48 +0,0 @@
From d076de030deb9cafd9b2e82be5d506cebdefad0b Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 27 Feb 2017 14:43:21 +0200
Subject: [PATCH 1/9] Fix build with musl C library.
Upstream-Status: Pending
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
configure.ac | 3 ++-
rpmio/digest_nss.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index c04a2e8d1..c9d9ac16d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -255,6 +255,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
# Check for libelf library. Prefer external, otherwise none.
WITH_LIBELF_LIB=
AC_CHECK_HEADER([libelf.h])
+AC_CHECK_HEADERS([error.h], [WITH_ERROR_H=yes])
AC_CHECK_HEADERS([gelf.h], [
AC_CHECK_LIB(elf, gelf_getvernaux, [
AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).])
@@ -263,7 +264,7 @@ AC_CHECK_HEADERS([gelf.h], [
])
])
AC_SUBST(WITH_LIBELF_LIB)
-AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes])
+AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes && test "$WITH_ERROR_H" = yes])
AC_CHECK_HEADERS([dwarf.h], [
WITH_LIBDWARF=yes
diff --git a/rpmio/digest_nss.c b/rpmio/digest_nss.c
index 992d9acf6..e11920e3e 100644
--- a/rpmio/digest_nss.c
+++ b/rpmio/digest_nss.c
@@ -1,5 +1,6 @@
#include "system.h"
+#include <signal.h>
#include <pthread.h>
#include <nss.h>
#include <sechash.h>
--
2.14.2

View File

@ -1,84 +0,0 @@
From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 25 May 2017 18:15:27 +0300
Subject: [PATCH 1/4] Split binary package building into a separate function
So that it can be run as a thread pool task.
Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
build/pack.c | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/build/pack.c b/build/pack.c
index 518f4e92a..ccfd614cc 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -546,18 +546,13 @@ static rpmRC checkPackages(char *pkgcheck)
return RPMRC_OK;
}
-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
{
- rpmRC rc;
- const char *errorString;
- Package pkg;
- char *pkglist = NULL;
-
- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
- char *fn;
+ const char *errorString;
+ rpmRC rc = RPMRC_OK;
if (pkg->fileList == NULL)
- continue;
+ return rc;
if ((rc = processScriptFiles(spec, pkg)))
return rc;
@@ -587,7 +582,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
headerGetString(pkg->header, RPMTAG_NAME), errorString);
return RPMRC_FAIL;
}
- fn = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
+ *filename = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
if ((binDir = strchr(binRpm, '/')) != NULL) {
struct stat st;
char *dn;
@@ -609,14 +604,28 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
free(binRpm);
}
- rc = writeRPM(pkg, NULL, fn, NULL);
+ rc = writeRPM(pkg, NULL, *filename, NULL);
if (rc == RPMRC_OK) {
/* Do check each written package if enabled */
- char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", fn, NULL);
+ char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
if (pkgcheck[0] != ' ') {
rc = checkPackages(pkgcheck);
}
free(pkgcheck);
+ }
+ return rc;
+}
+
+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+{
+ rpmRC rc;
+ Package pkg;
+ char *pkglist = NULL;
+
+ for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
+ char *fn = NULL;
+ rc = packageBinary(spec, pkg, cookie, cheating, &fn);
+ if (rc == RPMRC_OK) {
rstrcat(&pkglist, fn);
rstrcat(&pkglist, " ");
}
--
2.11.0

View File

@ -1,62 +0,0 @@
From a89daa75ac970d8e247edc762d1181e9a5b0c5d0 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 17 Jan 2017 14:07:17 +0200
Subject: [PATCH] When cross-installing, execute package scriptlets without
chrooting into destination rootfs
This is triggered only when RPM_NO_CHROOT_FOR_SCRIPTS environment variable is defined.
Otherwise they will trigger an explosion of failures, obviously.
Amended 2018-07-03 by Olof Johansson <olofjn@axis.com>:
Remove leaking temporary scriptlet files
Since we tell dnf to run rpm with debug output, this will result in rpm not
cleaning up written temporary scriptlet files (same flag controls both
behaviors). This wouldn't have been a problem since we normally would use the
target sysroot also for temporary files, but we need to chroot out to be able
to actually run the rpm scriptlets (purpose of this patch), so the temporary
files are written to the host's /var/tmp/ directory, causing a gradual
resource leakage on the host system for every RPM based do_rootfs task
executed.
Signed-off-by: Olof Johansson <olofjn@axis.com>
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
lib/rpmscript.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/rpmscript.c b/lib/rpmscript.c
index cc98c4885..f8bd3df04 100644
--- a/lib/rpmscript.c
+++ b/lib/rpmscript.c
@@ -394,8 +394,7 @@ exit:
Fclose(out); /* XXX dup'd STDOUT_FILENO */
if (fn) {
- if (!rpmIsDebug())
- unlink(fn);
+ unlink(fn);
free(fn);
}
free(mline);
@@ -428,7 +427,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd,
if (rc != RPMRC_FAIL) {
if (script_type & RPMSCRIPTLET_EXEC) {
- rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc);
+ if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) {
+ rpmChrootOut();
+ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc);
+ rpmChrootIn();
+ } else {
+ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc);
+ }
} else {
rc = runLuaScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc);
}
--
2.11.0

View File

@ -1,32 +0,0 @@
perl: disable auto requires
When generating automatic requirements, it's possible for perl scripts to
declare 'optional' dependencies. These seem to often be incorrect and will
cause installation failures in OE. Instead of fixing the perl scripts, it
was decided it is better to simply disable the automatic dependency
generation. This matches the behavior from the previous RPM5 implementation.
Upstream-Status: Inappropriate [OE specific configuration]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Index: git/fileattrs/perl.attr
===================================================================
--- git.orig/fileattrs/perl.attr
+++ git/fileattrs/perl.attr
@@ -1,3 +1,3 @@
-%__perl_requires %{_rpmconfigdir}/perl.req
+#__perl_requires %{_rpmconfigdir}/perl.req
%__perl_magic ^.*[Pp]erl .*$
%__perl_flags exeonly
Index: git/fileattrs/perllib.attr
===================================================================
--- git.orig/fileattrs/perllib.attr
+++ git/fileattrs/perllib.attr
@@ -1,5 +1,5 @@
%__perllib_provides %{_rpmconfigdir}/perl.prov
-%__perllib_requires %{_rpmconfigdir}/perl.req
+#__perllib_requires %{_rpmconfigdir}/perl.req
%__perllib_magic ^Perl[[:digit:]] module source.*
%__perllib_path \\.pm$
%__perllib_flags magic_and_path

View File

@ -1,65 +0,0 @@
From 0066b862bb3a09f39295abd5d972a53ac8dc1555 Mon Sep 17 00:00:00 2001
From: Peter Bergin <peter@berginkonsult.se>
Date: Wed, 19 Sep 2018 15:12:31 +0200
Subject: [PATCH] rpm/rpmio.c: restrict virtual memory usage if limit set
A solution to avoid OOM situation when the virtual memory is restricted
for a user (ulimit -v). As the lzopen_internal function is run in parallel
one instance per CPU thread the available virtual memory is limited per
CPU thread.
Upstream-Status: Pending [merge of multithreading patches to upstream]
Signed-off-by: Peter Bergin <peter@berginkonsult.se>
---
rpmio/rpmio.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
index e051c98..b3c56b6 100644
--- a/rpmio/rpmio.c
+++ b/rpmio/rpmio.c
@@ -845,6 +845,40 @@ static LZFILE *lzopen_internal(const char *mode, int fd, int xz)
}
#endif
+ struct rlimit virtual_memory;
+ getrlimit(RLIMIT_AS, &virtual_memory);
+ if (virtual_memory.rlim_cur != RLIM_INFINITY) {
+ const uint64_t virtual_memlimit = virtual_memory.rlim_cur;
+ const uint64_t virtual_memlimit_per_cpu_thread =
+ virtual_memlimit / lzma_cputhreads();
+ uint64_t memory_usage_virt;
+ rpmlog(RPMLOG_NOTICE, "XZ: virtual memory restricted to %lu and "
+ "per CPU thread %lu\n", virtual_memlimit, virtual_memlimit_per_cpu_thread);
+ /* keep reducing the number of compression threads until memory
+ usage falls below the limit per CPU thread*/
+ while ((memory_usage_virt = lzma_stream_encoder_mt_memusage(&mt_options)) >
+ virtual_memlimit_per_cpu_thread) {
+ /* If number of threads goes down to zero lzma_stream_encoder will
+ * will return UINT64_MAX. We must check here to avoid an infinite loop.
+ * If we get into situation that one thread requires more virtual memory
+ * than available we set one thread, print error message and try anyway. */
+ if (--mt_options.threads == 0) {
+ mt_options.threads = 1;
+ rpmlog(RPMLOG_WARNING,
+ "XZ: Could not adjust number of threads to get below "
+ "virtual memory limit %lu. usage %lu\n",
+ virtual_memlimit_per_cpu_thread, memory_usage_virt);
+ break;
+ }
+ }
+ if (threads != (int)mt_options.threads)
+ rpmlog(RPMLOG_NOTICE,
+ "XZ: Adjusted the number of threads from %d to %d to not "
+ "exceed the memory usage limit of %lu bytes\n",
+ threads, mt_options.threads, virtual_memlimit);
+
+ }
+
ret = lzma_stream_encoder_mt(&lzfile->strm, &mt_options);
}
#endif
--
2.7.4

View File

@ -1,72 +0,0 @@
From 383c0b097b7eba16801a9e3c4b8e36a4b6de74ab Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 20 Jan 2017 13:33:05 +0200
Subject: [PATCH 2/2] Add support for prefixing /etc from RPM_ETCCONFIGDIR
environment variable
This is needed so that rpm can pick up target-specific configuration
from target rootfs instead of its own native sysroot.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
lib/rpmrc.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index 19fe80f98..6b27b3941 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -455,10 +455,14 @@ const char * lookupInDefaultTable(const char * name,
static void setDefaults(void)
{
const char *confdir = rpmConfigDir();
+ const char *etcconfdir = getenv("RPM_ETCCONFIGDIR");
+ if (etcconfdir == NULL)
+ etcconfdir = "";
+
if (!defrcfiles) {
defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":",
confdir, "/" RPMCANONVENDOR "/rpmrc", ":",
- SYSCONFDIR "/rpmrc", ":");
+ etcconfdir, SYSCONFDIR "/rpmrc", ":", NULL);
}
#ifndef MACROFILES
@@ -468,9 +472,9 @@ static void setDefaults(void)
confdir, "/platform/%{_target}/macros", ":",
confdir, "/fileattrs/*.attr", ":",
confdir, "/" RPMCANONVENDOR "/macros", ":",
- SYSCONFDIR "/rpm/macros.*", ":",
- SYSCONFDIR "/rpm/macros", ":",
- SYSCONFDIR "/rpm/%{_target}/macros", ":");
+ etcconfdir, SYSCONFDIR "/rpm/macros.*", ":",
+ etcconfdir, SYSCONFDIR "/rpm/macros", ":",
+ etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", ":", NULL);
}
#else
macrofiles = MACROFILES;
@@ -989,7 +993,11 @@ static void read_auxv(void)
*/
static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
{
- const char * const platform_path = SYSCONFDIR "/rpm/platform";
+ const char *etcconfdir = getenv("RPM_ETCCONFIGDIR");
+ if (etcconfdir == NULL)
+ etcconfdir = "";
+
+ const char * const platform_path = rstrscat(NULL, etcconfdir, SYSCONFDIR "/rpm/platform", NULL);
static struct utsname un;
char * chptr;
canonEntry canon;
@@ -1286,6 +1294,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
if (arch) *arch = un.machine;
if (os) *os = un.sysname;
+ free(platform_path);
}
static
--
2.11.0

View File

@ -1,127 +0,0 @@
From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 25 May 2017 19:30:20 +0300
Subject: [PATCH 1/3] Run binary package creation via thread pools.
Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
build/pack.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
configure.ac | 3 +++
2 files changed, 70 insertions(+), 14 deletions(-)
diff --git a/build/pack.c b/build/pack.c
index ccfd614cc..ed5b9ab4e 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -616,25 +616,78 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
return rc;
}
-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+struct binaryPackageTaskData
{
- rpmRC rc;
Package pkg;
+ char *filename;
+ rpmRC result;
+ struct binaryPackageTaskData *next;
+};
+
+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
+{
+ struct binaryPackageTaskData *tasks = NULL;
+ struct binaryPackageTaskData *task = NULL;
+ struct binaryPackageTaskData *prev = NULL;
+
+ for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
+ task = rcalloc(1, sizeof(*task));
+ task->pkg = pkg;
+ if (pkg == spec->packages) {
+ // the first package needs to be processed ahead of others, as they copy
+ // changelog data from it, and so otherwise data races would happen
+ task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
+ rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
+ tasks = task;
+ }
+ if (prev != NULL) {
+ prev->next = task;
+ }
+ prev = task;
+ }
+
+ #pragma omp parallel
+ #pragma omp single
+ // re-declaring task variable is necessary, or older gcc versions will produce code that segfaults
+ for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
+ if (task != tasks)
+ #pragma omp task
+ {
+ task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
+ rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
+ }
+ }
+
+ return tasks;
+}
+
+static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
+{
+ while (tasks != NULL) {
+ struct binaryPackageTaskData* next = tasks->next;
+ rfree(tasks->filename);
+ rfree(tasks);
+ tasks = next;
+ }
+}
+
+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+{
char *pkglist = NULL;
- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
- char *fn = NULL;
- rc = packageBinary(spec, pkg, cookie, cheating, &fn);
- if (rc == RPMRC_OK) {
- rstrcat(&pkglist, fn);
- rstrcat(&pkglist, " ");
- }
- free(fn);
- if (rc != RPMRC_OK) {
- pkglist = _free(pkglist);
- return rc;
- }
+ struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
+
+ for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
+ if (task->result == RPMRC_OK) {
+ rstrcat(&pkglist, task->filename);
+ rstrcat(&pkglist, " ");
+ } else {
+ _free(pkglist);
+ freeBinaryPackageTasks(tasks);
+ return RPMRC_FAIL;
+ }
}
+ freeBinaryPackageTasks(tasks);
/* Now check the package set if enabled */
if (pkglist != NULL) {
diff --git a/configure.ac b/configure.ac
index a506ec819..59fa0acaf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,6 +17,9 @@ AC_DISABLE_STATIC
PKG_PROG_PKG_CONFIG
+AC_OPENMP
+RPMCFLAGS="$OPENMP_CFLAGS $RPMCFLAGS"
+
dnl Checks for programs.
AC_PROG_CXX
AC_PROG_AWK
--
2.11.0

View File

@ -1,207 +0,0 @@
From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 30 May 2017 13:58:30 +0300
Subject: [PATCH 3/4] rpmstrpool.c: make operations over string pools
thread-safe
Otherwise multithreaded rpm building explodes in various ways due
to data races.
Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
rpmio/rpmstrpool.c | 56 +++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 47 insertions(+), 9 deletions(-)
diff --git a/rpmio/rpmstrpool.c b/rpmio/rpmstrpool.c
index 30a57eb10..58ba95a02 100644
--- a/rpmio/rpmstrpool.c
+++ b/rpmio/rpmstrpool.c
@@ -113,6 +113,8 @@ static poolHash poolHashCreate(int numBuckets)
return ht;
}
+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid);
+
static void poolHashResize(rpmstrPool pool, int numBuckets)
{
poolHash ht = pool->hash;
@@ -120,7 +122,7 @@ static void poolHashResize(rpmstrPool pool, int numBuckets)
for (int i=0; i<ht->numBuckets; i++) {
if (!ht->buckets[i].keyid) continue;
- unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
+ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
for (unsigned int j=0;;j++) {
unsigned int hash = hashbucket(keyHash, j) % numBuckets;
if (!buckets[hash].keyid) {
@@ -149,7 +151,7 @@ static void poolHashAddHEntry(rpmstrPool pool, const char * key, unsigned int ke
ht->buckets[hash].keyid = keyid;
ht->keyCount++;
break;
- } else if (!strcmp(rpmstrPoolStr(pool, ht->buckets[hash].keyid), key)) {
+ } else if (!strcmp(rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid), key)) {
return;
}
}
@@ -191,7 +193,7 @@ static void poolHashPrintStats(rpmstrPool pool)
int maxcollisions = 0;
for (i=0; i<ht->numBuckets; i++) {
- unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
+ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
for (unsigned int j=0;;j++) {
unsigned int hash = hashbucket(keyHash, i) % ht->numBuckets;
if (hash==i) {
@@ -221,7 +223,7 @@ static void rpmstrPoolRehash(rpmstrPool pool)
pool->hash = poolHashCreate(sizehint);
for (int i = 1; i <= pool->offs_size; i++)
- poolHashAddEntry(pool, rpmstrPoolStr(pool, i), i);
+ poolHashAddEntry(pool, rpmstrPoolStrNoLock(pool, i), i);
}
rpmstrPool rpmstrPoolCreate(void)
@@ -245,6 +247,8 @@ rpmstrPool rpmstrPoolCreate(void)
rpmstrPool rpmstrPoolFree(rpmstrPool pool)
{
+ #pragma omp critical(rpmstrpool)
+ {
if (pool) {
if (pool->nrefs > 1) {
pool->nrefs--;
@@ -260,18 +264,24 @@ rpmstrPool rpmstrPoolFree(rpmstrPool pool)
free(pool);
}
}
+ }
return NULL;
}
rpmstrPool rpmstrPoolLink(rpmstrPool pool)
{
+ #pragma omp critical(rpmstrpool)
+ {
if (pool)
pool->nrefs++;
+ }
return pool;
}
void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
{
+ #pragma omp critical(rpmstrpool)
+ {
if (pool && !pool->frozen) {
if (!keephash) {
pool->hash = poolHashFree(pool->hash);
@@ -281,16 +291,20 @@ void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
pool->offs_alloced * sizeof(*pool->offs));
pool->frozen = 1;
}
+ }
}
void rpmstrPoolUnfreeze(rpmstrPool pool)
{
+ #pragma omp critical(rpmstrpool)
+ {
if (pool) {
if (pool->hash == NULL) {
rpmstrPoolRehash(pool);
}
pool->frozen = 0;
}
+ }
}
static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_t slen, unsigned int hash)
@@ -350,7 +364,7 @@ static rpmsid rpmstrPoolGet(rpmstrPool pool, const char * key, size_t keylen,
return 0;
}
- s = rpmstrPoolStr(pool, ht->buckets[hash].keyid);
+ s = rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid);
/* pool string could be longer than keylen, require exact matche */
if (strncmp(s, key, keylen) == 0 && s[keylen] == '\0')
return ht->buckets[hash].keyid;
@@ -373,27 +387,31 @@ static inline rpmsid strn2id(rpmstrPool pool, const char *s, size_t slen,
rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen, int create)
{
rpmsid sid = 0;
-
+ #pragma omp critical(rpmstrpool)
+ {
if (s != NULL) {
unsigned int hash = rstrnhash(s, slen);
sid = strn2id(pool, s, slen, hash, create);
}
+ }
return sid;
}
rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create)
{
rpmsid sid = 0;
-
+ #pragma omp critical(rpmstrpool)
+ {
if (s != NULL) {
size_t slen;
unsigned int hash = rstrlenhash(s, &slen);
sid = strn2id(pool, s, slen, hash, create);
}
+ }
return sid;
}
-const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid)
{
const char *s = NULL;
if (pool && sid > 0 && sid <= pool->offs_size)
@@ -401,12 +419,25 @@ const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
return s;
}
+const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
+{
+ const char *s = NULL;
+ #pragma omp critical(rpmstrpool)
+ {
+ s = rpmstrPoolStrNoLock(pool, sid);
+ }
+ return s;
+}
+
size_t rpmstrPoolStrlen(rpmstrPool pool, rpmsid sid)
{
size_t slen = 0;
+ #pragma omp critical(rpmstrpool)
+ {
if (pool && sid > 0 && sid <= pool->offs_size) {
slen = strlen(pool->offs[sid]);
}
+ }
return slen;
}
@@ -421,5 +452,12 @@ int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA,
rpmsid rpmstrPoolNumStr(rpmstrPool pool)
{
- return (pool != NULL) ? pool->offs_size : 0;
+ rpmsid id = 0;
+ #pragma omp critical(rpmstrpool)
+ {
+ if (pool) {
+ id = pool->offs_size;
+ }
+ }
+ return id;
}
--
2.11.0

View File

@ -1,336 +0,0 @@
From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 8 Jun 2017 17:08:09 +0300
Subject: [PATCH] build/pack.c: remove static local variables from buildHost()
and getBuildTime()
Their use is causing difficult to diagnoze data races when building multiple
packages in parallel, and is a bad idea in general, as it also makes it more
difficult to reason about code.
Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
build/build.c | 54 ++++++++++++++++++++++++++++--
build/pack.c | 84 +++++++++--------------------------------------
build/rpmbuild_internal.h | 8 +++--
3 files changed, 74 insertions(+), 72 deletions(-)
diff --git a/build/build.c b/build/build.c
index 13c3df2..b154f08 100644
--- a/build/build.c
+++ b/build/build.c
@@ -6,6 +6,8 @@
#include "system.h"
#include <errno.h>
+#include <netdb.h>
+#include <time.h>
#include <sys/wait.h>
#include <rpm/rpmlog.h>
@@ -16,6 +18,50 @@
#include "debug.h"
+static rpm_time_t getBuildTime(void)
+{
+ rpm_time_t buildTime = 0;
+ char *srcdate;
+ time_t epoch;
+ char *endptr;
+
+ srcdate = getenv("SOURCE_DATE_EPOCH");
+ if (srcdate) {
+ errno = 0;
+ epoch = strtol(srcdate, &endptr, 10);
+ if (srcdate == endptr || *endptr || errno != 0)
+ rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
+ else
+ buildTime = (int32_t) epoch;
+ } else
+ buildTime = (int32_t) time(NULL);
+
+ return buildTime;
+}
+
+static char * buildHost(void)
+{
+ char* hostname;
+ struct hostent *hbn;
+ char *bhMacro;
+
+ bhMacro = rpmExpand("%{?_buildhost}", NULL);
+ if (strcmp(bhMacro, "") != 0) {
+ rasprintf(&hostname, "%s", bhMacro);
+ } else {
+ hostname = rcalloc(1024, sizeof(*hostname));
+ (void) gethostname(hostname, 1024);
+ hbn = gethostbyname(hostname);
+ if (hbn)
+ strcpy(hostname, hbn->h_name);
+ else
+ rpmlog(RPMLOG_WARNING,
+ _("Could not canonicalize hostname: %s\n"), hostname);
+ }
+ free(bhMacro);
+ return(hostname);
+}
+
/**
*/
static rpmRC doRmSource(rpmSpec spec)
@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
rpmRC rc = RPMRC_OK;
int test = (what & RPMBUILD_NOBUILD);
char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL;
+ const char* host = buildHost();
+ rpm_time_t buildTime = getBuildTime();
+
if (rpmExpandNumeric("%{?source_date_epoch_from_changelog}") &&
getenv("SOURCE_DATE_EPOCH") == NULL) {
@@ -269,11 +318,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
goto exit;
if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
- (rc = packageSources(spec, &cookie)))
+ (rc = packageSources(spec, &cookie, buildTime, host)))
goto exit;
if (((what & RPMBUILD_PACKAGEBINARY) && !test) &&
- (rc = packageBinaries(spec, cookie, (didBuild == 0))))
+ (rc = packageBinaries(spec, cookie, (didBuild == 0), buildTime, host)))
goto exit;
if ((what & RPMBUILD_CLEAN) &&
@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
(void) unlink(spec->specFile);
exit:
+ free(host);
free(cookie);
spec->rootDir = NULL;
if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
diff --git a/build/pack.c b/build/pack.c
index df15876..17a4b09 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -6,8 +6,6 @@
#include "system.h"
#include <errno.h>
-#include <netdb.h>
-#include <time.h>
#include <sys/wait.h>
#include <rpm/rpmlib.h> /* RPMSIGTAG*, rpmReadPackageFile */
@@ -152,57 +150,6 @@ exit:
return rc;
}
-static rpm_time_t * getBuildTime(void)
-{
- static rpm_time_t buildTime[1];
- char *srcdate;
- time_t epoch;
- char *endptr;
-
- if (buildTime[0] == 0) {
- srcdate = getenv("SOURCE_DATE_EPOCH");
- if (srcdate) {
- errno = 0;
- epoch = strtol(srcdate, &endptr, 10);
- if (srcdate == endptr || *endptr || errno != 0)
- rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
- else
- buildTime[0] = (int32_t) epoch;
- } else
- buildTime[0] = (int32_t) time(NULL);
- }
-
- return buildTime;
-}
-
-static const char * buildHost(void)
-{
- static char hostname[1024];
- static int oneshot = 0;
- struct hostent *hbn;
- char *bhMacro;
-
- if (! oneshot) {
- bhMacro = rpmExpand("%{?_buildhost}", NULL);
- if (strcmp(bhMacro, "") != 0 && strlen(bhMacro) < 1024) {
- strcpy(hostname, bhMacro);
- } else {
- if (strcmp(bhMacro, "") != 0)
- rpmlog(RPMLOG_WARNING, _("The _buildhost macro is too long\n"));
- (void) gethostname(hostname, sizeof(hostname));
- hbn = gethostbyname(hostname);
- if (hbn)
- strcpy(hostname, hbn->h_name);
- else
- rpmlog(RPMLOG_WARNING,
- _("Could not canonicalize hostname: %s\n"), hostname);
- }
- free(bhMacro);
- oneshot = 1;
- }
- return(hostname);
-}
-
static rpmRC processScriptFiles(rpmSpec spec, Package pkg)
{
struct TriggerFileEntry *p;
@@ -476,7 +423,8 @@ exit:
* order to how the RPM format is laid on disk.
*/
static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
- const char *fileName, char **cookie)
+ const char *fileName, char **cookie,
+ rpm_time_t buildTime, const char* buildHost)
{
FD_t fd = NULL;
char * rpmio_flags = NULL;
@@ -500,7 +448,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
/* Create and add the cookie */
if (cookie) {
- rasprintf(cookie, "%s %d", buildHost(), (int) (*getBuildTime()));
+ rasprintf(cookie, "%s %d", buildHost, buildTime);
headerPutString(pkg->header, RPMTAG_COOKIE, *cookie);
}
@@ -641,7 +589,7 @@ static rpmRC checkPackages(char *pkgcheck)
return RPMRC_OK;
}
-static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename, rpm_time_t buildTime, const char* buildHost)
{
const char *errorString;
rpmRC rc = RPMRC_OK;
@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
headerCopyTags(spec->packages->header, pkg->header, copyTags);
headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);
- headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost());
- headerPutUint32(pkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
+ headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost);
+ headerPutUint32(pkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
if (spec->sourcePkgId != NULL) {
headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
free(binRpm);
}
- rc = writeRPM(pkg, NULL, *filename, NULL);
+ rc = writeRPM(pkg, NULL, *filename, NULL, buildTime, buildHost);
if (rc == RPMRC_OK) {
/* Do check each written package if enabled */
char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
@@ -719,7 +667,7 @@ struct binaryPackageTaskData
struct binaryPackageTaskData *next;
};
-static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
{
struct binaryPackageTaskData *tasks = NULL;
struct binaryPackageTaskData *task = NULL;
@@ -731,7 +679,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
if (pkg == spec->packages) {
// the first package needs to be processed ahead of others, as they copy
// changelog data from it, and so otherwise data races would happen
- task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
+ task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
tasks = task;
}
@@ -748,7 +696,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
if (task != tasks)
#pragma omp task
{
- task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
+ task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
}
}
@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
}
}
-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
{
char *pkglist = NULL;
- struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
+ struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating, buildTime, buildHost);
for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
if (task->result == RPMRC_OK) {
@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
return RPMRC_OK;
}
-rpmRC packageSources(rpmSpec spec, char **cookie)
+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost)
{
Package sourcePkg = spec->sourcePackage;
rpmRC rc;
@@ -805,8 +753,8 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
/* Add some cruft */
headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION);
- headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost());
- headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
+ headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost);
+ headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
headerPutUint32(sourcePkg->header, RPMTAG_SOURCEPACKAGE, &one, 1);
/* XXX this should be %_srpmdir */
@@ -814,7 +762,7 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn, NULL);
spec->sourcePkgId = NULL;
- rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie);
+ rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie, buildTime, buildHost);
/* Do check SRPM package if enabled */
if (rc == RPMRC_OK && pkgcheck[0] != ' ') {
diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
index 439b7d3..07e8338 100644
--- a/build/rpmbuild_internal.h
+++ b/build/rpmbuild_internal.h
@@ -427,19 +427,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags);
* @param spec spec file control structure
* @param cookie build identifier "cookie" or NULL
* @param cheating was build shortcircuited?
+ * @param buildTime the build timestamp that goes into packages
+ * @param buildHost the hostname where the build is happening
* @return RPMRC_OK on success
*/
RPM_GNUC_INTERNAL
-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating);
+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost);
/** \ingroup rpmbuild
* Generate source package.
* @param spec spec file control structure
* @retval cookie build identifier "cookie" or NULL
+ * @param buildTime the build timestamp that goes into packages
+ * @param buildHost the hostname where the build is happening
* @return RPMRC_OK on success
*/
RPM_GNUC_INTERNAL
-rpmRC packageSources(rpmSpec spec, char **cookie);
+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost);
RPM_GNUC_INTERNAL
int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,

View File

@ -1,33 +0,0 @@
From 5141d50d7b3d3c209a22c53deedb4ceef014401d Mon Sep 17 00:00:00 2001
From: Peter Kjellerstedt <pkj@axis.com>
Date: Mon, 15 May 2017 10:21:08 +0200
Subject: [PATCH 09/15] Do not require that ELF binaries are executable to be
identifiable
There is nothing that requires, e.g., a DSO to be executable, but it
is still an ELF binary and should be identified as such.
Upstream probably expects all ELF binaries to be marked as executable,
but rather than imposing such a limitation for OE, allow any file to
be identified as an ELF binary regardless of whether it is executable
or not.
Upstream-Status: Inappropriate
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
fileattrs/elf.attr | 1 -
1 file changed, 1 deletion(-)
diff --git a/fileattrs/elf.attr b/fileattrs/elf.attr
index 5805dd0ee..3516f309d 100644
--- a/fileattrs/elf.attr
+++ b/fileattrs/elf.attr
@@ -1,4 +1,3 @@
%__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
%__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
%__elf_magic ^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$
-%__elf_flags exeonly
--
2.14.2

Some files were not shown because too many files have changed in this diff Show More