Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ophélie Gagnard
slapos.package
Commits
31f32555
Commit
31f32555
authored
Mar 11, 2022
by
Ophélie Gagnard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build-scripts/: Change some variable names, add a sed regex.
parent
e26e5525
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
14 deletions
+22
-14
obs/generic/build-scripts/configuration_information.sh
obs/generic/build-scripts/configuration_information.sh
+20
-12
obs/generic/build-scripts/obs.sh
obs/generic/build-scripts/obs.sh
+2
-2
No files found.
obs/generic/build-scripts/configuration_information.sh
View file @
31f32555
...
...
@@ -4,25 +4,29 @@
INITIAL_DIR
=
"
$(
pwd
)
"
/
#
RELEASE
INFORMATION
#
DEBIAN_REVISION
INFORMATION
# Modify the following variables accordingly
VERSION
=
1
SOFTWARE_
VERSION
=
1
#RECIPE_VERSION=1
RELEASE
=
1
DEBIAN_REVISION
=
1
SOFTWARE_NAME
=
mca
COMPOUND_VERSION
=
${
VERSION
}
-
${
RELEASE
}
VERSION_NAME
=
${
SOFTWARE_NAME
}
_
${
COMPOUND_VERSION
}
# For the version format, see: https://www.debian.org/doc/manuals/debian-faq/pkg-basics.en.html#pkgname
# here, in <foo>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb
# VersionNumber is SOFTWARE_VERSION, DebianRevisionNumber is DEBIAN_REVISION
# note: the architecture is added when building the package (here: in OBS)
COMPOUND_VERSION
=
${
SOFTWARE_VERSION
}
-
${
DEBIAN_REVISION
}
SOFTWARE_AND_VERSION
=
${
SOFTWARE_NAME
}
_
${
COMPOUND_VERSION
}
ARCHIVE_EXT
=
.tar.gz
# INSTALL INFORMATION
# TARGET_DIR is only used in the templates via sed regexps
TARGET_DIR
=
/opt/
$
VERSION_NAME
TARGET_DIR
=
/opt/
$
SOFTWARE_AND_VERSION
# OBS AND DISTRIBUTIONS INFORMATION
OBS_DIR
=
$INITIAL_DIR
/home:fg.nxd/
$SOFTWARE_NAME
/
DIST_DIR
=
$INITIAL_DIR
/distribution-specifics/
$SOFTWARE_NAME
/
TARBALL_DIR
=
$INITIAL_DIR
/tarballs/
$
VERSION_NAME
TARBALL_DIR
=
$INITIAL_DIR
/tarballs/
$
SOFTWARE_AND_VERSION
# BUILD INFORMATION
# Modify the following variables accordingly
...
...
@@ -47,14 +51,18 @@ TEMPLATE_DIR=`realpath -m $TEMPLATE_DIR`
BUILD_DIR
=
`
realpath
-m
$BUILD_DIR
`
RUN_BUILDOUT_DIR
=
`
realpath
-m
$RUN_BUILDOUT_DIR
`
# Regular expressions for templates
## Regular expressions for templates
NAME_REGEX
=
"s|%SOFTWARE_NAME%|
$SOFTWARE_NAME
|g"
# versions (not used at the moment)
VERSION_REGEX
=
"s|
\%
RECIPE_VERSION
\%
|
$RECIPE_VERSION
|g;s|
\%
VERSION
\%
|
$VERSION
|g;s|
\%
RELEASE
\%
|
$RELEASE
|g;s|
\%
COMPOUND_VERSION
\%
|
$COMPOUND_VERSION
|g"
# versions (supporting legact macros)
#OLD_VERSION_REGEX="s|\%RECIPE_VERSION\%|$RECIPE_VERSION|g;s|\%VERSION\%|$SOFTWARE_VERSION|g;s|\%DEBIAN_REVISION\%|$DEBIAN_REVISION|g;s|\%COMPOUND_VERSION\%|$COMPOUND_VERSION|g"
# versions (supporting new macros)
VERSION_REGEX
=
"s|%RECIPE_VERSION%|
$RECIPE_VERSION
|g;s|%SOFTWARE_VERSION%|
$SOFTWARE_VERSION
|g;s|%DEBIAN_REVISION%|
$DEBIAN_REVISION
|g;s|%COMPOUND_VERSION%|
$COMPOUND_VERSION
|g"
# Note: %PATCHES_DIRECTORY% not supported yet
# directories (supporting new macros)
DIR_REGEX
=
"s|
\%
TARGET_DIR
\%
|
$TARGET_DIR
|g;s|
\%
BUILD_DIR
\%
|
$BUILD_DIR
|g;s|
\%
RUN_BUILDOUT_DIR
\
%
|
$RUN_BUILDOUT_DIR
|g"
PATH_REGEX
=
"s|
\%
SR_PATH
\
%
|
$SR_PATH
|g"
DIR_REGEX
=
"s|
%TARGET_DIR%|
$TARGET_DIR
|g;s|%BUILD_DIR%|
$BUILD_DIR
|g;s|%RUN_BUILDOUT_DIR
%|
$RUN_BUILDOUT_DIR
|g"
PATH_REGEX
=
"s|
%SR_PATH
%|
$SR_PATH
|g"
# directories (supporting legacy macros, not used anymore)
#OLD_DIR_REGEX="s|\%TARGET_DIRECTORY\%|$TARGET_DIR|g;s|\%BUILD_ROOT_DIRECTORY\%|$BUILD_DIR|g;s|\%BUILD_DIRECTORY\%|$RUN_BUILDOUT_DIR|g"
# concatenate all regex using ; (quoted, not to end the command)
ALL_REGEX
=
$VERSION_REGEX
";"
$DIR_REGEX
";"
$PATH_REGEX
#";"$OLD_DIR_REGEX
ALL_REGEX
=
$
NAME_REGEX
";"
$
VERSION_REGEX
";"
$DIR_REGEX
";"
$PATH_REGEX
#";"$OLD_DIR_REGEX
obs/generic/build-scripts/obs.sh
View file @
31f32555
...
...
@@ -22,11 +22,11 @@ rm -rf $RUN_BUILDOUT_DIR/{.installed.cfg,parts/}
## prepare the files for OBS
mkdir
-p
$TMP_DIR
# -C option allows to give tar an absolute path without archiving the directory from / (i.e. home/user/[...])
tar
czf
$TMP_DIR
/
${
VERSION_NAME
}${
ARCHIVE_EXT
}
-C
$INITIAL_DIR
/tarballs/
$VERSION_NAME
/
tar
czf
$TMP_DIR
/
${
SOFTWARE_AND_VERSION
}${
ARCHIVE_EXT
}
-C
$INITIAL_DIR
/tarballs/
$SOFTWARE_AND_VERSION
/
tar
czf
$TMP_DIR
/debian.tar.gz
-C
$DIST_DIR
/ debian/
cp
$DIST_DIR
/
*
.dsc
$TMP_DIR
/
# move the files for OBS
cp
$TMP_DIR
/
${
VERSION_NAME
}${
ARCHIVE_EXT
}
$OBS_DIR
cp
$TMP_DIR
/
${
SOFTWARE_AND_VERSION
}${
ARCHIVE_EXT
}
$OBS_DIR
cp
$TMP_DIR
/debian.tar.gz
$OBS_DIR
cp
$TMP_DIR
/
*
.dsc
$OBS_DIR
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment