]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
build_debs.sh now lives in build_deb
authorAlfredo Deza <adeza@redhat.com>
Wed, 3 Jun 2015 16:14:40 +0000 (12:14 -0400)
committerAlfredo Deza <adeza@redhat.com>
Wed, 3 Jun 2015 16:14:40 +0000 (12:14 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-build/build/build_deb

index a6609ee8e0e98fbb0370bbeb760f0a25bb3a5dda..1f468b6873d290fc1a6be189e1676124d2dc9594 100644 (file)
@@ -58,7 +58,68 @@ dpkg-source -b ceph-${vers}
 
 echo "Building Debian"
 cd "$WORKSPACE"
-sudo $bindir/build_debs.sh ./release /srv/debian-base $vers
+# Before, at this point, this script called the below contents that
+# was part of /srv/ceph-buid/build_debs.sh. Now everything is in here, in one
+# place, no need to checkout/clone anything. WYSIWYG::
+#
+#    sudo $bindir/build_debs.sh ./release /srv/debian-base $vers
+
+
+releasedir="./release"
+pbuilddir="/srv/debian-base"
+cephver=$vers
+
+start_time=`date`
+echo version $cephver
+
+whoami=`whoami`
+[ "$whoami" != "root" ] && echo "must run as root not $whoami" && usage && exit 1
+
+[ -z "$dists" ] && dists=`cat $releasedir/$cephver/debian_dists`
+dvers=`cat $releasedir/$cephver/debian_version`
+echo deb vers $dvers
+echo dists $dists
+
+for dist in $dists
+do
+    pbuilder --clean
+
+    bpvers=`$bindir/gen_debian_version.sh $dvers $dist`
+    echo deb vers $bpvers
+
+    echo building debs for $dist
+    if [ `dpkg-architecture -qDEB_BUILD_ARCH` = "i386" ] ; then
+        #  Architecture dependent, independent and source
+        pbuilder build \
+            --distribution $dist \
+            --basetgz $pbuilddir/$dist.tgz \
+            --buildresult $releasedir/$cephver \
+            --debbuildopts "-j`grep -c processor /proc/cpuinfo`" \
+            $releasedir/$cephver/ceph_$bpvers.dsc
+    else
+        #  Binary only architecture dependent
+        pbuilder build \
+            --binary-arch \
+            --distribution $dist \
+            --basetgz $pbuilddir/$dist.tgz \
+            --buildresult $releasedir/$cephver \
+            --debbuildopts "-j`grep -c processor /proc/cpuinfo`" \
+            $releasedir/$cephver/ceph_$bpvers.dsc
+    fi
+
+done
+
+# do lintian checks
+for dist in $dists
+do
+    bpvers=`$bindir/gen_debian_version.sh $dvers $dist`
+    echo lintian checks for $bpvers
+    echo lintian --allow-root $releasedir/$cephver/*$bpvers*.deb
+done
+
+echo "Start Time = $start_time"
+echo "  End Time = $(date)"
+
 
 #Collect Artifacts
 mkdir -p dist/debian