summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/dbg_mkrpm48
-rwxr-xr-xscripts/dbg_mkrpm.old30
-rwxr-xr-xscripts/dbg_rpminst2
-rwxr-xr-xscripts/dbg_rpmuninst2
4 files changed, 65 insertions, 17 deletions
diff --git a/scripts/dbg_mkrpm b/scripts/dbg_mkrpm
index c55805cf..0149b215 100755
--- a/scripts/dbg_mkrpm
+++ b/scripts/dbg_mkrpm
@@ -1,30 +1,48 @@
#!/bin/sh
-test -f abrt.spec || exit 1
-ABRTVER=`grep ^Version: abrt.spec | head -n1 | sed 's/.* //'`
+#set -e
-if ! test -f configure; then
+#git clone git://git.fedorahosted.org/git/abrt.git
+#SRCDIR="abrt"
+#BUILDDIR="abrt"
+
+SRCDIR="."
+BUILDDIR="../`basename "$PWD"`.builddir"
+
+if ! test -f "$SRCDIR/configure"; then
echo "Autogenerating configure"
- ./autogen.sh || { rm -f configure; exit 1; }
+ (cd "$SRCDIR" && ./autogen.sh) || { rm -f "$SRCDIR/configure"; exit 1; }
fi
+test -f "$SRCDIR/abrt.spec" || exit 1
+ABRTVER=`grep ^Version: "$SRCDIR/abrt.spec" | head -n1 | sed 's/.* //'`
-T=/tmp/$$_$RANDOM
-test -d "$T" && exit 1
+rm -rf "$BUILDDIR"
+mkdir "$BUILDDIR" 2>/dev/null
-rm -rf BUILDROOT "abrt-$ABRTVER" "abrt-$ABRTVER".tar "abrt-$ABRTVER".tar.gz \
- abrt*.rpm libreport*.rpm \
- 2>/dev/null
+cp -a "$SRCDIR" "$BUILDDIR"/abrt-$ABRTVER
-mkdir -p "$T"/"abrt-$ABRTVER" || exit
-cp -a * "$T"/"abrt-$ABRTVER" || exit
-(cd "$T" && tar -c "abrt-$ABRTVER") >"abrt-$ABRTVER".tar || exit
-rm -rf "$T" || exit
+cd "$BUILDDIR" || exit 1
-gzip "abrt-$ABRTVER".tar || exit
+tar -czf abrt-$ABRTVER.tar.gz abrt-$ABRTVER
+cp abrt-$ABRTVER/abrt.spec .
+cp abrt-$ABRTVER/abrt.init .
+cp abrt-$ABRTVER/abrt-ccpp.init .
+#cp abrt-$ABRTVER/dbg_* .
+rm -rf abrt-$ABRTVER
# Less ugly way to pass exitcode (without bashisms)?
-{ nice -n10 ./dbg_rpmbuildlocal -bb abrt.spec 2>&1; echo $? >"EXITCODE"; } | tee -a "$0.log"
+{ nice -n10 rpmbuild \
+ --define "_topdir $PWD" \
+ --define "_builddir $PWD" \
+ --define "_rpmdir $PWD" \
+ --define "_sourcedir $PWD" \
+ --define "_specdir $PWD" \
+ --define "_srcrpmdir $PWD" \
+ --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
+ -bb abrt.spec 2>&1
+echo $? >"EXITCODE"
+} | tee -a "$0.log"
ret=`cat EXITCODE`
rm EXITCODE
exit "$ret"
diff --git a/scripts/dbg_mkrpm.old b/scripts/dbg_mkrpm.old
new file mode 100755
index 00000000..c55805cf
--- /dev/null
+++ b/scripts/dbg_mkrpm.old
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+test -f abrt.spec || exit 1
+ABRTVER=`grep ^Version: abrt.spec | head -n1 | sed 's/.* //'`
+
+if ! test -f configure; then
+ echo "Autogenerating configure"
+ ./autogen.sh || { rm -f configure; exit 1; }
+fi
+
+
+T=/tmp/$$_$RANDOM
+test -d "$T" && exit 1
+
+rm -rf BUILDROOT "abrt-$ABRTVER" "abrt-$ABRTVER".tar "abrt-$ABRTVER".tar.gz \
+ abrt*.rpm libreport*.rpm \
+ 2>/dev/null
+
+mkdir -p "$T"/"abrt-$ABRTVER" || exit
+cp -a * "$T"/"abrt-$ABRTVER" || exit
+(cd "$T" && tar -c "abrt-$ABRTVER") >"abrt-$ABRTVER".tar || exit
+rm -rf "$T" || exit
+
+gzip "abrt-$ABRTVER".tar || exit
+
+# Less ugly way to pass exitcode (without bashisms)?
+{ nice -n10 ./dbg_rpmbuildlocal -bb abrt.spec 2>&1; echo $? >"EXITCODE"; } | tee -a "$0.log"
+ret=`cat EXITCODE`
+rm EXITCODE
+exit "$ret"
diff --git a/scripts/dbg_rpminst b/scripts/dbg_rpminst
index b255c552..f8749c91 100755
--- a/scripts/dbg_rpminst
+++ b/scripts/dbg_rpminst
@@ -1,5 +1,5 @@
#!/bin/sh
-yum -y -C erase 'abrt*' 'libreport*'
+yum -y -C erase 'abrt*' 'libreport*' 'report*'
yum -y -C --nogpgcheck localinstall *.rpm
killall -HUP dbus-daemon
diff --git a/scripts/dbg_rpmuninst b/scripts/dbg_rpmuninst
index ff777b50..0635116a 100755
--- a/scripts/dbg_rpmuninst
+++ b/scripts/dbg_rpmuninst
@@ -1,3 +1,3 @@
#!/bin/sh
-yum -C -y erase 'abrt*' 'libreport*'
+yum -C -y erase 'abrt*' 'libreport*' 'report*'