4 echo "no .git present. run this from the base dir of the git checkout."
9 [ -z "$version" ] && version
=`git describe --match 'v*' | sed 's/^v//'`
10 outfile
="ceph-$version"
12 echo "version $version"
15 echo "updating submodules..."
16 force
=$
(if git submodule usage
2>&1 |
grep --quiet 'update.*--force'; then echo --force ; fi)
17 if ! git submodule sync ||
! git submodule update
$force --init --recursive; then
18 echo "Error: could not initialize submodule projects"
19 echo " Network connectivity might be required."
28 boost_version_underscore
=$
(echo $boost_version |
sed 's/\./_/g')
29 boost_fname
=boost_
${boost_version_underscore}.
tar.bz2
34 if [ -z $url_base ]; then
35 echo "Error: failed to download boost."
38 url
=$url_base/$boost_fname
39 wget
-c --no-verbose -O $boost_fname $url
40 if [ $?
!= 0 -o ! -e $boost_fname ]; then
41 echo "Download of $url failed"
42 elif [ $
(sha256sum
$boost_fname |
awk '{print $1}') != $boost_sha256 ]; then
43 echo "Error: failed to download boost: SHA256 mismatch."
49 tar xjf
$boost_fname -C src \
50 --exclude="$boost_version_underscore/libs/*/doc" \
51 --exclude="$boost_version_underscore/libs/*/example" \
52 --exclude="$boost_version_underscore/libs/*/examples" \
53 --exclude="$boost_version_underscore/libs/*/meta" \
54 --exclude="$boost_version_underscore/libs/*/test" \
55 --exclude="$boost_version_underscore/tools/boostbook" \
56 --exclude="$boost_version_underscore/tools/quickbook" \
57 --exclude="$boost_version_underscore/tools/auto_index" \
58 --exclude='doc' --exclude='more' --exclude='status'
59 mv src
/boost_
${boost_version_underscore} src
/boost
60 tar cf
${outfile}.boost.
tar ${outfile}/src
/boost
64 _python_autoselect
() {
66 for interpreter
in python2.7 python3
; do
67 type $interpreter > /dev
/null
2>&1 ||
continue
68 python_command
=$interpreter
71 if [ -z "$python_command" ] ; then
72 echo "Could not find a suitable python interpreter! Bailing out."
78 build_dashboard_frontend
() {
81 $CURR_DIR/src
/tools
/setup-virtualenv.sh
--python=$
(_python_autoselect
) $TEMP_DIR
82 $TEMP_DIR/bin
/pip
install nodeenv
83 $TEMP_DIR/bin
/nodeenv
-p --node=10.13.0
84 cd src
/pybind
/mgr
/dashboard
/frontend
85 .
$TEMP_DIR/bin
/activate
87 npm run build
-- --prod --progress=false
91 tar cf dashboard_frontend.
tar $outfile/src
/pybind
/mgr
/dashboard
/frontend
/dist
94 # clean out old cruft...
99 echo "building tarball..."
100 bin
/git-archive-all.sh
--prefix ceph-
$version/ \
105 # populate files with version strings
106 echo "including src/.git_version, ceph.spec"
108 (git rev-parse HEAD
; git describe
) 2> /dev
/null
> src
/.git_version
110 # if the version has '-' in it, it has a 'release' part,
111 # like vX.Y.Z-N-g<shortsha1>. If it doesn't, it's just
112 # vX.Y.Z. Handle both, and translate - to . for rpm
113 # naming rules (the - separates version and release).
115 if expr index
$version '-' > /dev
/null
; then
116 rpm_version
=`echo $version | cut -d - -f 1-1`
117 rpm_release
=`echo $version | cut -d - -f 2- | sed 's/-/./'`
123 for spec
in ceph.spec.
in alpine
/APKBUILD.
in; do
125 sed "s/@VERSION@/$rpm_version/g" |
126 sed "s/@RPM_RELEASE@/$rpm_release/g" |
127 sed "s/@TARBALL_BASENAME@/ceph-$version/g" > `echo $spec | sed 's/.in$//'`
130 tar cvf
$outfile.version.
tar $outfile/src
/.git_version
$outfile/ceph.spec
$outfile/alpine
/APKBUILD
131 # NOTE: If you change this version number make sure the package is available
132 # at the three URLs referenced below (may involve uploading to download.ceph.com)
134 download_boost
$boost_version 2684c972994ee57fc5632e03bf044746f6eb45d4920c343937a465fd67a5adba \
135 https
://dl.bintray.com
/boostorg
/release
/$boost_version/source \
136 https
://downloads.sourceforge.net
/project
/boost
/boost
/$boost_version \
137 https
://download.ceph.com
/qa
138 build_dashboard_frontend
139 tar --concatenate -f $outfile.all.
tar $outfile.version.
tar
140 tar --concatenate -f $outfile.all.
tar $outfile.boost.
tar
141 tar --concatenate -f $outfile.all.
tar $outfile.
tar
142 tar --concatenate -f $outfile.all.
tar dashboard_frontend.
tar
143 mv $outfile.all.
tar $outfile.
tar
145 rm -f $outfile.version.
tar
146 rm -f $outfile.boost.
tar
148 echo "compressing..."
149 bzip2 -9 $outfile.
tar