Mailinglist Archive: opensuse-commit (849 mails)

< Previous Next >
commit susedoc-buildbook for openSUSE:Factory

Hello community,

here is the log from the commit of package susedoc-buildbook for
openSUSE:Factory
checked in at Wed Mar 9 10:27:49 CET 2011.



--------
--- susedoc-buildbook/susedoc-buildbook.changes 2010-11-09 16:51:06.000000000
+0100
+++ /mounts/work_src_done/STABLE/susedoc-buildbook/susedoc-buildbook.changes
2011-03-09 08:00:11.000000000 +0100
@@ -1,0 +2,9 @@
+Wed Mar 9 07:59:21 CET 2011 - ke@xxxxxxx
+
+- 0.20:
+* buildbook.sh: For susemanager, make local PDF files available to the
+ Web UI (bnc#676666).
+* buildbook.sh: bugfixes (replace hard-coded api server name; fix quoting).
+* buildbook.sh: allow skipping updating .changes.
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
susedoc-buildbook-0.19.tar.bz2

New:
----
susedoc-buildbook-0.20.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ susedoc-buildbook.spec ++++++
--- /var/tmp/diff_new_pack.QFsIKm/_old 2011-03-09 10:27:23.000000000 +0100
+++ /var/tmp/diff_new_pack.QFsIKm/_new 2011-03-09 10:27:23.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package susedoc-buildbook (Version 0.19)
+# spec file for package susedoc-buildbook
#
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,7 @@
Group: Documentation/SUSE
AutoReqProv: on
Summary: susedoc Book Build Script
-Version: 0.19
+Version: 0.20
Release: 1
Source: %{name}-%{version}.tar.bz2
Url:
https://svn.berlios.de/svnroot/repos/opensuse-doc/trunk/susedoc-buildbook

++++++ susedoc-buildbook-0.19.tar.bz2 -> susedoc-buildbook-0.20.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/susedoc-buildbook-0.19/NEWS
new/susedoc-buildbook-0.20/NEWS
--- old/susedoc-buildbook-0.19/NEWS 2010-11-09 16:36:43.000000000 +0100
+++ new/susedoc-buildbook-0.20/NEWS 2011-03-09 07:53:38.000000000 +0100
@@ -1,3 +1,9 @@
+0.20:
+* buildbook.sh: For susemanager, make local PDF files available to the
+ Web UI (bnc#676666).
+* buildbook.sh: bugfixes (replace hard-coded api server name; fix quoting).
+* buildbook.sh: allow skipping updating .changes.
+
0.19:
* fix one of the submitreq commands.

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/susedoc-buildbook-0.19/book.spec.in
new/susedoc-buildbook-0.20/book.spec.in
--- old/susedoc-buildbook-0.19/book.spec.in 2010-11-03 14:03:57.000000000
+0100
+++ new/susedoc-buildbook-0.20/book.spec.in 2010-12-29 14:45:25.000000000
+0100
@@ -168,8 +168,9 @@
popd
else
mkdir -p $RPM_BUILD_ROOT%{_datadir}/help/LOCALE/%{my_lang}
+ declare -l llang=%{my_lang}
for f in yelp/*.document; do
- file=$(echo $f | tr [:upper:] [:lower:])
+ file=$(echo $f | tr [:upper:] [:lower:] | sed "s/$llang/%{my_lang}/")
cp $f $RPM_BUILD_ROOT%{_datadir}/help/LOCALE/%{my_lang}/${file#*/}
done
sed "s/Documentation *\(Documentation\)/\1/" %{name}.document \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/susedoc-buildbook-0.19/buildbook.sh
new/susedoc-buildbook-0.20/buildbook.sh
--- old/susedoc-buildbook-0.19/buildbook.sh 2010-11-09 08:51:09.000000000
+0100
+++ new/susedoc-buildbook-0.20/buildbook.sh 2011-03-09 07:53:06.000000000
+0100
@@ -1,7 +1,7 @@
#!/bin/bash

TEMP=$(getopt -o acf:e:d:il:n:p:r:s:u:x \
- --long
automatic,check-pack,copy,copypac,copypack,debug,def:,extdir:,init,initpac,initpack,lang:,prep-local,name:,obsuser:,product:,pdf:,spec:,user:
\
+ --long
automatic,check-pack,copy,copypac,copypack,debug,def:,extdir:,init,initpac,initpack,lang:,prep-local,name:,obsuser:,product:,pdf:,skip-changes-update,spec:,user:
\
-n "$0" -- "$@")
# Note the quotes around `$TEMP': they are essential!
eval set -- "$TEMP"
@@ -15,7 +15,7 @@
}

