Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
072138a3ef | ||
|
|
3be2c8c4a4 | ||
|
|
914587c153 |
8 changed files with 837 additions and 659 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -5,3 +5,5 @@
|
|||
.build*.log
|
||||
noarch/
|
||||
x86_64/
|
||||
sgx-pccs*-build/
|
||||
pccs-*-nodejs-licenses.txt
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
From 1b63d4762f60e779c1d0ed628c0c610483b4e835 Mon Sep 17 00:00:00 2001
|
||||
From fd190a621180553670d309f46f5bc1464d813ee0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Tue, 27 Jan 2026 11:45:01 +0000
|
||||
Subject: [PATCH 1/5] service: sanitize paths to all resources
|
||||
Subject: [PATCH 1/4] service: sanitize paths to all resources
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
|
@ -18,57 +18,57 @@ Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/service/pccs_server.js b/service/pccs_server.js
|
||||
index f97ddb7..6fee4fa 100644
|
||||
index ddc2aa5..ac4d909 100644
|
||||
--- a/service/pccs_server.js
|
||||
+++ b/service/pccs_server.js
|
||||
@@ -130,8 +130,8 @@ function startHttpsServer() {
|
||||
let privateKey;
|
||||
let certificate;
|
||||
try {
|
||||
- privateKey = fs.readFileSync('./ssl_key/private.pem', 'utf8');
|
||||
- certificate = fs.readFileSync('./ssl_key/file.crt', 'utf8');
|
||||
+ privateKey = fs.readFileSync('/etc/pccs/ssl/server-key.pem', 'utf8');
|
||||
+ certificate = fs.readFileSync('/etc/pccs/ssl/server-cert.pem', 'utf8');
|
||||
} catch (err) {
|
||||
logger.error('The private key or certificate for HTTPS server is missing.');
|
||||
logger.endAndExitProcess();
|
||||
let privateKey;
|
||||
let certificate;
|
||||
try {
|
||||
- privateKey = fs.readFileSync('./ssl_key/private.pem', 'utf8');
|
||||
- certificate = fs.readFileSync('./ssl_key/file.crt', 'utf8');
|
||||
+ privateKey = fs.readFileSync('/etc/pccs/ssl/server-key.pem', 'utf8');
|
||||
+ certificate = fs.readFileSync('/etc/pccs/ssl/server-cert.pem', 'utf8');
|
||||
} catch {
|
||||
logger.error('The private key or certificate for HTTPS server is missing.');
|
||||
logger.endAndExitProcess();
|
||||
diff --git a/service/utils/Logger.js b/service/utils/Logger.js
|
||||
index b956508..e0325c6 100644
|
||||
index e08e749..fe832c8 100644
|
||||
--- a/service/utils/Logger.js
|
||||
+++ b/service/utils/Logger.js
|
||||
@@ -51,7 +51,7 @@ export function formatLogMessage (tokens, req, res) {
|
||||
@@ -51,7 +51,7 @@ export function formatLogMessage(tokens, req, res) {
|
||||
const options = {
|
||||
file: {
|
||||
level: Config.has('LogLevel') ? Config.get('LogLevel') : 'info',
|
||||
- filename: __dirname + `/../logs/pccs_server.log`,
|
||||
+ filename: `/var/log/pccs/pccs_server.log`,
|
||||
handleExceptions: true,
|
||||
json: false,
|
||||
colorize: true,
|
||||
file: {
|
||||
level: Config.has('LogLevel') ? Config.get('LogLevel') : 'info',
|
||||
- filename: path.join(scriptDirname, '../logs/pccs_server.log'),
|
||||
+ filename: '/var/log/pccs/pccs_server.log',
|
||||
handleExceptions: true,
|
||||
json: false,
|
||||
colorize: true,
|
||||
diff --git a/service/utils/apputil.js b/service/utils/apputil.js
|
||||
index 069c542..d2f5cdb 100644
|
||||
index dd07e97..5cd2f45 100644
|
||||
--- a/service/utils/apputil.js
|
||||
+++ b/service/utils/apputil.js
|
||||
@@ -84,8 +84,8 @@ async function test_db_status() {
|
||||
@@ -84,8 +84,8 @@ async function testDbStatus() {
|
||||
}
|
||||
|
||||
async function db_migration() {
|
||||
- const migrations = fs.readdirSync('./migrations').map(name => {
|
||||
- const path = `./migrations/${name}`;
|
||||
+ const migrations = fs.readdirSync('/usr/lib/node_modules/pccs/migrations').map(name => {
|
||||
+ const path = `/usr/lib/node_modules/pccs/migrations/${name}`;
|
||||
async function dbMigration() {
|
||||
- const migrations = fs.readdirSync('./migrations').map(name => {
|
||||
- const path = `./migrations/${name}`;
|
||||
+ const migrations = fs.readdirSync('/usr/lib/node_modules/pccs/migrations').map(name => {
|
||||
+ const path = `/usr/lib/node_modules/pccs/migrations/${name}`;
|
||||
|
||||
return {
|
||||
name,
|
||||
@@ -126,7 +126,7 @@ async function db_migration() {
|
||||
|
||||
const umzug = new Umzug({
|
||||
migrations: {
|
||||
- glob: './migrations/*.{js,up.sql}',
|
||||
+ glob: '/usr/lib/node_modules/pccs/migrations/*.{js,up.sql}',
|
||||
resolve: ({ name }) => {
|
||||
const migration = migrations.find(migration => migration.name === name);
|
||||
logger.debug(`Resolving migration: ${name}, found: ${migration ? migration.name : 'none'}`);
|
||||
return {
|
||||
name,
|
||||
@@ -127,7 +127,7 @@ async function dbMigration() {
|
||||
|
||||
const umzug = new Umzug({
|
||||
migrations: {
|
||||
- glob: './migrations/*.{js,up.sql}',
|
||||
+ glob: '/usr/lib/node_modules/pccs/migrations/*.{js,up.sql}',
|
||||
resolve: ({ name }) => {
|
||||
const migration = migrations.find(migration => migration.name === name);
|
||||
logger.debug(`Resolving migration: ${name}, found: ${migration ? migration.name : 'none'}`);
|
||||
--
|
||||
2.53.0
|
||||
2.55.0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
From 616f69d67d141c80aa6e2f23c6d48dea7ce90c2c Mon Sep 17 00:00:00 2001
|
||||
From f4e72cf21596474902177f3743254e750e90fb93 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Tue, 27 Jan 2026 11:49:50 +0000
|
||||
Subject: [PATCH 3/5] pccsadmin: make 'keyring' module optional
|
||||
Subject: [PATCH 2/4] pccsadmin: make 'keyring' module optional
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
|
@ -68,5 +68,5 @@ index 39bd1fc..e8baa31 100644
|
|||
+ return False
|
||||
return True
|
||||
--
|
||||
2.53.0
|
||||
2.55.0
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
From 560d804f39f5e9752b51e9e75ec51ad87a4d8baf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Tue, 27 Jan 2026 11:47:46 +0000
|
||||
Subject: [PATCH 2/5] pccsadmin: remove leftover debugging 'print(args)'
|
||||
statement
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Dumping the python "Namespace" object to stdout after parsing argv
|
||||
serves no user purpose. Remove what is presumably a leftover
|
||||
debugging statement.
|
||||
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
---
|
||||
PccsAdminTool/pccsadmin.py | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/PccsAdminTool/pccsadmin.py b/PccsAdminTool/pccsadmin.py
|
||||
index a41c1a3..df40757 100755
|
||||
--- a/PccsAdminTool/pccsadmin.py
|
||||
+++ b/PccsAdminTool/pccsadmin.py
|
||||
@@ -85,7 +85,6 @@ def main():
|
||||
parser.print_help()
|
||||
parser.exit()
|
||||
|
||||
- print(args)
|
||||
# Check mandatory arguments for appraisalpolicy
|
||||
if args.command == 'put' and args.url and args.url.endswith("/appraisalpolicy"):
|
||||
if not args.fmspc or not args.input_file:
|
||||
--
|
||||
2.53.0
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 9f2394fdc469f6cf3a164476f7deec3b4f9679e7 Mon Sep 17 00:00:00 2001
|
||||
From e613239c0bda62fd8027ae54746aab0cad1f1801 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Tue, 27 Jan 2026 11:51:25 +0000
|
||||
Subject: [PATCH 4/5] pccsadmin: ignore errors trying to clear the keyring
|
||||
Subject: [PATCH 3/4] pccsadmin: ignore errors trying to clear the keyring
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
|
@ -81,5 +81,5 @@ index df40757..85b1654 100755
|
|||
else:
|
||||
self._handle_error(response)
|
||||
--
|
||||
2.53.0
|
||||
2.55.0
|
||||
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
# Change after running pccs-nodejs-bundler
|
||||
%global node_modules_date 20260318
|
||||
%global node_modules_date 20260723
|
||||
|
||||
%global with_sysusers_scripts 0
|
||||
%if 0%{?rhel} == 9
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
|
||||
Name: sgx-pccs
|
||||
Version: 1.25
|
||||
Version: 1.26
|
||||
Release: %autorelease
|
||||
# The PCCS service was previously bundled in linux-sgx RPMs,
|
||||
# whose versioning follows the SGX versions.
|
||||
|
|
@ -75,28 +75,35 @@ Source4: pccs-%{version}-%{node_modules_date}-node-modules.tar.xz
|
|||
# Maintained in https://github.com/berrange/confidential-computing.tee.dcap.pccs/tree/dist-git-<version>
|
||||
#
|
||||
Patch: 0001-service-sanitize-paths-to-all-resources.patch
|
||||
Patch: 0002-pccsadmin-remove-leftover-debugging-print-args-state.patch
|
||||
Patch: 0003-pccsadmin-make-keyring-module-optional.patch
|
||||
Patch: 0004-pccsadmin-ignore-errors-trying-to-clear-the-keyring.patch
|
||||
Patch: 0005-service-update-sqlite3-to-6.0.0-series-override-seri.patch
|
||||
Patch: 0002-pccsadmin-make-keyring-module-optional.patch
|
||||
Patch: 0003-pccsadmin-ignore-errors-trying-to-clear-the-keyring.patch
|
||||
Patch: 0004-service-update-sqlite3-to-6.0.0-series-override-seri.patch
|
||||
|
||||
|
||||
%if 0%{?fedora} >= 44 || 0%{?rhel} >= 11
|
||||
%if 0%{?fedora} >= 45 || 0%{?rhel} >= 11
|
||||
Requires: nodejs26
|
||||
%else
|
||||
%if 0%{?fedora} == 44
|
||||
Requires: nodejs24
|
||||
%else
|
||||
Requires: nodejs
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# XXX nodejs-packaging needs fixing to auto-add 'Requires: nodejs(abi) == XX'
|
||||
# then this can be reduced to only 'BuildRequires: nodejs, /usr/bin/node'
|
||||
# See also https://src.fedoraproject.org/rpms/linux-sgx/pull-request/6
|
||||
# Match this version with later 'Requires: nodejsXX' against sgx-pccs
|
||||
%if 0%{?fedora} >= 44 || 0%{?rhel} >= 11
|
||||
%if 0%{?fedora} >= 45 || 0%{?rhel} >= 11
|
||||
BuildRequires: nodejs26-devel, /usr/bin/node, /usr/bin/npm
|
||||
%else
|
||||
%if 0%{?fedora} == 44
|
||||
BuildRequires: nodejs24-devel, /usr/bin/node, /usr/bin/npm
|
||||
%else
|
||||
# npm in RHEL 9, nodejs-npm in RHEL 10 and F<44
|
||||
BuildRequires: nodejs-devel, /usr/bin/node, /usr/bin/npm
|
||||
%endif
|
||||
%endif
|
||||
BuildRequires: nodejs-packaging
|
||||
BuildRequires: python3-rpm-macros
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
|
|
|||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (pccs-1.25.tar.gz) = b5491065aa08c6783c181af40557eae9d7f5ed376c9c6a65f773fb3f90af98610d559c1ed965857536ee8595c5105efedd8466edfe93d09e37d83aaf5b11b828
|
||||
SHA512 (pccs-1.25-20260318-node-modules.tar.xz) = 4bbfd3c01ac3908923fc48349c3633058508887a0fe6498819210f639590cbed694d611910b6ff4d1bca34eda4514dcffa5cfcd14ea0545f357928814d48f102
|
||||
SHA512 (pccs-1.26-20260723-node-modules.tar.xz) = 182df7e57b14c5bd2a075cc94c1204c4cabeb0ecb0ccc732331935c881cad423809b7ddfeedd9cce3a1fbcf561e7e9c7933c38b02de07858ae6153b9aa82d142
|
||||
SHA512 (pccs-1.26.tar.gz) = d9fe74109b29fb1abd122bb5b62ce9ad5e49cca69406c44c45516a5b8e69f2cde62bd32ecbc66288c6719210c6c8a9bc260be1b65b8ec18d1999bf50e8f70860
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue