Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Loic
tools
Commits
a9746392
Commit
a9746392
authored
Feb 14, 2017
by
Oliver Pinter
Browse files
HBSD: clarify the meaning of variables and www hooks
Signed-off-by:
Oliver Pinter
<
oliver.pinter@hardenedbsd.org
>
parent
8df22320
Changes
1
Hide whitespace changes
Inline
Side-by-side
release/installer/build_release.sh
View file @
a9746392
...
...
@@ -16,14 +16,17 @@ BRANCH_10="hardened/10-stable/master"
BRANCH_11
=
"hardened/11-stable/master"
BRANCH_current
=
"hardened/current/master"
LOG_DIR
=
"/usr/data/release/logs"
RELESE_BASE_DIR
=
"/usr/data/release"
LOG_DIR
=
"
${
RELESE_BASE_DIR
}
/logs"
LOG_DIR_INFO
=
"
${
LOG_DIR
}
/info"
LOG_DIR_DONE
=
"
${
LOG_DIR
}
/done"
LOG_DIR_FAILED
=
"
${
LOG_DIR
}
/failed"
LOG_FILE_PREFIX
=
"
${
LOG_DIR
}
/
${
DATE
}
"
LOG_FILE
=
"
${
LOG_FILE_PREFIX
}
.log"
LOG_FILE_SHORT
=
"
${
LOG_DIR
}
/
${
DATE
}
.slog"
SOURCES_DIR
=
"/usr/data/release/git"
SOURCES_DIR
=
"
${
RELESE_BASE_DIR
}
/git"
LOCK_DIR
=
"
${
SOURCES_DIR
}
"
LOCK_FILE
=
"
${
LOCK_DIR
}
/hardenedbsd-stable-repo-lock"
SOURCES_REPO
=
"https://github.com/HardenedBSD"
...
...
@@ -34,9 +37,10 @@ HARDENEDBSD_TOOLS_REPO="${SOURCES_REPO}/tools.git"
RELEASE_CONF
=
"
${
SOURCES_DIR
}
/tools.git/release/release-confs/HardenedBSD-stable-autodetect-git-release.conf"
SIGN_COMMAND
=
"/root/bin/hbsd_sign.csh"
WWW_BASE
=
"/usr/data/release/releases"
WWW_RELEASE_DIR
=
"./pub/HardenedBSD/releases/amd64/amd64"
WWW_ISO_DIR
=
"./pub/HardenedBSD/releases/amd64/amd64/ISO-IMAGES"
INSTALLER_SETS_BASE
=
"
${
RELESE_BASE_DIR
}
/releases"
INSTALLER_SETS_RELEASE_DIR
=
"./pub/HardenedBSD/releases/amd64/amd64"
INSTALLER_SETS_ISO_DIR
=
"./pub/HardenedBSD/releases/amd64/amd64/ISO-IMAGES"
WWW_HOOK_DIRS
=
"
${
RELESE_BASE_DIR
}
/www/"
log
()
{
...
...
@@ -238,25 +242,25 @@ publish_release()
local
_last_build_from_branch
=
"
`
transform_branch_to_filename
${
_branch
}
`
-LAST"
local
_hbsd_name_tag
=
"
`
get_branch_specific
${
_branch
}
HBSD_NAME_TAG
`
"
local
_hbsd_date_tag
=
"
`
get_branch_specific
${
_branch
}
HBSD_DATE_TAG
`
"
local
_
www_iso_dir
=
"
${
WWW
_ISO_DIR
}
/
${
_hbsd_name_tag
}
"
local
_
www
_iso_dir_symlink
=
"
${
WWW
_ISO_DIR
}
/
${
_hbsd_date_tag
}
"
local
_
www_dist_dir
=
"
${
WWW
_RELEASE_DIR
}
/
${
_hbsd_name_tag
}
"
local
_
www
_dist_dir_symlink
=
"
${
WWW
_RELEASE_DIR
}
/
${
_hbsd_date_tag
}
"
local
_
www
_dist_dir_last_symlink
=
"
${
WWW
_RELEASE_DIR
}
/
${
_hbsd_date_tag
%-*-*
}
-LAST"
local
_
installer_sets_iso_dir
=
"
${
INSTALLER_SETS
_ISO_DIR
}
/
${
_hbsd_name_tag
}
"
local
_
installer_sets
_iso_dir_symlink
=
"
${
INSTALLER_SETS
_ISO_DIR
}
/
${
_hbsd_date_tag
}
"
local
_
installer_sets_dist_dir
=
"
${
INSTALLER_SETS
_RELEASE_DIR
}
/
${
_hbsd_name_tag
}
"
local
_
installer_sets
_dist_dir_symlink
=
"
${
INSTALLER_SETS
_RELEASE_DIR
}
/
${
_hbsd_date_tag
}
"
local
_
installer_sets
_dist_dir_last_symlink
=
"
${
INSTALLER_SETS
_RELEASE_DIR
}
/
${
_hbsd_date_tag
%-*-*
}
-LAST"
local
_R_dir
=
"
`
get_branch_specific
${
_branch
}
RELEASE_DIR
`
"
if
[
${
_status
}
=
0
]
then
set
old_pwd
=
${
PWD
}
if
[
!
-d
${
WWW
_BASE
}
]
if
[
!
-d
${
INSTALLER_SETS
_BASE
}
]
then
mkdir
-p
${
WWW
_BASE
}
mkdir
-p
${
INSTALLER_SETS
_BASE
}
fi
cd
${
WWW
_BASE
}
cd
${
INSTALLER_SETS
_BASE
}
for
i
in
${
WWW_ISO_DIR
}
${
WWW
_RELEASE_DIR
}
for
i
in
${
INSTALLER_SETS_ISO_DIR
}
${
INSTALLER_SETS
_RELEASE_DIR
}
do
if
[
!
-d
${
i
}
]
then
...
...
@@ -267,37 +271,37 @@ publish_release()
# XXX: first we should move the ftp directory
# because after the move only the iso files are left.
#
# The symlink points to the _hbsd_name_tag named directory in _
www
_dist_dir.
mv
-v
${
_R_dir
}
/ftp
${
_
www
_dist_dir
}
ln
-vsf
./
${
_hbsd_name_tag
}
${
_
www
_dist_dir_symlink
}
# The symlink points to the _hbsd_name_tag named directory in _
installer_sets
_dist_dir.
mv
-v
${
_R_dir
}
/ftp
${
_
installer_sets
_dist_dir
}
ln
-vsf
./
${
_hbsd_name_tag
}
${
_
installer_sets
_dist_dir_symlink
}
# XXX: in theory only the iso, img, and checksum file are in the R directory.
#
# The symlink points to the _hbsd_name_tag named directory in _
www
_iso_dir.
mv
-v
${
_R_dir
}
${
_
www
_iso_dir
}
ln
-vsf
./
${
_hbsd_name_tag
}
${
_
www
_iso_dir_symlink
}
# The symlink points to the _hbsd_name_tag named directory in _
installer_sets
_iso_dir.
mv
-v
${
_R_dir
}
${
_
installer_sets
_iso_dir
}
ln
-vsf
./
${
_hbsd_name_tag
}
${
_
installer_sets
_iso_dir_symlink
}
# This is required by bootonly medium.
#
# The symlink points to the _hbsd_name_tag named directory in _
www
_dist_dir.
unlink
${
_
www
_dist_dir_last_symlink
}
ln
-vsf
./
${
_hbsd_name_tag
}
${
_
www
_dist_dir_last_symlink
}
# The symlink points to the _hbsd_name_tag named directory in _
installer_sets
_dist_dir.
unlink
${
_
installer_sets
_dist_dir_last_symlink
}
ln
-vsf
./
${
_hbsd_name_tag
}
${
_
installer_sets
_dist_dir_last_symlink
}
# This is for installer.hardenedbsd.org's main page's last links.
#
# The symlink points to the last _
www
_iso_dir directory in
WWW
_BASE.
unlink
${
WWW_
BASE
}
/
${
_last_build_from_branch
}
ln
-vsf
${
_
www
_iso_dir
}
${
WWW_
BASE
}
/
${
_last_build_from_branch
}
# The symlink points to the last _
installer_sets
_iso_dir directory in
INSTALLER_SETS
_BASE.
unlink
${
WWW_
HOOK_DIRS
}
/
${
_last_build_from_branch
}
ln
-vsf
${
_
installer_sets
_iso_dir
}
${
WWW_
HOOK_DIRS
}
/
${
_last_build_from_branch
}
# Sign the MANIFEST file and the CHECKSUM.*
if
[
-e
${
SIGN_COMMAND
}
]
then
find
${
_
www
_iso_dir
}
-name
"CHECKSUM.*"
-type
f
-exec
${
SIGN_COMMAND
}
{}
\;
find
${
_
www
_dist_dir
}
-name
"MANIFEST"
-type
f
-exec
${
SIGN_COMMAND
}
{}
\;
find
${
_
installer_sets
_iso_dir
}
-name
"CHECKSUM.*"
-type
f
-exec
${
SIGN_COMMAND
}
{}
\;
find
${
_
installer_sets
_dist_dir
}
-name
"MANIFEST"
-type
f
-exec
${
SIGN_COMMAND
}
{}
\;
fi
# Log out the newly generated ISOs checksums.
for
i
in
`
find
${
_
www
_iso_dir
}
-name
"CHECKSUM.*"
-type
f
`
for
i
in
`
find
${
_
installer_sets
_iso_dir
}
-name
"CHECKSUM.*"
-type
f
`
do
info
"build(
${
_branch
}
)
`
basename
${
i
}
`
:"
cat
$i
|
while
read
line
...
...
Write
Preview
Supports
Markdown
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