check_bin () {
- which $1 2>/dev/null || {
+ which $1 >/dev/null || {
echo "*** $1 is not executable"
case $1 in
xml)
@@ -38,18 +38,19 @@
-e|--extdir) packdir=$2 ; extdir=true ; check_dir $packdir; shift 2 ;;
-f) from_api_server=$2; shift 2 ;;
-i|--init|--initpac|--initpack) make_type=init; shift 1;;
- -l|--lang) LL=$2 ; shift 2 ;;
+ -l|--lang) ll=$2 ; shift 2 ;;
-p|--pdf) pdf=$2 ; check_file $pdf; shift 2 ;;
--prep-local) prep_local=yes ; shift 1 ;;
-r) from_repo=$2; shift 2 ;;
-s|--spec) spec_in=$2; shift 2 ;;
-n|--name|--product) product=$2 ; shift 2 ;;
-u|--user|--obsuser) obsuser=$2 ; shift 2;;
+ --skip-changes-update) skip_changes=yes; shift 1 ;;
-x|--debug) set -x; shift 1 ;;
--) shift ; break ;;
esac
done
-echo $extdir
+#echo $extdir
# you never know...
unset DRAFT

@@ -105,14 +106,22 @@
}
fi

-if [ -z "$LL" ]; then
+if [ -z "$ll" ]; then
# find first first ENV and source it
- . ENV-$(grep -v ^# $product_file | awk '{print $2;exit}')
- LL=$(make VARIABLE=LL showvariable)
- [ -z "$LL" ] && { echo "source ENV-* first"; exit 1; }
+ . ENV-$(awk '/^#/ {next}; {print $2; exit}' $product_file)
+ ll=$(make VARIABLE=LL showvariable)
+ [ -z "$ll" ] && { echo "source ENV-* first"; exit 1; }
# this is not reliable enough...
- # LL=$(basename $(pwd))
+ # ll=$(basename $(pwd))
fi
+
+lang=${ll%_*}
+[ $lang = $ll ] && LL=$ll || {
+ declare -u CC=${ll#*_}
+ LL=${lang}_$CC
+ # echo $LL
+}
+
# product=opensuse-manual
#product=$2
package=${product}_$LL
@@ -166,6 +175,13 @@
Source$n$l: ${BOOK}_$LL-pdf-yelp.tar.bz2" $spec
sed -i "/^#PDFPREP/i\\
tar xvf %{S:$n$((l++))}" $spec
+ case ${BOOK} in
+ susemanager-jsp) : ;;
+ susemanager-*) sed -i "/^#SOURCES/i\\
+Source$n$l: ${BOOK}.index.jsp" $spec
+ ;;
+ esac
+

