4 echo "no .git present. run this from the base dir of the git checkout."
9 [ -z "$version" ] && version
=$
(git describe
--long --match 'v*' |
sed 's/^v//')
10 if expr index
$version '-' > /dev
/null
; then
11 rpm_version
=$
(echo $version | cut
-d - -f 1-1)
12 rpm_release
=$
(echo $version | cut
-d - -f 2- |
sed 's/-/./')
18 outfile
="ceph-$version"
19 echo "version $version"
22 echo "updating submodules..."
23 force
=$
(if git submodule usage
2>&1 |
grep --quiet 'update.*--force'; then echo --force ; fi)
24 if ! git submodule sync ||
! git submodule update
$force --init --recursive; then
25 echo "Error: could not initialize submodule projects"
26 echo " Network connectivity might be required."
39 if [ -z $url_base ]; then
40 echo "Error: failed to download $name."
44 wget
-c --no-verbose -O $fname $url
45 if [ $?
!= 0 -o ! -e $fname ]; then
46 echo "Download of $url failed"
47 elif [ $
(sha256sum
$fname |
awk '{print $1}') != $sha256 ]; then
48 echo "Error: failed to download $name: SHA256 mismatch."
61 boost_version_underscore
=$
(echo $boost_version |
sed 's/\./_/g')
62 boost_fname
=boost_
${boost_version_underscore}.
tar.bz2
63 download_from
$boost_fname $boost_sha256 $
*
64 tar xjf
$boost_fname -C src \
65 --exclude="$boost_version_underscore/libs/*/doc" \
66 --exclude="$boost_version_underscore/libs/*/example" \
67 --exclude="$boost_version_underscore/libs/*/examples" \
68 --exclude="$boost_version_underscore/libs/*/meta" \
69 --exclude="$boost_version_underscore/libs/*/test" \
70 --exclude="$boost_version_underscore/tools/boostbook" \
71 --exclude="$boost_version_underscore/tools/quickbook" \
72 --exclude="$boost_version_underscore/tools/auto_index" \
73 --exclude='doc' --exclude='more' --exclude='status'
74 mv src
/boost_
${boost_version_underscore} src
/boost
75 tar cf
${outfile}.boost.
tar ${outfile}/src
/boost
84 liburing_fname
=liburing-
${liburing_version}.
tar.gz
85 download_from
$liburing_fname $liburing_sha256 $
*
86 tar xzf
$liburing_fname -C src \
91 # normalize the names, liburing-0.7 if downloaded from git.kernel.dk,
92 # liburing-liburing-0.7 from github.com
93 mv src
/liburing-
* src
/liburing
94 tar cf
${outfile}.liburing.
tar ${outfile}/src
/liburing
98 build_dashboard_frontend
() {
102 $CURR_DIR/src
/tools
/setup-virtualenv.sh
$TEMP_DIR
103 $TEMP_DIR/bin
/pip
install nodeenv
104 $TEMP_DIR/bin
/nodeenv
--verbose -p --node=12.18.2
105 cd src
/pybind
/mgr
/dashboard
/frontend
107 .
$TEMP_DIR/bin
/activate
108 NG_CLI_ANALYTICS
=false timeout
1h npm ci
109 echo "Building ceph-dashboard frontend with build:localize script";
110 # we need to use "--" because so that "--prod" survives accross all
111 # scripts redirections inside package.json
112 npm run build
:localize
-- --prod
116 tar cf dashboard_frontend.
tar $outfile/src
/pybind
/mgr
/dashboard
/frontend
/dist
119 generate_rook_ceph_client
() {
120 $outfile/src
/pybind
/mgr
/rook
/generate_rook_ceph_client.sh
121 tar cf rook_ceph_client.
tar $outfile/src
/pybind
/mgr
/rook
/rook_client
/*.py
124 # clean out old cruft...
129 echo "building tarball..."
130 bin
/git-archive-all.sh
--prefix ceph-
$version/ \
135 # populate files with version strings
136 echo "including src/.git_version, ceph.spec"
138 (git rev-parse HEAD
; echo $version) 2> /dev
/null
> src
/.git_version
140 for spec
in ceph.spec.
in; do
142 sed "s/@PROJECT_VERSION@/$rpm_version/g" |
143 sed "s/@RPM_RELEASE@/$rpm_release/g" |
144 sed "s/@TARBALL_BASENAME@/ceph-$version/g" > `echo $spec | sed 's/.in$//'`
147 tar cvf
$outfile.version.
tar $outfile/src
/.git_version
$outfile/ceph.spec
148 # NOTE: If you change this version number make sure the package is available
149 # at the three URLs referenced below (may involve uploading to download.ceph.com)
151 download_boost
$boost_version 4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402 \
152 https
://dl.bintray.com
/boostorg
/release
/$boost_version/source \
153 https
://downloads.sourceforge.net
/project
/boost
/boost
/$boost_version \
154 https
://download.ceph.com
/qa
155 download_liburing
0.7 8e2842cfe947f3a443af301bdd6d034455536c38a455c7a700d0c1ad165a7543 \
156 https
://github.com
/axboe
/liburing
/archive \
157 https
://git.kernel.dk
/cgit
/liburing
/snapshot
158 build_dashboard_frontend
159 generate_rook_ceph_client
160 for tarball
in $outfile.version \
166 tar --concatenate -f $outfile.all.
tar $tarball.
tar
169 mv $outfile.all.
tar $outfile.
tar
172 echo "compressing..."
173 bzip2 -9 $outfile.
tar