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."
35 boost_version_underscore=$(echo $boost_version | sed 's/\./_/g')
36 boost_fname=boost_${boost_version_underscore}.tar.bz2
41 if [ -z $url_base ]; then
42 echo "Error: failed to download boost."
45 url=$url_base/$boost_fname
46 wget -c --no-verbose -O $boost_fname $url
47 if [ $? != 0 -o ! -e $boost_fname ]; then
48 echo "Download of $url failed"
49 elif [ $(sha256sum $boost_fname | awk '{print $1}') != $boost_sha256 ]; then
50 echo "Error: failed to download boost: SHA256 mismatch."
56 tar xjf $boost_fname -C src \
57 --exclude="$boost_version_underscore/libs/*/doc" \
58 --exclude="$boost_version_underscore/libs/*/example" \
59 --exclude="$boost_version_underscore/libs/*/examples" \
60 --exclude="$boost_version_underscore/libs/*/meta" \
61 --exclude="$boost_version_underscore/libs/*/test" \
62 --exclude="$boost_version_underscore/tools/boostbook" \
63 --exclude="$boost_version_underscore/tools/quickbook" \
64 --exclude="$boost_version_underscore/tools/auto_index" \
65 --exclude='doc' --exclude='more' --exclude='status'
66 mv src/boost_${boost_version_underscore} src/boost
67 tar cf ${outfile}.boost.tar ${outfile}/src/boost
71 build_dashboard_frontend() {
75 $CURR_DIR/src/tools/setup-virtualenv.sh $TEMP_DIR
76 $TEMP_DIR/bin/pip install nodeenv
77 $TEMP_DIR/bin/nodeenv -p --node=12.16.2
78 cd src/pybind/mgr/dashboard/frontend
80 . $TEMP_DIR/bin/activate
82 echo "Building ceph-dashboard frontend with build:localize script";
83 # we need to use "--" because so that "--prod" survives accross all
84 # scripts redirections inside package.json
85 npm run build:localize -- --prod
89 tar cf dashboard_frontend.tar $outfile/src/pybind/mgr/dashboard/frontend/dist
92 generate_rook_ceph_client() {
93 $outfile/src/pybind/mgr/rook/generate_rook_ceph_client.sh
94 tar cf rook_ceph_client.tar $outfile/src/pybind/mgr/rook/rook_client/*.py
97 # clean out old cruft...
102 echo "building tarball..."
103 bin/git-archive-all.sh --prefix ceph-$version/ \
108 # populate files with version strings
109 echo "including src/.git_version, ceph.spec"
111 (git rev-parse HEAD ; echo $version) 2> /dev/null > src/.git_version
113 for spec in ceph.spec.in; do
115 sed "s/@PROJECT_VERSION@/$rpm_version/g" |
116 sed "s/@RPM_RELEASE@/$rpm_release/g" |
117 sed "s/@TARBALL_BASENAME@/ceph-$version/g" > `echo $spec | sed 's/.in$//'`
120 tar cvf $outfile.version.tar $outfile/src/.git_version $outfile/ceph.spec
121 # NOTE: If you change this version number make sure the package is available
122 # at the three URLs referenced below (may involve uploading to download.ceph.com)
124 download_boost $boost_version 4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402 \
125 https://dl.bintray.com/boostorg/release/$boost_version/source \
126 https://downloads.sourceforge.net/project/boost/boost/$boost_version \
127 https://download.ceph.com/qa
129 build_dashboard_frontend
130 generate_rook_ceph_client
131 tar --concatenate -f $outfile.all.tar $outfile.version.tar
132 tar --concatenate -f $outfile.all.tar $outfile.boost.tar
133 tar --concatenate -f $outfile.all.tar $outfile.tar
134 tar --concatenate -f $outfile.all.tar dashboard_frontend.tar
135 tar --concatenate -f $outfile.all.tar rook_ceph_client.tar
136 mv $outfile.all.tar $outfile.tar
138 rm -f $outfile.version.tar
139 rm -f $outfile.boost.tar
141 echo "compressing..."
142 bzip2 -9 $outfile.tar