Setup debian patching scripts
The previous patching scripts were specific to the centos rpm patching directories, so these scripts are cloned for the debian env and updated to reflect the new python and binary locations. These scripts affect build commands and not runtime. These scripts are not operational as they point to utilities and imports that are not converted to ostree yet. Test Plan: Verify build and ISO creation for debian succeed. Story: 2009969 Task: 45198 Signed-off-by: Al Bailey <al.bailey@windriver.com> Change-Id: Ia903c6b4f07e3d1409c04c2cc17ff40a2e5a4c7f
This commit is contained in:
parent
4daa55b83c
commit
0eb171c11c
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2018-2020 Wind River Systems, Inc.
|
||||
Copyright (c) 2018-2022 Wind River Systems, Inc.
|
||||
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
@ -10,7 +10,6 @@ SPDX-License-Identifier: Apache-2.0
|
|||
import getopt
|
||||
import os
|
||||
import platform
|
||||
import rpm
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
@ -31,8 +30,7 @@ dev_cert_path = os.path.abspath(os.path.join(cgcs_patch_bindir, '../../enable-de
|
|||
pv.dev_certificate_marker = dev_cert_path
|
||||
|
||||
def usage():
|
||||
print "Usage: %s -o <repodir> <patch> ..." \
|
||||
% os.path.basename(sys.argv[0])
|
||||
print("Usage: %s -o <repodir> <patch> ..." % os.path.basename(sys.argv[0]))
|
||||
exit(1)
|
||||
|
||||
|
||||
|
@ -67,7 +65,7 @@ def main():
|
|||
# Check to see if the expected structure already exists,
|
||||
# maybe we're appending a patch.
|
||||
if not os.path.exists(committed_dir) or not os.path.exists(pkgdir):
|
||||
print "Packages or metadata dir missing from existing %s. Aborting..." % output
|
||||
print("Packages or metadata dir missing from existing %s. Aborting..." % output)
|
||||
exit(1)
|
||||
|
||||
# Load the existing metadata
|
||||
|
@ -92,14 +90,14 @@ def main():
|
|||
# Change to the tmpdir
|
||||
os.chdir(tmpdir)
|
||||
|
||||
print "Parsing %s" % fpath
|
||||
print("Parsing %s" % fpath)
|
||||
pf.PatchFile.read_patch(fpath)
|
||||
|
||||
thispatch = pf.PatchData()
|
||||
patch_id = thispatch.parse_metadata("metadata.xml", constants.COMMITTED)
|
||||
|
||||
if patch_id in allpatches.metadata:
|
||||
print "Skipping %s as it's already in the repo" % patch_id
|
||||
print("Skipping %s as it's already in the repo" % patch_id)
|
||||
# Change back to original working dir
|
||||
os.chdir(orig_wd)
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
pushd `dirname $0` > /dev/null
|
||||
SCRIPTPATH=`pwd`
|
||||
popd > /dev/null
|
||||
|
||||
SWPATCH_DIR=$SCRIPTPATH/..
|
||||
|
||||
# Set environment variables for python
|
||||
export PYTHONPATH=$SWPATCH_DIR/cgcs-patch
|
||||
export PYTHONDONTWRITEBYTECODE=true
|
||||
|
||||
# Run the patch_build tool
|
||||
exec $SWPATCH_DIR/bin/make_patch "$@"
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
pushd `dirname $0` > /dev/null
|
||||
SCRIPTPATH=`pwd`
|
||||
popd > /dev/null
|
||||
|
||||
SWPATCH_DIR=$SCRIPTPATH/..
|
||||
|
||||
# Set environment variables for python
|
||||
export PYTHONPATH=$SWPATCH_DIR/cgcs-patch
|
||||
export PYTHONDONTWRITEBYTECODE=true
|
||||
|
||||
# Run the patch_build tool
|
||||
exec $SWPATCH_DIR/bin/modify_patch "$@"
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2018-2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
SCRIPTPATH=$(dirname $(readlink -f $0))
|
||||
SWPATCH_DIR=$SCRIPTPATH/..
|
||||
|
||||
# Source release-info
|
||||
. $SCRIPTPATH/../../../utilities/utilities/build-info/release-info.inc
|
||||
export PLATFORM_RELEASE
|
||||
|
||||
# Set environment variables for python
|
||||
export PYTHONPATH=$SWPATCH_DIR/cgcs-patch
|
||||
export PYTHONDONTWRITEBYTECODE=true
|
||||
|
||||
# Run the patch_build tool
|
||||
exec $SWPATCH_DIR/bin/patch_build "$@"
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
pushd `dirname $0` > /dev/null
|
||||
SCRIPTPATH=`pwd`
|
||||
popd > /dev/null
|
||||
|
||||
SWPATCH_DIR=$SCRIPTPATH/..
|
||||
|
||||
# Set environment variables for python
|
||||
export PYTHONPATH=$SWPATCH_DIR/cgcs-patch
|
||||
export PYTHONDONTWRITEBYTECODE=true
|
||||
|
||||
# Run the patch_build tool
|
||||
exec $SWPATCH_DIR/bin/query_patch "$@"
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2018-2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
SCRIPTPATH=$(dirname $(readlink -f $0))
|
||||
SWPATCH_DIR=$SCRIPTPATH/..
|
||||
|
||||
# Source release-info
|
||||
. $SCRIPTPATH/../../../utilities/utilities/build-info/release-info.inc
|
||||
export PLATFORM_RELEASE
|
||||
|
||||
# Set environment variables for python
|
||||
export PYTHONPATH=$SWPATCH_DIR/cgcs-patch
|
||||
export PYTHONDONTWRITEBYTECODE=true
|
||||
|
||||
# Run the setup_patch_repo tool
|
||||
exec $SWPATCH_DIR/bin/setup_patch_repo "$@"
|
||||
|
Loading…
Reference in New Issue