[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - bin/pack-debug

2017-02-01 Thread Andras Timar
 bin/pack-debug |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 695ea08058f022b7fecb1ac6ddbca13dba16f94d
Author: Andras Timar 
Date:   Thu Feb 2 00:03:05 2017 +0100

fix debug package of KDE integration

Change-Id: I5ce9711a910163b9ae3cd9c15d857f90d0f23ad3

diff --git a/bin/pack-debug b/bin/pack-debug
index 60df442..a1f4124 100755
--- a/bin/pack-debug
+++ b/bin/pack-debug
@@ -247,6 +247,7 @@ do
TARGET_NAME=$INSTALLDIRNAME"$(echo $(basename $i) | awk '
/epm_gid_Module_Optional_Gnome.lst/{print"basis5.1-gnome-integration"}
/epm_gid_Module_Optional_Grfflt.lst/{print"basis5.1-graphicfilter"}
+   /epm_gid_Module_Optional_Kde.lst/{print"basis5.1-kde-integration"}
/epm_gid_Module_Optional_OGLTrans.lst/{print"basis5.1-ogltrans"}

/epm_gid_Module_Optional_PostgresqlSdbc.lst/{print"basis5.1-postgresql-sdbc"}
/epm_gid_Module_Pdfimport.lst/{print"basis5.1-extension-pdf-import"}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - bin/pack-debug

2017-01-12 Thread Andras Timar
 bin/pack-debug |1 +
 1 file changed, 1 insertion(+)

New commits:
commit b88bf43749b859506a97bdab7d3b62687400f5c9
Author: Andras Timar 
Date:   Thu Jan 12 11:54:44 2017 +0100

fix debug package of report builder

Change-Id: I331dfa58fb05c08423d7d8dd00cd799238338858

diff --git a/bin/pack-debug b/bin/pack-debug
index 4003049..60df442 100755
--- a/bin/pack-debug
+++ b/bin/pack-debug
@@ -256,6 +256,7 @@ do
/epm_gid_Module_Prg_Math_Bin.lst/{print"basis5.1-math"}
/epm_gid_Module_Prg_Wrt_Bin.lst/{print"basis5.1-writer"}
/epm_gid_Module_Pyuno.lst/{print"basis5.1-pyuno"}
+   
/epm_gid_Module_Reportbuilder.lst/{print"basis5.1-extension-report-builder"}
/epm_gid_Module_Root_Brand.lst/{print"5.1"}
/epm_gid_Module_Root.lst/{print"basis5.1-core"}
/epm_gid_Module_Root_Ure_Hidden.lst/{print"5.1-ure"}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - bin/pack-debug

2016-12-21 Thread László Németh
 bin/pack-debug |   71 +
 1 file changed, 37 insertions(+), 34 deletions(-)

New commits:
commit 0c2fda63a5713eda002f963d033841f15fca0f62
Author: László Németh 
Date:   Wed Dec 21 10:33:53 2016 +0100

clean up pack-debug script

- separate debug download tar.gz
- log output in pack-debug.log
- remove temporary files and directories

Change-Id: I1d06f48ebf78764c488d15f1d160947599d0e125

diff --git a/bin/pack-debug b/bin/pack-debug
index a3ac2b0..4003049 100755
--- a/bin/pack-debug
+++ b/bin/pack-debug
@@ -11,6 +11,7 @@
 
 # build path
 export BUILD_PATH=$PWD
+export BUILD_LOG=$BUILD_PATH/pack-debug.log
 
 if [ $# -gt 0 ]
 then
@@ -30,14 +31,15 @@ if [ ! -f config.log ]; then
 exit 1;
 fi
 
+# create pack-debug.log file
+echo create debug packages >$BUILD_LOG
+
 eval $(grep ^INSTALLDIRNAME config.log)
 eval $(grep ^PRODUCTVERSION config.log)
 
 # set package base name, eg. collaboraoffice5.1
 DEBUGSRC_PACKAGENAME=$INSTALLDIRNAME$PRODUCTVERSION
 
-echo PACKAGENAME: $DEBUGSRC_PACKAGENAME
-
 #
 # Function for re-build RPM files
 #
@@ -50,14 +52,12 @@ export PLATFORMID
 eval $(grep ^build_cpu config.log)
 export build_cpu
 
-#
-# create source package
-#
+
+echo create RPM debug source package
+
 
 DEBUGSRC="$(find workdir -name ${DEBUGSRC_PACKAGENAME}.spec.log)"
 
-echo Base spec file: $DEBUGSRC
-
 # create spec file, based on the spec file of the brand package
 
 cat $DEBUGSRC | awk '
@@ -94,9 +94,7 @@ cat $DEBUGSRC | awk '
print $0
}' >> ${DEBUGSRC}-debugsource
 
- echo Spec file of debug source package: ${DEBUGSRC}-debugsource
-
- echo Start rpmbuild for debug source package...
+ # start rpmbuild for debug source package
 
  ln -s / $buildroot
 
@@ -104,10 +102,9 @@ cat $DEBUGSRC | awk '
 
  rpmbuild -bb --define "_unpackaged_files_terminate_build  0" 
${DEBUGSRC}-debugsource --target $build_cpu --buildroot=$buildroot
 
-#
-# create rpm debug info packages
-# by processing logged spec files
-#
+###
+echo create rpm debug info packages by processing logged spec files
+###
 
 for i in 
$BUILD_PATH/workdir/installation/CollaboraOffice/rpm/logging/*/*.spec.log
 do
@@ -121,7 +118,6 @@ do
buildroot=$(cat $i | awk '/^BuildRoot/{print$2}')
topdir=$(dirname $(dirname $buildroot))
rpmdir=$(echo $topdir | sed 's/_inprogress$//')
-   echo $rpmdir
 
# create empty buildroot directory
 
@@ -145,7 +141,7 @@ do
objcopy --only-keep-debug $so $so.dbg
objcopy --strip-debug $so
objcopy --add-gnu-debuglink=$so.dbg $so
-   cd -
+   cd $buildroot
done
 
# copy files for double package generation (using hard links)
@@ -180,8 +176,13 @@ echo Update RPM download tar.gz
 mv $topdir/RPMS/RPMS/*/*.rpm $rpmdir/RPMS/
 cd $rpmdir/..
 TARGET_RPM=$(ls *_download/*.tar.gz)
-tar cv *_rpm | gzip >$TARGET_RPM
+TARGET_DEBUG=$(echo $TARGET_RPM | sed 's/.tar.gz$/-debug.tar.gz/')
+SOURCE_RPM=$(find *_rpm -type f | grep -v debug)
+SOURCE_DEBUG=$(find *_rpm -type f | grep -E '(debug|readme|README)')
+tar c $SOURCE_RPM | gzip >$TARGET_RPM
+tar c $SOURCE_DEBUG | gzip >$TARGET_DEBUG
 cd $BUILD_PATH
+rm -rf $topdir
 }
 
 #
@@ -189,9 +190,9 @@ cd $BUILD_PATH
 #
 function repack_deb {
 
-#
-# create deb source package
-#
+
+echo create DEB debug source package
+
 
 
DEBUGSRC=$BUILD_PATH/workdir/installation/CollaboraOffice/deb/listfile/en-US/epm_gid_Module_Root_Brand.lst
 
@@ -231,10 +232,9 @@ cat $DEBUGSRC | awk '
 
  $BUILD_PATH/workdir/UnpackedTarball/epm/epm -f deb -g 
${INSTALLDIRNAME}${PRODUCTVERSION}-debugsource ${DEBUGSRC}-debugsource 
--output-dir DEBS -v
 
-
-# create deb debug info packages
-# by processing logged EPM lst files
-
+##
+echo create DEB debug info packages by processing logged EPM lst files
+##
 
 for i in 
$BUILD_PATH/workdir/installation/CollaboraOffice/deb/listfile/en-US/*.lst
 do
@@ -268,12 +268,14 @@ do
do
cd $(dirname $j)
so=$(basename $j)
+   # remove old temporary files
+   rm -f 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - bin/pack-debug

2016-12-20 Thread László Németh
 bin/pack-debug |   20 
 1 file changed, 16 insertions(+), 4 deletions(-)

New commits:
commit 157cae20a42780c7cdfcfdc8c925baabf82b6f51
Author: László Németh 
Date:   Tue Dec 20 13:19:08 2016 +0100

pack-debug: add --only-rpm and --only-deb options

Change-Id: Ib4b7214d3bcea145609818ff036376d6932f5610

diff --git a/bin/pack-debug b/bin/pack-debug
index fe02304..a3ac2b0 100755
--- a/bin/pack-debug
+++ b/bin/pack-debug
@@ -12,6 +12,18 @@
 # build path
 export BUILD_PATH=$PWD
 
+if [ $# -gt 0 ]
+then
+ for i in "$@"
+ do
+  case $i in
+--only-rpm) ONLY_RPM=1;;
+--only-deb) ONLY_DEB=1;;
+*) echo "Usage: pack-debug [--only-rpm | --only-deb]" && exit 1;;
+  esac
+ done
+fi
+
 # set install dirname and product version
 if [ ! -f config.log ]; then
 echo "config.log not found. Run this script from build root."
@@ -308,12 +320,12 @@ cd $BUILD_PATH
 }
 
 # start deb re-build
-test "$(find workdir/installation/CollaboraOffice/deb/listfile -name '*.lst')" 
!= "" && repack_deb || \
-   echo 'Missing EPM lst files. Skip DEB debug package generation.'
+test -z "$ONLY_RPM" -a "$(find 
workdir/installation/CollaboraOffice/deb/listfile -name '*.lst')" != "" && 
repack_deb || \
+   echo 'Skip DEB debug package generation (--only-rpm or missing EPM lst 
files).'
 
 # start rpm re-build
-test "$(find workdir -name '*spec.log')" != "" && repack_rpm || \
-   echo 'Missing RPM spec files. Skip RPM debug package generation.'
+test -z "$ONLY_DEB" -a "$(find workdir -name '*spec.log')" != "" && repack_rpm 
|| \
+   echo 'Skip RPM debug package generation (--only-deb or missing RPM spec 
files).'
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - bin/pack-debug

2016-12-20 Thread László Németh
 bin/pack-debug |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9c288e423faded9390d57ebd0747c561f9735779
Author: László Németh 
Date:   Tue Dec 20 12:41:51 2016 +0100

pack-debug: restore current directory

Change-Id: I4c6558b7221623976cd0175d0fc33db5eff28b3a

diff --git a/bin/pack-debug b/bin/pack-debug
index 4d9f45f..fe02304 100755
--- a/bin/pack-debug
+++ b/bin/pack-debug
@@ -169,7 +169,7 @@ mv $topdir/RPMS/RPMS/*/*.rpm $rpmdir/RPMS/
 cd $rpmdir/..
 TARGET_RPM=$(ls *_download/*.tar.gz)
 tar cv *_rpm | gzip >$TARGET_RPM
-cd -
+cd $BUILD_PATH
 }
 
 #
@@ -304,7 +304,7 @@ mv $BUILD_PATH/DEBS/*.deb $debdir/DEBS/
 cd $debdir/..
 TARGET_DEB=$(ls *_download/*.tar.gz)
 tar cv *_deb | gzip >$TARGET_DEB
-cd -
+cd $BUILD_PATH
 }
 
 # start deb re-build
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - bin/pack-debug

2016-12-20 Thread László Németh
 bin/pack-debug |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 3e3c33862a19984730a2562151d53f1ba0840cb1
Author: László Németh 
Date:   Tue Dec 20 11:31:00 2016 +0100

restore original not stripped file

Change-Id: Iebea3947367572f42a1803e35e7c5b4b37d8cc31

diff --git a/bin/pack-debug b/bin/pack-debug
index 832afe8..4d9f45f 100755
--- a/bin/pack-debug
+++ b/bin/pack-debug
@@ -256,8 +256,8 @@ do
do
cd $(dirname $j)
so=$(basename $j)
-   # keep not stripped version
-   echo "$(file $so)" | grep -q 'not stripped' && cp $so $so.copy
+   # keep original file
+   cp $so $so.copy
objcopy --only-keep-debug $so $so.dbg
objcopy --strip-debug $so
objcopy --add-gnu-debuglink=$so.dbg $so
@@ -288,7 +288,8 @@ do
cd $(dirname $j)
so=$(basename $j)
rm $so.dbg
-   echo "$(file $so)" | grep -q 'not stripped' || mv $so.copy $so
+   # restore original file
+   mv -f $so.copy $so
cd -
done
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - bin/pack-debug

2016-12-19 Thread László Németh
 bin/pack-debug |   14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 345fa14e85e6e36ad0280f4e549c70f6b9af1a18
Author: László Németh 
Date:   Mon Dec 19 21:40:10 2016 +0100

pack-debug: update DEB download tar.gz

Change-Id: Iff9b6e08c690ae6b5bc03f1a9fb3bc27d6744db7

diff --git a/bin/pack-debug b/bin/pack-debug
index f1c5282..832afe8 100755
--- a/bin/pack-debug
+++ b/bin/pack-debug
@@ -163,10 +163,8 @@ do
  fi
 done
 
-echo Place of the debug and stripped rpm packages:
-echo $topdir/RPMS/RPMS/
+echo Update RPM download tar.gz
 
-echo Update download tar.gz
 mv $topdir/RPMS/RPMS/*/*.rpm $rpmdir/RPMS/
 cd $rpmdir/..
 TARGET_RPM=$(ls *_download/*.tar.gz)
@@ -298,8 +296,14 @@ do
  fi
 done
 
-echo Place of the debug and stripped deb packages:
-echo $BUILD_PATH/DEBS
+echo Update DEB download tar.gz
+
+debdir=$(ls -d 
$BUILD_PATH/workdir/installation/CollaboraOffice/deb/install/*_deb)
+mv $BUILD_PATH/DEBS/*.deb $debdir/DEBS/
+cd $debdir/..
+TARGET_DEB=$(ls *_download/*.tar.gz)
+tar cv *_deb | gzip >$TARGET_DEB
+cd -
 }
 
 # start deb re-build
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - bin/pack-debug

2016-12-19 Thread László Németh
 bin/pack-debug |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit d2fd633f35ad70ab8adcd8a0b54d2e991a56e475
Author: László Németh 
Date:   Mon Dec 19 16:48:19 2016 +0100

pack-debug: update download tar.gz (only rpm)

Change-Id: I150497eb1575a64bc2f6b2ea03a282d5a95ba200

diff --git a/bin/pack-debug b/bin/pack-debug
index b34e5b6..f1c5282 100755
--- a/bin/pack-debug
+++ b/bin/pack-debug
@@ -165,6 +165,13 @@ done
 
 echo Place of the debug and stripped rpm packages:
 echo $topdir/RPMS/RPMS/
+
+echo Update download tar.gz
+mv $topdir/RPMS/RPMS/*/*.rpm $rpmdir/RPMS/
+cd $rpmdir/..
+TARGET_RPM=$(ls *_download/*.tar.gz)
+tar cv *_rpm | gzip >$TARGET_RPM
+cd -
 }
 
 #
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - bin/pack-debug

2016-12-18 Thread Andras Timar
 bin/pack-debug |   25 +
 1 file changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 96e38033680d49175cec68f7d7a3a1607dd85fef
Author: Andras Timar 
Date:   Sun Dec 18 18:57:45 2016 +0100

license header, remove useless comments, usage hint

Change-Id: I33151ffb6b73e2c436da91f275b668e0cb9a31b7

diff --git a/bin/pack-debug b/bin/pack-debug
index 7219474..b34e5b6 100755
--- a/bin/pack-debug
+++ b/bin/pack-debug
@@ -1,18 +1,23 @@
-#!/bin/sh
-# create debuginfo and debugsource packages from LO rpm & deb files
-# (generated by using --enable-symbols)
+#!/bin/bash
+#
+# This file is part of the LibreOffice project.
 #
-# Usage:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
-# cd /opt/lo_installation_path
-# dbg_pkg
-# # or
-# # PACKAGENAME=collaboraoffice5.1 dbg_pkg # if building in a different path
+# create debuginfo and debugsource packages from LO rpm & deb files
+# (generated by using --enable-symbols)
 
 # build path
 export BUILD_PATH=$PWD
 
 # set install dirname and product version
+if [ ! -f config.log ]; then
+echo "config.log not found. Run this script from build root."
+exit 1;
+fi
+
 eval $(grep ^INSTALLDIRNAME config.log)
 eval $(grep ^PRODUCTVERSION config.log)
 
@@ -35,8 +40,6 @@ export build_cpu
 
 #
 # create source package
-# (use PACKAGENAME environmental variable
-# to find "$PACKAGENAME".spec.log)
 #
 
 DEBUGSRC="$(find workdir -name ${DEBUGSRC_PACKAGENAME}.spec.log)"
@@ -171,8 +174,6 @@ function repack_deb {
 
 #
 # create deb source package
-# (use PACKAGENAME environmental variable
-# to find "$PACKAGENAME".spec.log)
 #
 
 
DEBUGSRC=$BUILD_PATH/workdir/installation/CollaboraOffice/deb/listfile/en-US/epm_gid_Module_Root_Brand.lst
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - bin/pack-debug

2016-12-18 Thread Andras Timar
 bin/pack-debug |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 79d0065dd2a6da57ca52dcc5ef1e061776d74065
Author: Andras Timar 
Date:   Sun Dec 18 18:23:39 2016 +0100

workdir contains generated source files which we need in debugsource package

Change-Id: I7eec56ed76262a8211f2c5e0a84b9079f9ce78cc

diff --git a/bin/pack-debug b/bin/pack-debug
index 6270229..7219474 100755
--- a/bin/pack-debug
+++ b/bin/pack-debug
@@ -51,8 +51,8 @@ cat $DEBUGSRC | awk '
/^Brand module/ { print gensub("Brand module", "Source files", "");next 
}
/^%attr/ || /^Summary:/ { next }
{print}
-   END { 
-   print "%defattr(-,root,root)" 
+   END {
+   print "%defattr(-,root,root)"
}
  ' > ${DEBUGSRC}-debugsource
  buildroot=$(cat $DEBUGSRC-debugsource | awk '/^BuildRoot/{print$2}')
@@ -62,7 +62,7 @@ cat $DEBUGSRC | awk '
 
  # create source file list
 
- find $BUILD_PATH -name '*[.][hc]xx' -o -name '*[.][hc]' | grep -Ev 
'/(instdir|workdir|qa|DEBS)/' |
+ find $BUILD_PATH -name '*[.][hc]xx' -o -name '*[.][hc]' | grep -Ev 
'/(instdir|qa|DEBS)/' |
 
  # list all directories for complete rpm remove
 
@@ -190,7 +190,7 @@ cat $DEBUGSRC | awk '
 
  # create source file list
 
- find $BUILD_PATH -name '*[.][hc]xx' -o -name '*[.][hc]' | grep -Ev 
'/(instdir|workdir|qa|DEBS)/' |
+ find $BUILD_PATH -name '*[.][hc]xx' -o -name '*[.][hc]' | grep -Ev 
'/(instdir|qa|DEBS)/' |
 
  # list all directories
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - bin/pack-debug

2016-12-16 Thread László Németh
 bin/pack-debug |   28 +++-
 1 file changed, 7 insertions(+), 21 deletions(-)

New commits:
commit 22b9afc57831f2fbd6ddad8c4a166f9a02154888
Author: László Németh 
Date:   Fri Dec 16 19:11:34 2016 +0100

pack-debug: clean up

Change-Id: I046bd0546d2b9838e940c0cc3444a42a239175b7

diff --git a/bin/pack-debug b/bin/pack-debug
index f5a31ac..6270229 100755
--- a/bin/pack-debug
+++ b/bin/pack-debug
@@ -12,22 +12,15 @@
 # build path
 export BUILD_PATH=$PWD
 
-# set package base name, eg. collaboraoffice5.1
-# based on the actual directory, eg. /opt/collaboraoffice5.1,
-# or checking the PACKAGENAME environmental variable
-
-if [ -z "$PACKAGENAME" ]
-then
-DEBUGSRC_PACKAGENAME=$(basename $BUILD_PATH)
-else
-DEBUGSRC_PACKAGENAME=$PACKAGENAME
-fi
-echo PACKAGE NAME: $DEBUGSRC_PACKAGENAME
-
 # set install dirname and product version
 eval $(grep ^INSTALLDIRNAME config.log)
 eval $(grep ^PRODUCTVERSION config.log)
 
+# set package base name, eg. collaboraoffice5.1
+DEBUGSRC_PACKAGENAME=$INSTALLDIRNAME$PRODUCTVERSION
+
+echo PACKAGENAME: $DEBUGSRC_PACKAGENAME
+
 #
 # Function for re-build RPM files
 #
@@ -50,13 +43,6 @@ DEBUGSRC="$(find workdir -name 
${DEBUGSRC_PACKAGENAME}.spec.log)"
 
 echo Base spec file: $DEBUGSRC
 
-if [ -z "$DEBUGSRC" ]
-then
- echo "Missing ${DEBUGSRC_PACKAGENAME}.spec.log in workdir/, specify spec.log 
file name in PACKAGENAME"
- echo "For example: PACKAGENAME=collaboraoffice5.1 dbg_pkg"
- exit 1
-fi
-
 # create spec file, based on the spec file of the brand package
 
 cat $DEBUGSRC | awk '
@@ -76,7 +62,7 @@ cat $DEBUGSRC | awk '
 
  # create source file list
 
- find $BUILD_PATH -name '*[.][hc]xx' -o -name '*[.][hc]' | grep -Ev 
'/(workdir|qa|DEBS)/' | grep -E '/(source|inc)/' |
+ find $BUILD_PATH -name '*[.][hc]xx' -o -name '*[.][hc]' | grep -Ev 
'/(instdir|workdir|qa|DEBS)/' |
 
  # list all directories for complete rpm remove
 
@@ -204,7 +190,7 @@ cat $DEBUGSRC | awk '
 
  # create source file list
 
- find $BUILD_PATH -name '*[.][hc]xx' -o -name '*[.][hc]' | grep -Ev 
'/(workdir|qa|DEBS)/' | grep -E '/(source|inc)/' |
+ find $BUILD_PATH -name '*[.][hc]xx' -o -name '*[.][hc]' | grep -Ev 
'/(instdir|workdir|qa|DEBS)/' |
 
  # list all directories
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - bin/pack-debug

2016-12-15 Thread László Németh
 bin/pack-debug |  321 +
 1 file changed, 321 insertions(+)

New commits:
commit 0c19de75b26a4b0c9d6607496fc8867d1a0117a1
Author: László Németh 
Date:   Thu Dec 15 17:33:17 2016 +0100

script for generating debug packages

Change-Id: I89be53e5fea3b9928d960604d050db47383baae3

diff --git a/bin/pack-debug b/bin/pack-debug
new file mode 100755
index 000..f5a31ac
--- /dev/null
+++ b/bin/pack-debug
@@ -0,0 +1,321 @@
+#!/bin/sh
+# create debuginfo and debugsource packages from LO rpm & deb files
+# (generated by using --enable-symbols)
+#
+# Usage:
+#
+# cd /opt/lo_installation_path
+# dbg_pkg
+# # or
+# # PACKAGENAME=collaboraoffice5.1 dbg_pkg # if building in a different path
+
+# build path
+export BUILD_PATH=$PWD
+
+# set package base name, eg. collaboraoffice5.1
+# based on the actual directory, eg. /opt/collaboraoffice5.1,
+# or checking the PACKAGENAME environmental variable
+
+if [ -z "$PACKAGENAME" ]
+then
+DEBUGSRC_PACKAGENAME=$(basename $BUILD_PATH)
+else
+DEBUGSRC_PACKAGENAME=$PACKAGENAME
+fi
+echo PACKAGE NAME: $DEBUGSRC_PACKAGENAME
+
+# set install dirname and product version
+eval $(grep ^INSTALLDIRNAME config.log)
+eval $(grep ^PRODUCTVERSION config.log)
+
+#
+# Function for re-build RPM files
+#
+function repack_rpm {
+
+# set environment based on config.log
+# for find-requires-x11.sh used by rpm __find_requires
+eval $(grep ^PLATFORMID config.log)
+export PLATFORMID
+eval $(grep ^build_cpu config.log)
+export build_cpu
+
+#
+# create source package
+# (use PACKAGENAME environmental variable
+# to find "$PACKAGENAME".spec.log)
+#
+
+DEBUGSRC="$(find workdir -name ${DEBUGSRC_PACKAGENAME}.spec.log)"
+
+echo Base spec file: $DEBUGSRC
+
+if [ -z "$DEBUGSRC" ]
+then
+ echo "Missing ${DEBUGSRC_PACKAGENAME}.spec.log in workdir/, specify spec.log 
file name in PACKAGENAME"
+ echo "For example: PACKAGENAME=collaboraoffice5.1 dbg_pkg"
+ exit 1
+fi
+
+# create spec file, based on the spec file of the brand package
+
+cat $DEBUGSRC | awk '
+   /^Name:/ { print "Summary: Debug source for package "$2; print 
$0"-debugsource";next }
+   /^Group:/ { print $1" Development/Debug";next }
+   /^Brand module/ { print gensub("Brand module", "Source files", "");next 
}
+   /^%attr/ || /^Summary:/ { next }
+   {print}
+   END { 
+   print "%defattr(-,root,root)" 
+   }
+ ' > ${DEBUGSRC}-debugsource
+ buildroot=$(cat $DEBUGSRC-debugsource | awk '/^BuildRoot/{print$2}')
+ topdir=$(dirname $(dirname $buildroot))
+ mkdir -p $buildroot $topdir/RPMS/BUILD $topdir/RPMS/RPMS
+ rm -rf $buildroot
+
+ # create source file list
+
+ find $BUILD_PATH -name '*[.][hc]xx' -o -name '*[.][hc]' | grep -Ev 
'/(workdir|qa|DEBS)/' | grep -E '/(source|inc)/' |
+
+ # list all directories for complete rpm remove
+
+ awk -v home=$BUILD_PATH '
+   {
+   split($0, a, home "/")
+   n=split(a[2], b, "/")
+   c=home
+   for(i=1;i> ${DEBUGSRC}-debugsource
+
+ echo Spec file of debug source package: ${DEBUGSRC}-debugsource
+
+ echo Start rpmbuild for debug source package...
+
+ ln -s / $buildroot
+
+ # debug build source package
+
+ rpmbuild -bb --define "_unpackaged_files_terminate_build  0" 
${DEBUGSRC}-debugsource --target $build_cpu --buildroot=$buildroot
+
+#
+# create rpm debug info packages
+# by processing logged spec files
+#
+
+for i in 
$BUILD_PATH/workdir/installation/CollaboraOffice/rpm/logging/*/*.spec.log
+do
+
+ # repackage only rpm packages with non-stripped so files
+
+ if grep -q '^%attr.*[.]\(so\|bin\)\([.].*\)\?\"' $i
+ then
+   echo  $i 
+   pack=$(cat $i | awk '/^Name/{print$2}')
+   buildroot=$(cat $i | awk '/^BuildRoot/{print$2}')
+   topdir=$(dirname $(dirname $buildroot))
+   rpmdir=$(echo $topdir | sed 's/_inprogress$//')
+   echo $rpmdir
+
+   # create empty buildroot directory
+
+   rm -rf $buildroot
+   mkdir -p $buildroot $topdir/RPMS/BUILD $topdir/RPMS/RPMS
+   cd $buildroot
+
+   echo REBUILD: $rpmdir/RPMS/${pack}-[0-9]*.rpm
+
+   # extract rpm package
+
+   rpm2cpio $rpmdir/RPMS/${pack}-[0-9]*.rpm | cpio -idmv
+
+   # create stripped libraries and linked debug info files
+
+   for j in $(cat $i | awk '/^%attr.*[.](so|bin)([.].*)?"$/{print$2}')
+   do
+   so=$(echo $j | tr -d '"')
+   cd ./$(dirname $so)
+   so=$(basename $so)
+   objcopy --only-keep-debug $so $so.dbg
+   objcopy