# if [ -f autobuild/${BOOK}_$LL-graphics.tar.bz2 ]; then \
# sed -i 's/^#\(Source.*graphics.tar.bz2\)/\1/' $spec
@@ -184,11 +200,18 @@
book=$(echo $BOOK | tr [[:upper:]] [[:lower:]])
sed -i "/^#PDFSUB/i\\
\%package -n ${book}_$LL-pdf\\
-Group: Documentation/SuSE\\
+Group: Documentation/SUSE\\
License: -\\
Summary: -\\
#Provides: locale(desktop-data-openSUSE:$LL)\\
###PDFOBS" $spec
+ case ${BOOK} in
+ susemanager-jsp) : ;;
+ susemanager-*) sed -i "/^#PDFSUB/i\\
+PreReq: susemanager-jsp_en" $spec
+ ;;
+ esac
+
### hack slepos 11 sp1 FIXME
if [ $product = slepos-guide ]; then
sed -i "s/^###PDFOBS/#PDFOBS/" $spec
@@ -226,8 +249,23 @@
sed -i "/^#PDFINST/i\\
cp \%{S:$n$pdf_no} . \\
mkdir $3 \\
-\\
" $spec
+ case ${BOOK} in
+ susemanager-jsp) : ;;
+ susemanager-*) sed -i "/^#PDFINST/i\\
+sub_dir=\${RPM_BUILD_ROOT}/var/lib/tomcat6/webapps/rhn/help/${book#susemanager-}\\
+subpdf_dir=\$sub_dir/en-US/pdf\\
+mkdir -p \$subpdf_dir\\
+cp %{S:$n$l} \$sub_dir/index.jsp\\
+pushd \$subpdf_dir\\
+pkgpdf_dir=usr/share/doc/manual/${book}_${LL}-pdf\\
+mkdir -p \${RPM_BUILD_ROOT}/\$pkgpdf_dir\\
+echo 'to be replaced' > \${RPM_BUILD_ROOT}/\$pkgpdf_dir/${book}_${LL}.pdf\\
+ln -sf ../../../../../../../../../\$pkgpdf_dir/${book}_${LL}.pdf\\
+# rm \$pkgpdf_dir/${book}_${LL}.pdf\\
+popd" $spec
+ ;;
+ esac

sed -i "/^#PDFFILES/i\\
\%files -n ${book}_$LL-pdf\\
@@ -238,9 +276,22 @@
\%dir %{_datadir}/kde4/apps/khelpcenter\\
\%dir %{_datadir}/kde4/apps\\
\%dir %{_datadir}/kde4\\
-\%{_datadir}/kde4/apps/khelpcenter/plugins/${book}_$LL-pdf.desktop\\
-\\
-" $spec
+\%{_datadir}/kde4/apps/khelpcenter/plugins/${book}_$LL-pdf.desktop" $spec
+ case ${BOOK} in
+ susemanager-jsp) : ;;
+ susemanager-*) sed -i "/^#PDFFILES/i\\
+# dir with link to the PDF\\
+\%dir /var/lib/tomcat6\\
+\%dir /var/lib/tomcat6/webapps\\
+\%dir /var/lib/tomcat6/webapps/rhn\\
+\%dir /var/lib/tomcat6/webapps/rhn/help\\
+\%dir /var/lib/tomcat6/webapps/rhn/help/${book#susemanager-}\\
+\%dir /var/lib/tomcat6/webapps/rhn/help/${book#susemanager-}/en-US\\
+/var/lib/tomcat6/webapps/rhn/help/${book#susemanager-}/index.jsp\\
+/var/lib/tomcat6/webapps/rhn/help/${book#susemanager-}/en-US/pdf" $spec
+ ;;
+ esac
+
fi

if [ $format = pdfhtml ]; then
@@ -280,8 +331,12 @@
packdir=package-$1
fi

- cp -p $packdir/${1}_$LL-{html,graphics,desktop}.tar.bz2 \
- autobuild
+ cp -p $packdir/${1}_$ll-html.tar.bz2 \
+ autobuild/${1}_$LL-html.tar.bz2
+ cp -p $packdir/${1}_$ll-graphics.tar.bz2 \
+ autobuild/${1}_$LL-graphics.tar.bz2
+ cp -p $packdir/${1}_$ll-desktop.tar.bz2 \
+ autobuild/${1}_$LL-desktop.tar.bz2
sed -i "s:@BOOK@:$BOOK:" $spec
#HTML
sed -i "/^#SOURCES/i\\
@@ -303,9 +358,11 @@
%setup -D -T -q -a ${n}0 -a ${n}1" $spec
fi #HTML
#PDF starts
- cp -p $packdir/${1}_${LL}.tar.bz2 \
- $packdir/${1}_$LL.pdf \
- $packdir/${1}_$LL-pdf-yelp.tar.bz2 autobuild || {
+ {
+ cp -p $packdir/${1}_${ll}.tar.bz2 autobuild/${1}_${LL}.tar.bz2
+ cp -p $packdir/${1}_$ll.pdf autobuild/${1}_$LL.pdf
+ cp -p $packdir/${1}_$ll-pdf-yelp.tar.bz2
autobuild/${1}_$LL-pdf-yelp.tar.bz2
+ } || {
echo make package failed; exit 1
}
# in case we must build more than one book (desktop-qs)
@@ -330,8 +387,10 @@
$echo make package-pdf || exit 1
# $echo make pdf-color
# sources and graphics come with the HTML package
- cp -p package-pdf-$1/${1}_$LL.pdf \
- package-pdf-$1/${1}_$LL-pdf-yelp.tar.bz2 autobuild || {
+ {
+ cp -p package-pdf-$1/${1}_$ll.pdf autobuild/${1}_$LL.pdf
+ cp -p package-pdf-$1/${1}_$ll-pdf-yelp.tar.bz2
autobuild/${1}_$LL-pdf-yelp.tar.bz2
+ } || {
echo make package failed; exit 1
}
# Re-use existing PDF
@@ -417,9 +476,17 @@
if [ -z "$extdir" ]; then
# $echo make validate || exit 1
make_validate
- $echo make package-html || exit 1
- cp -p package-html-$1/${1}_$LL-{graphics,html,desktop}.tar.bz2 \
- package-html-$1/${1}_$LL.tar.bz2 autobuild
+ $echo make package-html || {
+ # try again; sometimes, index.html does not get written...
+ $echo make package-html || exit 1
+ }
+ cp -p package-html-$1/${1}_$ll-graphics.tar.bz2 \
+ autobuild/${1}_$LL-graphics.tar.bz2
+ cp -p package-html-$1/${1}_$ll-html.tar.bz2 \
+ autobuild/${1}_$LL-html.tar.bz2
+ cp -p package-html-$1/${1}_$ll-desktop.tar.bz2 \
+ autobuild/${1}_$LL-desktop.tar.bz2
+ cp -p package-html-$1/${1}_$ll.tar.bz2 autobuild/${1}_$LL.tar.bz2
else
cp -p $packdir/${1}_$LL-{html,graphics,desktop}.tar.bz2 \
$packdir/${1}_$LL.tar.bz2 autobuild
@@ -430,7 +497,7 @@
Source$2$((l++)): ${BOOK}_$LL-desktop.tar.bz2\\
#Source$2$((l++)): ${BOOK}_$LL-graphics.tar.bz2\\
Source$2$((l++)): ${BOOK}_$LL.tar.bz2" $spec
- if [ -f autobuild/${BOOK}_$LL-graphics.tar.bz2 ]; then \
+ if [ -f autobuild/${BOOK}_$LL-graphics.tar.bz2 ]; then
sed -i 's/^#\(Source.*graphics.tar.bz2\)/\1/' $spec
fi
# ${no}0 == html files
@@ -616,8 +683,25 @@
cd $wdir # home:$obsuser:branches:$repo/$package
sed -i s:update_spec.pl:/usr/bin/update_spec: doc_pre_checkin.sh
bash ./doc_pre_checkin.sh
+ case ${BOOK} in
+ susemanager-jsp) : ;;
+ susemanager-*)
+ for index in $(grep \\.index.jsp susemanager-*spec | awk '{print $2}');
do
+ p=${index%.index.jsp}
+ pdf_filename=${p}_en.pdf
+ pdf_title=$(grep summary.${p}_en-pdf attributes \
+ | sed 's/[^ ]*//;s/ \(.*\) (.*)/\1/')
+ sed "\
+s/@BOOKTITLE@/$pdf_title/g
+s/@bookfile_pdf@/$pdf_filename/g" ${0%/*}/sm-index.jsp.in > ${index}
+ done
+ ;;
+ esac
+
default_msg="Update text and image files"
- osc vc -m"$default_msg."
+ if [ -n "$skip_changes" ]; then
+ osc vc -m"$default_msg."
+ fi
osc addremove
osc ci -m"$package: $default_msg"
}
@@ -643,10 +727,11 @@
osc -A $sr_server rdelete home:$obsuser:tmp $package
osc -A $sr_server meta prj home:$obsuser:tmp \
|| echo $tmp_project_values \
- | osc -A https://api.suse.de meta prj home:$obsuser:tmp -F -
+ | osc -A $sr_server meta prj home:$obsuser:tmp -F -
osc -A $from_api_server copypac \
-t $sr_server $from_repo $package home:$obsuser:tmp
wdir=home:$obsuser:tmp/$package
+ osc -A $sr_server co $wdir
fix_spec_and_copy_autobuild

echo "osc -A $sr_server sr -m\"$default_msg\" home:$obsuser $package
$sr_repo"
@@ -656,10 +741,10 @@
osc -A $sr_server rdelete home:$obsuser:tmp $package
osc -A $sr_server meta prj home:$obsuser:tmp \
|| echo $tmp_project_values \
- | osc -A https://api.suse.de meta prj home:$obsuser:tmp -F -
+ | osc -A $sr_server meta prj home:$obsuser:tmp -F -
osc -A $sr_server meta pkg home:$obsuser:tmp $package \
|| echo $tmp_package_values \
- | osc -A https://api.suse.de meta pkg home:$obsuser:tmp $package -F -
+ | osc -A $sr_server meta pkg home:$obsuser:tmp $package -F -
wdir=home:$obsuser:tmp/$package
osc -A $sr_server co $wdir
cp /usr/share/susedoc-buildbook/doc_pre_checkin.sh \
@@ -722,11 +807,25 @@

if [ -n "$devel" -a "$userp" = true ]; then
# submitreq to product
- $my_echo "osc -A $sr_server sr -m\"$default_msg\" $repo $package $sr_repo"
+ if [ -z "$my_echo" ]; then
+ osc -A $sr_server sr -m"$default_msg" $repo $package $sr_repo
+ else
+ $my_echo "osc -A $sr_server sr -m\"$default_msg\" $repo $package
$sr_repo"
+ fi
elif [ -n "$devel" -a "$userp" = false ]; then
- $my_echo "osc -A $sr_server sr -m\"$default_msg\"
home:$obsuser:branches:$repo $package $devel"
+ if [ -z "$my_echo" ]; then
+ osc -A $sr_server sr -m\"$default_msg\" \
+ home:$obsuser:branches:$repo $package $devel
+ else
+ $my_echo "osc -A $sr_server sr -m\"$default_msg\"
home:$obsuser:branches:$repo $package $devel"
+ fi
elif [ -z "$devel" -a "$userp" = false ]; then
- $my_echo "osc -A $sr_server sr -m\"$default_msg\"
home:$obsuser:branches:$repo $package $repo"
+ if [ -z "$my_echo" ]; then
+ osc -A $sr_server sr -m\"$default_msg\" \
+ home:$obsuser:branches:$repo $package $repo
+ else
+ $my_echo "osc -A $sr_server sr -m\"$default_msg\"
home:$obsuser:branches:$repo $package $repo"
+ fi
else
# $userp, but no $devel -- everything is fine
:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/susedoc-buildbook-0.19/configure
new/susedoc-buildbook-0.20/configure
--- old/susedoc-buildbook-0.19/configure 2010-11-09 16:47:39.000000000
+0100
+++ new/susedoc-buildbook-0.20/configure 2011-03-09 07:54:15.000000000
+0100
@@ -2121,7 +2121,7 @@

# Define the identity of the package.
PACKAGE=susedoc-buildbook
- VERSION=0.19
+ VERSION=0.20


cat >>confdefs.h <<_ACEOF
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/susedoc-buildbook-0.19/configure.ac
new/susedoc-buildbook-0.20/configure.ac
--- old/susedoc-buildbook-0.19/configure.ac 2010-11-09 16:38:02.000000000
+0100
+++ new/susedoc-buildbook-0.20/configure.ac 2011-03-09 07:51:04.000000000
+0100
@@ -1,4 +1,4 @@
AC_INIT([book.spec.in])
-AM_INIT_AUTOMAKE([susedoc-buildbook], [0.19])
+AM_INIT_AUTOMAKE([susedoc-buildbook], [0.20])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/susedoc-buildbook-0.19/update_spec.pl
new/susedoc-buildbook-0.20/update_spec.pl
--- old/susedoc-buildbook-0.19/update_spec.pl 2010-10-19 17:12:17.000000000
+0200
+++ new/susedoc-buildbook-0.20/update_spec.pl 2011-01-10 14:44:01.000000000
+0100
@@ -155,7 +155,7 @@

# FIXME: the above and below lists of tags should be dynamic, no?

- if (/^(Requires:\s*)(.*)$/) {
+ if (/^(Obsoletes:\s*)(.*)$/) {
flush_multi($pname, 'obsoletes');
}
if (/^(Provides:\s*)(.*)$/) {


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages