[Libreoffice-commits] core.git: Changes to 'refs/changes/31/431/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[GSOC] PDF Signing Support - Final
Hello all, After the GSoC midterm, there were two remaining important objectives to do: to write the NSS code to create a PKCS7 object (which includes the actual signature, ecrypted SHA1 digest and the public certificate) and to improve the PDF signing GUI (which can be seen in the experimental mode only). For the NSS part, first I have used the NSS PKCS7 API (secpkcs7.h and pkcs7t.h) to create the PKCS7 object. But it was very hard for me since NSS lacks a proper documentation[1] (the one in the header files is not sufficient). Anyway, later on, I have decided to newer and more fine grained NSS CMS (Cryptographic Message Syntax) API (cms.h and cmst.h). I have followed following steps to create a PKCS7 object: 1- We need a NSS CERTCertificate structure to operate on the NSS world. So, DER encoded certificate data is obtained via the Encoded attribute of XCertificate[2] and converted to a CERTCertificate structure using the CERT_DecodeCertFromPackage function. 2- SHA1 sum of the PDF file is computed using the HASH_Create, HASH_Begin, HASH_Update and HASH_End functions[3]. 3a- An empty CMS message is created using NSS_CMSMessage_Create. 3b- A SignedData is created inside the CMS message using the NSS_CMSSignedData_Create function. 3c- Since we use a detached PKCS7 object (which means that the PKCS7 signature object contains only the signature part, excluding the data itself) for the signing, an empty Data object is created inside the SignedData using NSS_CMSContentInfo_SetContent_Data. 3d- Certificate chain and signer info is added to the SignedData, using NSS_CMSSignerInfo_IncludeCerts and NSS_CMSSignedData_AddSignerInfo respectively. 3e- SHA1 is added to the CMS message using NSS_CMSSignedData_SetDigestValue. 3f- CMS message is DER-encoded via NSS_CMSEncoder_Start and NSS_CMSEncoder_Finish. (NSS_CMSEncoder_Update is not used since we don't have a Data). 4- Finally, DER encoded PKCS object is converted to the HEX representation and written to the relevant structure of the PDF which is prepared in the earlier commits. And for the GUI part, I have used Thunderbird certificate selection GUI design in the PDF export dialog. Now, the selected certificate information is printed in a disabled Edit control and users are able to clear the selected certificate to cancel the signing operation. (I have also used the PassWord = True property in the .src file for the certificate password input.) At the end of the day, however, Adobe acroread shows the PDF signatures as invalid for some reason. But, it shows the certificate details correctly (which was not the case when I have used the old NSS PKCS7 API). So it seems DER/HEX encodings and the inclusion of the certificate chain are correct but there is a bug, apparently. Maybe the calculation of SHA1 or passing the private key password to NSS is wrong. I will try to figure it out soon. Thanks to kendy and sberg for their devoted support in this GSoC project. Best regards. [1] https://developer.mozilla.org/en-US/docs/NSS/PKCS_7_functions [2] http://api.libreoffice.org/docs/common/ref/com/sun/star/security/XCertificate.html#Encoded [3] http://www.mozilla.org/projects/security/pki/nss/ref/nssfunctions.html#utils -- Gökçen Eraslan signature.asc Description: OpenPGP digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: git branch audit ...
On 18-07-2012 19:51, Michael Meeks wrote: origin/feature/pdf-signing My GSoC branch is already merged into master. Actually, some Werror fixes were applied to the master then, so this branch is ahead of master by 2 or 3 commits and is safe to remove if mentors (kendy, sberg, thorsten) are OK. -- Gökçen Eraslan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: git branch audit ...
On 19-07-2012 11:44, Gökçen Eraslan wrote: On 18-07-2012 19:51, Michael Meeks wrote: origin/feature/pdf-signing My GSoC branch is already merged into master. Actually, some Werror fixes were applied to the master then, so this branch is ahead of master by 2 or 3 commits and is safe to remove if mentors (kendy, sberg, thorsten) are OK. Deleted. -- Gökçen Eraslan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Removed parts of PDFWriter and doTestCode method
Hello, I've realized that there is a great test code[1] for PDFWriter. It draws some texts and shapes, adds annotations and widgets like buttons, checkboxes, comboboxes etc and saves resulting pdf file in HOME directory. It's very useful since the capabilities of the PDFWriter can be tested with that method. I want to use that method to test PDF signatures quickly. The bad news is it doesn't work now :) I mean it's outdated since it's jailed into a #ifdef DO_TEST_PDF. After some PDFWriter unusedcode.easy cleanups[2,3] some of the calls of that test method is not available any more. I have commented out outdated parts and added a com::sun::star::uno::Reference com::sun::star::beans::XMaterialHolder to make it work. Patch is attached. In IRC, Tor said that writing a unit test is a better way. Maybe I can write one. Cheers. [1]: http://opengrok.libreoffice.org/xref/core/vcl/source/gdi/pdfwriter_impl.cxx#123 [2]: http://cgit.freedesktop.org/libreoffice/core/commit/?id=581e7d7057afa87036d84e42c0e0a8a7368e20c7 [3] http://cgit.freedesktop.org/libreoffice/core/commit/?id=09279fe3dad24ab58121e4f0a9564d252b64d81a -- Gökçen Eraslan diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 797159e..9ba22d3 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -134,7 +133,8 @@ void doTestCode() aContext.DocumentInfo.Title = OUString( RTL_CONSTASCII_USTRINGPARAM( PDF export test document ) ); aContext.DocumentInfo.Producer = OUString( RTL_CONSTASCII_USTRINGPARAM( VCL ) ); -PDFWriter aWriter( aContext ); +com::sun::star::uno::Reference com::sun::star::beans::XMaterialHolder xEnc; +PDFWriter aWriter( aContext, xEnc ); aWriter.NewPage( 595, 842 ); aWriter.BeginStructureElement( PDFWriter::Document ); // set duration of 3 sec for first page @@ -179,7 +179,7 @@ void doTestCode() aWriter.SetActualText( String( RTL_CONSTASCII_USTRINGPARAM( It was the best of PDF, it was the worst of PDF ... or so. This is a pretty nonsensical text to denote a paragraph. I suggest you stop reading it. Because if you read on you might get bored. So continue on your on risk. Hey, you're still here ? Why do you continue to read this as it is of no use at all ? OK, it's your time, but still... . Woah, i even get bored writing this, so let's end this here and now. ) ) ); aWriter.SetAlternateText( String( RTL_CONSTASCII_USTRINGPARAM( This paragraph contains some lengthy nonsense to test structural element emission of PDFWriter. ) ) ); aWriter.EndStructureElement(); -sal_Int32 nLongPara = aWriter.BeginStructureElement( PDFWriter::Paragraph ); +aWriter.BeginStructureElement( PDFWriter::Paragraph ); aWriter.SetStructureAttribute( PDFWriter::WritingMode, PDFWriter::LrTb ); aWriter.DrawText( Rectangle( Point( 4500, 19000 ), Size( 12000, 1000 ) ), String( RTL_CONSTASCII_USTRINGPARAM( This paragraph is nothing special either but ends on the next page structurewise ) ), @@ -215,13 +215,19 @@ void doTestCode() sal_Int32 nFirstDest = aWriter.CreateDest( aTargetRect ); // enable structure aWriter.EndStructureElement(); + // add something to the long paragraph as an afterthought +/* PDFWriter::aWriter.GetCurrentStructureElement removed as an unusedcode.easy item: +http://cgit.freedesktop.org/libreoffice/core/commit/?id=09279fe3dad24ab58121e4f0a9564d252b64d81a + sal_Int32 nSaveStruct = aWriter.GetCurrentStructureElement(); aWriter.SetCurrentStructureElement( nLongPara ); aWriter.DrawText( Rectangle( Point( 4500,4500 ), Size( 12000, 1000 ) ), String( RTL_CONSTASCII_USTRINGPARAM( Add something to the longish paragraph above. ) ), TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK ); aWriter.SetCurrentStructureElement( nSaveStruct ); +*/ + aWriter.EndStructureElement(); aWriter.EndStructureElement(); aWriter.BeginStructureElement( PDFWriter::Figure ); @@ -287,6 +293,11 @@ void doTestCode() aTranspRect = Rectangle( Point( 1500, 16500 ), Size( 4800, 3000 ) ); aWriter.SetFillColor( Color( COL_LIGHTRED ) ); aWriter.DrawRect( aTranspRect ); + +/* +EndTransparencyGroup( const Rectangle rBoundRect, const Bitmap rAlphaMask ) is removed as an unusedcode.easy item: +http://cgit.freedesktop.org/libreoffice/core/commit/?id=581e7d7057afa87036d84e42c0e0a8a7368e20c7 + aWriter.BeginTransparencyGroup(); aWriter.SetFillColor( Color( COL_LIGHTGREEN ) ); aWriter.DrawEllipse( aTranspRect ); @@ -295,6 +306,7 @@ void doTestCode() String( RTL_CONSTASCII_USTRINGPARAM( Some transparent text ) ), TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER | TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK ); aWriter.EndTransparencyGroup( aTranspRect, aTransMask ); +*/ Bitmap aImageBmp( Size( 256, 256 ), 24 ); pAcc
[GSOC] PDF signing report
Hello, I want to write the progress about the PDF signing GSoC project: After weeks of reading the PDF reference and inspecting the PortableSigner implementation, here is what I must do to implement signing support: 1- Create an Annotation object of Widget subtype. Make it's width and height zero since we don't want to make the signature visible, for now. (Yes, digital signatures may be visible[1]. There is even a document about that[2].) 2- Create and AcroForm field (/FT/Sig) as the parent of the Annotation object we created.[3] Only buttons, combobox, listbox, edit and hierarchy is defined now. 3- Create a Signature dictionary (/Type/Sig). AcroForm field must point to that dictionary in the /V field. This is the crucial object. Prepare a PKCS#7 object and use it as the /Contents value. It must contain the X.509 certificate and the encrypted message digest. 4- Modify /Catalog object of the PDF document so that /AcroForm points to the our AcroForm field. 5- Modify the first /Page object so that it's /Annots key points to our Annotation object. 6- Write a new xref table and the final trailer. That's all, it's very easy :) It seems most of these changes will be applied to vcl/source/gdi/pdfwriter_impl.{c,h}xx files. As Thorsten said, I will mimic the behaviour of the PortableSigner tool first. PortableSigner use the incremental updating feature of the PDF. This feature allows pdf editing tools to edit PDF file by adding new or existing objects to the end of the file. So, if an object exists more than once, last occurence is used. In the PDF export code I have to: 1- Add PDFWriter::SignatureWidget AcroForm type and use PDFWriterImpl::createControl() to add a Signature field. 2- Now, PDFWriterImpl::emitCatalog method writes all the Pages, Resources and Catalog objects. I think I need to split those into different methods, so I can emit the modified catalog again. 3- Re-write the /Page object that contains recently added Signature annotation. 4- Add a new xref table and a new trailer at the end. I don't know how to implement that now. PDFWriterImpl::emitTrailer() method writes all objects but in incremental updates we must include only added/modified objects to the xref table. I know that is a kind of note-to-self but I've tried to write down all the steps that I can think of. Cheers. [1] http://www.tracker-software.com/knowledgebase/290-How-do-I-create-an-invisible-digital-certificate [2] http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/acrobat_digital_signature_appearances_v9.pdf [3] Since Annotation object and AcroForm Sig field have no common keys, signature implementation merge those two dictionaries. -- Gökçen Eraslan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Disabling file opening and saving in print preview mode
On 31-05-2012 21:06, Regina Henschel wrote: Yes, but you have to add some icons, e.g. page preview, help, print directly pdf directly. BTW: In the UI the name is Page Preview not Print Preview, although the command is .uno:PrintPreview. And I think 'Page Preview' is the correct term, because it is not a print preview, see below. By the way; in Oxygen, Tango and Crystal icon themes, the toolbar icon of the Page Preview button is a **printer** with a magnifying glass, while Galaxy and High Contrast themes have an **empty page** icon with a magnifying glass. -- Gökçen Eraslan signature.asc Description: OpenPGP digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice-ux-advise] Disabling file opening and saving in print preview mode
On 31-05-2012 21:06, Regina Henschel wrote: Yes, but you have to add some icons, e.g. page preview, help, print directly pdf directly. BTW: In the UI the name is Page Preview not Print Preview, although the command is .uno:PrintPreview. And I think 'Page Preview' is the correct term, because it is not a print preview, see below. By the way; in Oxygen, Tango and Crystal icon themes, the toolbar icon of the Page Preview button is a **printer** with a magnifying glass, while Galaxy and High Contrast themes have an **empty page** icon with a magnifying glass. -- Gökçen Eraslan signature.asc Description: OpenPGP digital signature ___ Libreoffice-ux-advise mailing list Libreoffice-ux-advise@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-ux-advise
fdo#48932: Prefer interpolation-based image rescaling in PDF export
Hello, Attached patch changes preferred image resampling method used in PDF export to BMP_SCALE_INTERPOLATE. That minimizes Moire artifacts in the images. I want to thank Kendy for his support. Here is a screenshot: http://imagebin.org/213821 Left one is the default BMP_SCALE_FAST and right one is BMP_SCALE_INTERPOLATE. -- Gökçen Eraslan From d841ade3d3f0a0e163d7a6d0015c0048f58df27d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6k=C3=A7en=20Eraslan?= gokcen.eras...@gmail.com Date: Fri, 25 May 2012 17:05:57 +0300 Subject: [PATCH] fdo#46378: Prefer interpolation-based image rescaling in PDF export. Change-Id: I9ead1221b4562dea0e1ef289944ac11ea850ed1a --- vcl/source/gdi/pdfwriter_impl2.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 4ba5e2c..b86e758 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -137,7 +137,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point i_rPoint, const Size i_rSiz aNewBmpSize.Height() = FRound( fMaxPixelX / fBmpWH); } if( aNewBmpSize.Width() aNewBmpSize.Height() ) -aBitmapEx.Scale( aNewBmpSize ); +aBitmapEx.Scale( aNewBmpSize, BMP_SCALE_INTERPOLATE ); else aBitmapEx.SetEmpty(); } -- 1.7.10.1 ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [SOLVED] build error with poppler 0.20.0
On 14-05-2012 16:07, Petr Mladek wrote: Gökçen Eraslan píše v Ne 13. 05. 2012 v 21:51 +0300: On 13-05-2012 21:09, Andreas Radke wrote: ArchLinux is moving to poppler 0.20.0 that breaks LibO build: [ build CXX ] svl/source/misc/sharecontrolfile /build/src/libreoffice-core-3.5.3.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx: In member function 'int pdfi::PDFOutDev::parseFont(long long int, GfxFont*, GfxState*) const': /build/src/libreoffice-core-3.5.3.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx:406:28: error: 'class GfxFont' has no member named 'getOrigName' Can you try changing getOrigName to getName? It seems function name is changed to getName[1]. Ionut provided nice patch, see http://cgit.freedesktop.org/libreoffice/core/commit/?id=704f3155cca2e1fb5ad071539b7f8b5e5522dd97 http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5id=ac68934592ec7d838cf5c22744be8d97aa4a1a47 GooString* pFamily = gfxFont-getName(); if( ! pFamily ) #if POPPLER_CHECK_VERSION(0, 20, 0) pFamily = gfxFont-getName(); #else pFamily = gfxFont-getOrigName(); #endif Is it all right to call getName() second time if pFamily is null and poppler is 0.20? Best Regards, Petr ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice -- Gökçen Eraslan signature.asc Description: OpenPGP digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: build error with poppler 0.20.0
On 13-05-2012 21:09, Andreas Radke wrote: ArchLinux is moving to poppler 0.20.0 that breaks LibO build: [ build CXX ] svl/source/misc/sharecontrolfile /build/src/libreoffice-core-3.5.3.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx: In member function 'int pdfi::PDFOutDev::parseFont(long long int, GfxFont*, GfxState*) const': /build/src/libreoffice-core-3.5.3.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx:406:28: error: 'class GfxFont' has no member named 'getOrigName' Do we already have a fix for this? Any idea? Can you try changing getOrigName to getName? It seems function name is changed to getName[1]. [1] http://cgit.freedesktop.org/poppler/poppler/commit/poppler/GfxFont.h?id=c0affb1845c339f89ca67608cb9fd9134ff902f5 -Andy ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice -- Gökçen Eraslan signature.asc Description: OpenPGP digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
License statement
Hello, All of my past and future contributions to the LibreOffice project are under LGPLv3+/GPLv3+/MPL until further notice. Regards. -- Gökçen Eraslan signature.asc Description: OpenPGP digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[PATCH] fdo#46538 Easyhack: Add support for more bug trackers to get-bugzilla-attachments-by-mimetype
Hello, Here is a patch adding support for Novell, KDE (for KOffice/Calligra), GNOME (for Gnumeric), AbiSource (for AbiWord) bugzillas and Launchpad to bin/get-bugzilla-attachments-by-mimetype script as required by easyhack#46538. However, there two glitches and workarounds: 1- As stated in the code, Novell bugzilla requires users to log in to bugzilla in order to get full information about the bugs such as attachment bodies etc. Since Novell bugzilla uses some proprietary login extensions it's hard to implement log in mechanism and use it via xmlrpc API. python-bugzilla claims that it supports Novell bugzilla login but I could not make it work. As a workaround, comments containing Created an attachment (id=xxx) pattern are parsed and attachments are downloaded using urllib. Attachments are filtered using mimetype info obtained from http headers. 2- For launchpad, launchpadlib python module is used. But currently launchpad api does not support really advanced search like bugzilla. For example, it's not possible to search for bugs having application/pdf attachments. So, again a workaround is used. Code iterates over all the bugs of the *libreoffice* source package and check their attachments. --- bin/get-bugzilla-attachments-by-mimetype | 278 -- 1 file changed, 191 insertions(+), 87 deletions(-) diff --git a/bin/get-bugzilla-attachments-by-mimetype b/bin/get-bugzilla-attachments-by-mimetype index 0b18060..7316f0a 100755 --- a/bin/get-bugzilla-attachments-by-mimetype +++ b/bin/get-bugzilla-attachments-by-mimetype @@ -39,6 +39,7 @@ import urllib import feedparser import base64 +import re import os, os.path import xmlrpclib from xml.dom import minidom @@ -83,6 +84,42 @@ def get_from_bug_url_via_xml(url, mimetype, prefix, suffix): break attachmentid += 1 +def get_novell_bug_via_xml(url, mimetype, prefix, suffix): +id = url.rsplit('=', 2)[1] +print id is, prefix, id, suffix +if os.path.isfile(suffix + '/' + prefix + id + '-1.' + suffix): +print assuming, id, is up to date +else: +print parsing, id +sock = urlopen_retry(url+ctype=xml) +dom = minidom.parse(sock) +sock.close() +attachmentid=1 +for comment in dom.getElementsByTagName('thetext'): +commentText = comment.firstChild.nodeValue +match = re.search(r.*Created an attachment \(id=([0-9]+)\), commentText) +if not match: +continue + +realAttachmentId = match.group(1) +handle = urlopen_retry(novellattach + realAttachmentId) +if not handle: +print attachment %s is not accessible, realAttachmentId +continue + +remoteMime = handle.info().gettype() +if remoteMime != mimetype: +print skipping +continue + +download = suffix + '/' + prefix + id + '-' + str(attachmentid) + '.' + suffix +print 'downloading as', download +f = open(download, 'w') +f.write(handle.read()) +f.close() +break +attachmentid += 1 + def get_through_rpc_query(rpcurl, showurl, mimetype, prefix, suffix): try: proxy = xmlrpclib.ServerProxy(rpcurl) @@ -109,108 +146,164 @@ def get_through_rss_query_url(url, mimetype, prefix, suffix): except: pass d = feedparser.parse(url) + +#Getting detailed bug information and downloading an attachment body is not possible without logging in to Novell bugzilla +#get_novell_bug_via_xml function is a workaround for that situation +get_bug_function = get_novell_bug_via_xml if prefix == novell else get_from_bug_url_via_xml + for entry in d['entries']: -get_from_bug_url_via_xml(entry['id'], mimetype, prefix, suffix) +get_bug_function(entry['id'], mimetype, prefix, suffix) def get_through_rss_query(queryurl, mimetype, prefix, suffix): url = queryurl + '?query_format=advancedfield0-0-0=attachments.mimetypetype0-0-0=equalsvalue0-0-0=' + escape(mimetype) + 'ctype=rss' print 'url is', url get_through_rss_query_url(url, mimetype, prefix, suffix) +def get_launchpad_bugs(prefix): +#launchpadlib python module is required to download launchpad attachments +from launchpadlib.launchpad import Launchpad + +launchpad = Launchpad.login_anonymously(attachmentdownload, production) +ubuntu = launchpad.distributions[ubuntu] + +#since searching bugs having attachments with specific mimetypes is not available in launchpad API +#we're iterating over all bugs of the libreoffice source package +libo = ubuntu.getSourcePackage(name=libreoffice) +libobugs = libo.getBugTasks() + +for bugtask in libobugs: +bug = bugtask.bug +id = str(bug.id) +print parsing , id, status:, bugtask.status, title:, bug.title[:50] +
Re: [Libreoffice] [REVIEW] Better support for distro packaging
08 Temmuz 2011 Cuma günü (saat 17:00:48) Petr Mladek şunları yazmıştı: Hi, are you fine with adding the attached changes into master and libreoffice-3-4 branch? These changes help me to create SUSE packages. Most of the stuff comes from the build repo and should be useful for other packagers as well. The changes should be pretty safe. Most scripts are called only with the new target make distro-pack-install. In addition, it adds few more configure switches and environment variables. See the commit messages for more details. Note that I did not migrated all features from the build repo. I wanted to do some clean up during this more, ... We could add them later is really needed. I tested it only with vendor Novell, inc. I am sure that there will be problems with other vendors. IMHO, it should not cause harm because it affects only few interested package maintainers. They should be able to fix problems and send patches. In the first patch named -L.patch, an absolute-path symlink is created using: for dir in `find $lo_src_dir/$tarname -mindepth 1 -maxdepth 1 -type d` ; do ln -sf $dir $start_dir and this is not good since I prepare one giant libreoffice tarball in a temporary directory of a different machine, which means the system that I download the sources and the system building sources is different. So that abosolute path symlink seems broken in the a different machine. What about making it a relative symlink instead using something like: ln -sf ${dir/$start_dir\/} $start_dir or ln -sf `echo $dir | sed -e s,$start_dir\/,,` $start_dir Best Regards, Petr -- Gökçen Eraslan signature.asc Description: This is a digitally signed message part. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [PATCH][PUSHED] In download.in file, use 3.3.1 as LibreOffice regexp value to correctly get tarballs.
Pazartesi 14 Şubat 2011 günü (saat 13:16:01) Petr Mladek şunları yazmıştı: Gökçen Eraslan píše v Pá 11. 02. 2011 v 15:58 +: This patch makes ./download command in LibreOffice 3.3.1.0 work with --without-git option. Thanks a lot for the fix. I have pushed it into the libreoffice-3-3 and libreoffice-3-3-1 branches. Are you sure about committing libreoffice-3-3 branch? Because patch changes 3\.3\.0 to 3\.3\.1, not just adds 3\.3\.1. Maybe we must change regexp to libreoffice-.*-3\.3.* and use both in 3.3 and 3.3.1 branches? Best Regards, Petr -- Gökçen Eraslan signature.asc Description: This is a digitally signed message part. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] [PATCH] In download.in file, use 3.3.1 as LibreOffice regexp value to correctly get tarballs.
This patch makes ./download command in LibreOffice 3.3.1.0 work with --without-git option. --- download.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/download.in b/download.in index e6c93fb..661bc2c 100755 --- a/download.in +++ b/download.in @@ -112,7 +112,7 @@ sub download_tests_dependencies() { 'binutils-.*'= '@MIRROR@/support', 'gcc-.*' = '@MIRROR@/support', 'libreoffice-.*-3\.2\.9.*' = 'http://download.documentfoundation.org/libreoffice/src/', -'libreoffice-.*-3\.3\.0.*' = 'http://download.documentfoundation.org/libreoffice/src/', +'libreoffice-.*-3\.3\.1.*' = 'http://download.documentfoundation.org/libreoffice/src/', 'beb300-m.*' = '@MIRROR@/BEB300', 'dev300-m.*' = '@MIRROR@/DEV300', 'ooo300-m.*' = '@MIRROR@/OOO300', -- 1.7.3.4 ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [PATCH] Fix configure check for BerkleyDB where db_create is macro
Perşembe 06 Ocak 2011 günü (saat 20:03:28) Petr Mladek şunları yazmıştı: Hi, this fixed the problem described in the attached mail. Gökçen, Robert, could you please test it and sign it out for libreoffice-3-3 branch? No, I only have __db185_open_4008 symbol in libdb.so, here is the result: checking for db-5.1/db.h... no checking for db5.1/db.h... no checking for db-5.0/db.h... no checking for db5.0/db.h... no checking for db-5/db.h... no checking for db5/db.h... no checking for db-4.8/db.h... no checking for db4.8/db.h... no checking for db-4.7/db.h... no checking for db4.7/db.h... no checking for db-4/db.h... no checking for db4/db.h... no checking for db/db.h... no checking db.h usability... yes checking db.h presence... yes checking for db.h... yes checking whether db is at least 4.1... yes checking for dbopen in -ldb... no checking for __db185_open in -ldb... no checking for dbopen in -ldb-5.1... no checking for __db185_open in -ldb-5.1... no checking for dbopen in -ldb5.1... no checking for __db185_open in -ldb5.1... no checking for dbopen in -ldb-5.0... no checking for __db185_open in -ldb-5.0... no checking for dbopen in -ldb5.0... no checking for __db185_open in -ldb5.0... no checking for dbopen in -ldb-5... no checking for __db185_open in -ldb-5... no checking for dbopen in -ldb5... no checking for __db185_open in -ldb5... no checking for dbopen in -ldb-4.8... no checking for __db185_open in -ldb-4.8... no checking for dbopen in -ldb4.8... no checking for __db185_open in -ldb4.8... no checking for dbopen in -ldb-4.7... no checking for __db185_open in -ldb-4.7... no checking for dbopen in -ldb4.7... no checking for __db185_open in -ldb4.7... no checking for dbopen in -ldb-4... no checking for __db185_open in -ldb-4... no checking for dbopen in -ldb4... no checking for __db185_open in -ldb4... no configure: error: db not installed or functional Here is the symbols in libdb.so file containing open keyword: $ nm -D -C /usr/lib/libdb.so |grep open 00036a10 T __bam_open_4008 00025ea0 T __db185_open_4008 000eb1d0 T __db_get_open_flags_4008 000cb740 T __db_master_open_4008 00105000 T __db_mi_open_4008 000fbc40 T __db_ndbm_open_4008 000eb290 T __db_open_4008 000e52b0 T __db_open_pp_4008 00133150 T __db_openflags_4008 00105f90 T __db_tmp_open_4008 000ffc90 T __dbreg_do_open_4008 00106bb0 T __env_get_open_flags_4008 00107200 T __env_open_4008 00107450 T __env_open_pp_4008 00107a60 T __env_openfiles_4008 0006a040 T __ham_open_4008 000bf240 T __lock_open_4008 001180f0 T __log_open_4008 00127d90 T __memp_fopen_4008 00128d90 T __memp_fopen_pp_4008 00129fa0 T __memp_get_mp_max_openfd_4008 0012d780 T __memp_open_4008 0012a130 T __memp_set_mp_max_openfd_4008 000c2d30 T __mutex_open_4008 001350d0 T __os_open_4008 001342f0 T __os_openhandle_4008 00137cd0 T __partition_open_4008 000820c0 T __qam_open_4008 00040340 T __ram_open_4008 0009c650 T __rep_open_4008 000ab600 T __repmgr_open_4008 00146840 T __txn_open_4008 00145c50 T __txn_openfiles_4008 00134ec0 T db_env_set_func_open_4008 U fopen U open U opendir ... Best Regards, Petr -- Gökçen Eraslan signature.asc Description: This is a digitally signed message part. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] configure --without-git is broken, fetch_tarballs.sh is renamed to download
Perşembe 23 Aralık 2010 günü (saat 21:34:47) Miklos Vajna şunları yazmıştı: Hi Gökçen, On Thu, Dec 23, 2010 at 04:14:30PM +, Gökçen Eraslan gok...@pardus.org.tr wrote: To build RC2, I cannot get tarballs when I use configure --without-git. In download_external_sources.sh script line 18[1]: wget http://cgit.freedesktop.org/libreoffice/bootstrap/plain/fetch_tarballs.sh ?id=$GIT_TAG -O fetch_tarballs.sh chmod 755 fetch_tarballs.sh But this command does not work since fetch_tarballs.sh is renamed[2] to download. Can anybody fix that? What is the error message you get? http://cgit.freedesktop.org/libreoffice/bootstrap/commit/?id=fe225c2eb323 6e186983d17c8f5dd83a6bdeb2ec This commit is in master only, while you're trying to build RC2 which is from the libreoffice-3-3 branch. I just built today RC2 from tarballs successfully. (Though we do not use ./download since sources are downloaded before the build by the package builder.) If you use configure --without-git and ./download afterwards, it fails with this error: --2010-12-27 09:58:05-- http://cgit.freedesktop.org/libreoffice/bootstrap/plain/fetch_tarballs.sh?id=LIBREOFFICE_3_3_0_2 Resolving cgit.freedesktop.org (cgit.freedesktop.org)... 131.252.210.176 Connecting to cgit.freedesktop.org (cgit.freedesktop.org)| 131.252.210.176|:80... connected. HTTP request sent, awaiting response... 404 Not found 2010-12-27 09:58:05 ERROR 404: Not found. --2010-12-27 09:58:05-- http://cgit.freedesktop.org/libreoffice/bootstrap/plain/ooo.lst?id=LIBREOFFICE_3_3_0_2 Resolving cgit.freedesktop.org (cgit.freedesktop.org)... 131.252.210.176 Connecting to cgit.freedesktop.org (cgit.freedesktop.org)| 131.252.210.176|:80... connected. HTTP request sent, awaiting response... 404 Not found 2010-12-27 09:58:06 ERROR 404: Not found. ./download_external_sources.sh: line 17: ./fetch_tarballs.sh: Permission denied rmdir: failed to remove `/tmp/tmp.jg2CTi12z0': Directory not empty Done When I apply attached patch I can download external sources, since id variable is libreoffice-3.3.0.2, not LIBREOFFICE_3_3_0_2: --2010-12-27 09:58:47-- http://cgit.freedesktop.org/libreoffice/bootstrap/plain/fetch_tarballs.sh?id=libreoffice-3.3.0.2 Resolving cgit.freedesktop.org (cgit.freedesktop.org)... 131.252.210.176 Connecting to cgit.freedesktop.org (cgit.freedesktop.org)| 131.252.210.176|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 4638 (4.5K) [text/plain] Saving to: `fetch_tarballs.sh' 100%[] 4,638 18.8K/s in 0.2s 2010-12-27 09:58:53 (18.8 KB/s) - `fetch_tarballs.sh' saved [4638/4638] --2010-12-27 09:58:53-- http://cgit.freedesktop.org/libreoffice/bootstrap/plain/ooo.lst?id=libreoffice-3.3.0.2 Resolving cgit.freedesktop.org (cgit.freedesktop.org)... 131.252.210.176 Connecting to cgit.freedesktop.org (cgit.freedesktop.org)| 131.252.210.176|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 4646 (4.5K) [text/plain] Saving to: `ooo.lst' 100%[] 4,646 18.7K/s in 0.2s 2010-12-27 09:58:59 (18.7 KB/s) - `ooo.lst' saved [4646/4646] -- Gökçen Eraslan Index: libreoffice-build-3.3.0.2/download_external_sources.sh === --- libreoffice-build-3.3.0.2.orig/download_external_sources.sh +++ libreoffice-build-3.3.0.2/download_external_sources.sh @@ -8,7 +8,7 @@ export CLONEDIR if test -e $CLONEDIR/bootstrap/fetch_tarballs.sh -a -e $CLONEDIR/bootstrap/ooo.lst; then $CLONEDIR/bootstrap/fetch_tarballs.sh $CLONEDIR/bootstrap/ooo.lst else -GIT_TAG=`echo $OOO_SOURCEDIRNAME | tr a-z.- A-Z__` +GIT_TAG=$OOO_SOURCEDIRNAME tmp=`mktemp -q -d` cd $tmp signature.asc Description: This is a digitally signed message part. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] configure --without-git is broken, fetch_tarballs.sh is renamed to download
Pazartesi 27 Aralık 2010 günü (saat 10:02:31) Gökçen Eraslan şunları yazmıştı: When I apply attached patch I can download external sources, since id variable is libreoffice-3.3.0.2, not LIBREOFFICE_3_3_0_2: This is because RC2 is tagged as libreoffice-3.3.0.2, unlike RC1 which is tagged as LIBREOFFICE_3_3_0_1: http://cgit.freedesktop.org/libreoffice/build/refs/tags -- Gökçen Eraslan signature.asc Description: This is a digitally signed message part. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] PATCH: Try to find the proper berkeley db headers and incs
() { return db_create(); ; return 0; } I got this linking error: $ x86_64-pc-linux-gnu-gcc -o conftest -mtune=generic -march=x86-64 -ldb - lexpat -lcrypt db.c /tmp/cc6Q7xex.o: In function `main': db.c:(.text+0xa): undefined reference to `db_create' collect2: ld returned 1 exit status In libdb.so, there is no such symbol like db_create, but db_create_4008 exists and in db.h header file db_create is defined as a macro: #define db_create db_create_4008 So, checking db_create function with AC_CHECK_FUNC is wrong for DB 4.8. I think db.h must be included to use db_create method but the file generated by autoconf just tries to use db_create function which is not available if db.h is not included. When I apply the workaround attached I can pass configure now, but I know this is not the right solution. I think this patch must be reverted until it is tested with all db versions. Best Regards, Petr -- Gökçen Eraslan --- configure.in.orig 2010-12-27 15:04:05.274000696 + +++ configure.in 2010-12-27 14:59:41.427000696 + @@ -4418,9 +4418,9 @@ ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no. you need at least db 4.1])]) save_LIBS=$LIBS for dbver in '' -5.1 5.1 -5.0 5.0 -5 5 -4.8 4.8 -4.7 4.7 -4 4; do -AC_CHECK_LIB(db$dbver, db_create, [ DB_LIB=db$dbver; DB_CPPLIB=db_cxx$dbver; LIBS=-ldb$dbver $LIBS; break ]) +AC_CHECK_LIB(db$dbver, db_create_4008, [ DB_LIB=db$dbver; DB_CPPLIB=db_cxx$dbver; LIBS=-ldb$dbver $LIBS; break ]) done -AC_CHECK_FUNC(db_create, [], [ AC_MSG_ERROR([db not installed or functional]) ]) +AC_CHECK_FUNC(db_create_4008, [], [ AC_MSG_ERROR([db not installed or functional]) ]) LIBS=$save_LIBS SCPDEFS=$SCPDEFS -DSYSTEM_DB else signature.asc Description: This is a digitally signed message part. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] configure --without-git is broken, fetch_tarballs.sh is renamed to download
Hello, To build RC2, I cannot get tarballs when I use configure --without-git. In download_external_sources.sh script line 18[1]: wget http://cgit.freedesktop.org/libreoffice/bootstrap/plain/fetch_tarballs.sh?id=$GIT_TAG -O fetch_tarballs.sh chmod 755 fetch_tarballs.sh But this command does not work since fetch_tarballs.sh is renamed[2] to download. Can anybody fix that? Thanks. [1] http://cgit.freedesktop.org/libreoffice/build/tree/download_external_sources.sh#n18 [2] http://cgit.freedesktop.org/libreoffice/bootstrap/commit/?id=fe225c2eb3236e186983d17c8f5dd83a6bdeb2ec -- Gökçen Eraslan signature.asc Description: This is a digitally signed message part. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice