This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Update Ganglia RPM build process to work with updates in the main Cro…

…wbar repository
  • Loading branch information...
1 parent 1d7878e commit d021bbff38159f24df87ac3774d07377104bb5ba @VictorLowther VictorLowther committed Jan 13, 2012
Showing with 24 additions and 5 deletions.
  1. +18 −5 build.sh
  2. +6 −0 build_in_chroot.sh
View
@@ -1,6 +1,19 @@
#!/bin/bash
-mkdir -p /usr/src/redhat/SOURCES && cd /usr/src/redhat/SOURCES
-rpm2cpio /mnt/current_os/pkgs/ganglia-3.1.7-3.fc15.src.rpm | cpio -id
-rpmbuild -bb ganglia.spec
-cd /usr/src/redhat/RPMS
-find . -type f -name '*.rpm' -exec cp '{}' /mnt/current_os/pkgs ';'
+GANGLIA_RPMS=(ganglia-gmetad-3.1.7-3.x86_64.rpm \
+ ganglia-gmond-3.1.7-3.x86_64.rpm \
+ ganglia-gmond-python-3.1.7-3.x86_64.rpm \
+ ganglia-3.1.7-3.x86_64.rpm \
+ ganglia-web-3.1.7-3.x86_64.rpm)
+
+bc_needs_build() {
+ for pkg in ${GANGLIA_RPMS[@]}; do
+ [[ -f $BC_CACHE/$OS_TOKEN/pkgs/$pkg ]] && continue
+ return 0
+ done
+ return 1
+}
+
+bc_build() {
+ sudo cp "$BC_DIR/build_in_chroot.sh" "$CHROOT/tmp"
+ in_chroot /tmp/build_in_chroot.sh
+}
View
@@ -0,0 +1,6 @@
+#!/bin/bash
+mkdir -p /usr/src/redhat/SOURCES && cd /usr/src/redhat/SOURCES
+rpm2cpio /mnt/current_os/pkgs/ganglia-3.1.7-3.fc15.src.rpm | cpio -id
+rpmbuild -bb ganglia.spec
+cd /usr/src/redhat/RPMS
+find . -type f -name '*.rpm' -exec cp '{}' /mnt/current_os/pkgs ';'

0 comments on commit d021bbf

Please sign in to comment.