Spec URL: http://dev.laptop.org/~marco/xulrunner.spec SRPM URL: http://dev.laptop.org/~marco/xulrunner-1.9a5pre-1.cvs20070519.1.src.rpm Description: XULRunner is a Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications that are as rich as Firefox and Thunderbird. It will provide mechanisms for installing, upgrading, and uninstalling these applications. XULRunner will also provide libxul, a solution which allows the embedding of Mozilla technologies in other projects and products.
The plan is to add this package to the olpc-2 branch.
rpmlint complained following on SRPM=> E: xulrunner invalid-version 1.9a5pre The version string must not contain the pre, alpha, beta or rc suffixes because when the final version will be out, you will have to use an Epoch tag to make the package upgradable. Instead put it in the release tag like 0.alpha8.1. W: xulrunner summary-ended-with-dot XUL Runner. Summary ends with a dot. W: xulrunner strange-permission xulrunner-mozconfig 0755 A file that you listed to include in your package has strange permissions. Usually, a file should have 0644 permissions. W: xulrunner strange-permission firefox-1.1-visibility.patch 0755 A file that you listed to include in your package has strange permissions. Usually, a file should have 0644 permissions. W: xulrunner mixed-use-of-spaces-and-tabs (spaces: line 7, tab: line 24) The specfile mixes use of spaces and tabs for indentation, which is a cosmetic annoyance. Use either spaces or tabs for indentation, not both. rpmlint complained following on RPM => W: xulrunner no-documentation The package contains no documentation (README, doc, etc). You have to include documentation files. W: xulrunner devel-file-in-non-devel-package /usr/bin/xulrunner-config A development file (usually source code) is located in a non-devel package. If you want to include source code in your package, be sure to create a development package. E: xulrunner invalid-version 1.9a5pre The version string must not contain the pre, alpha, beta or rc suffixes because when the final version will be out, you will have to use an Epoch tag to make the package upgradable. Instead put it in the release tag like 0.alpha8.1. W: xulrunner summary-ended-with-dot XUL Runner. Summary ends with a dot. E: xulrunner no-jar-manifest /usr/lib/xulrunner-1.9a5pre/chrome/classic.jar The jar file does not contain a META-INF/MANIFEST file. E: xulrunner no-jar-manifest /usr/lib/xulrunner-1.9a5pre/chrome/en-US.jar The jar file does not contain a META-INF/MANIFEST file. E: xulrunner no-jar-manifest /usr/lib/xulrunner-1.9a5pre/chrome/simple.jar The jar file does not contain a META-INF/MANIFEST file. E: xulrunner no-jar-manifest /usr/lib/xulrunner-1.9a5pre/chrome/pippki.jar The jar file does not contain a META-INF/MANIFEST file. E: xulrunner no-jar-manifest /usr/lib/xulrunner-1.9a5pre/chrome/toolkit.jar The jar file does not contain a META-INF/MANIFEST file. E: xulrunner no-jar-manifest /usr/lib/xulrunner-1.9a5pre/chrome/pyxultest.jar The jar file does not contain a META-INF/MANIFEST file. E: xulrunner no-jar-manifest /usr/lib/xulrunner-1.9a5pre/chrome/comm.jar The jar file does not contain a META-INF/MANIFEST file.
I would say the jar file errors are all an upstream issue (or xulrunner just doesn't need them in their jar format). These are not general purpose jar files and are internal to xulrunner. They should not be blockers. The rest is easy to fix.
>W: xulrunner no-documentation >The package contains no documentation (README, doc, etc). >You have to include documentation files. xulrunner has no docs. Same as firefox. >E: xulrunner no-jar-manifest /usr/lib/xulrunner-1.9a5pre/chrome/classic.jar >The jar file does not contain a META-INF/MANIFEST file. John is correct about this. The other are fixed: http://dev.laptop.org/~marco/xulrunner-1.9-2.a5pre.cvs20070519.1.src.rpm http://dev.laptop.org/~marco/xulrunner.spec
Got only one warning now with new updated SRPM W: xulrunner-devel unstripped-binary-or-object /usr/lib/xulrunner-1.9a5pre/sdk/libxpcom.so
also, missing %doc. You can Add LICENSE and LEGAL to %doc.
- MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability). Don't add static libraries files. If you want then - MUST: Static libraries must be in a -static package. check files installed under %{_libdir}/xulrunner-%{version}%{prerelease}/sdk Ok you can now update new package including all above suggested changes.
>Don't add static libraries files. If you want then >- MUST: Static libraries must be in a -static package. >check files installed under %{_libdir}/xulrunner-%{version}%{prerelease}/sdk To clarify, these are not just static versions of the dynamic libraries. They are required if you want to link against lixpcom.so, at compile time or at runtime. That's why I thought I'd put them in the -devel package. http://developer.mozilla.org/en/docs/XPCOM_Glue That said, should I use a -static package even in this case?
(In reply to comment #8) > >Don't add static libraries files. If you want then > >- MUST: Static libraries must be in a -static package. > >check files installed under %{_libdir}/xulrunner-%{version}%{prerelease}/sdk > > To clarify, these are not just static versions of the dynamic libraries. They > are required if you want to link against lixpcom.so, at compile time or at > runtime. That's why I thought I'd put them in the -devel package. > > http://developer.mozilla.org/en/docs/XPCOM_Glue > > That said, should I use a -static package even in this case? Its OK then. Let it be in -devel rpm
Done. http://dev.laptop.org/~marco/xulrunner-1.9-2.a5pre.cvs20070519.1.src.rpm http://dev.laptop.org/~marco/xulrunner.spec
Ok, I had a discussion on #fedora-devel on IRC as I see that http://fedoraproject.org/wiki/Packaging/Guidelines?action=show&redirect=PackagingGuidelines#head-2302ec1e1f44202c9cc4bcce24cb711266557ad7 And I got negative feedback on allowing to add static libraries in xulrunner. So better take this issue to mailing list for further discussion.
Actually, I'll take this one...
1. MUST provide gecko-devel, gecko-libs and gecko-debuginfo 2. MUST pull in all relevant patches from the rawhide version of Firefox that haven't been applied upstream yet (and I know there are a few). We must not regress here. The pango patches are probably safe to drop as they have been replaced with a different architecture. Many other fixes should have been upstreamed. But there are a handful that probably still need to make it in. 3. bsmedberg mentioned that gtkmozembed is going to be in a separate source tarball. We should make that happen in conjunction with this, because most dependent things really just want that. It has a more stable ABI/API. 4. We need to build with -rpath. Again, see rawhide. 5. pragma visibility works on all platforms now, so that can be removed. It's late and I have other stuff I want to get to, but please please PLEASE do not regress from current trunk. I'll try to take a look in the morning. P.S. you guys suck for not making sure I was aware of this :-P
FWIW, I had started doing this work (yay duplication of effort) but the patches slowed me down, and I got a little busy with other work. My goal is (or at least it _was_ prior to seeing this review) to get a package ready for review before GUADEC.
J5 is going to work on this.
New spec and package http://people.freedesktop.org/~johnp/xulrunner.spec http://people.freedesktop.org/~johnp/xulrunner-1.9-3.a5pre.cvs20070519.1.src.rpm This takes care of 1,4 and 5 in comment #13 2 - Chris is graciously helping out 3 - is not needed since we do not use gtkmozembed but it would be nice is someone packaged it up for others to use
New spec and package http://people.freedesktop.org/~johnp/xulrunner.spec http://people.freedesktop.org/~johnp/xulrunner-1.9-4.a5pre.cvs20070519.1.src.rpm - add BR and configure to build with the system nspr - add defaults to make sure we don't do the firefox autoupdate stuff however intersting that would be on an XO
Christopher: I assume you are reviewing here... setting the review flag to ? for you.
* Make sure this passes rpmlint (i haven't actually tested that here). * You're lucky with the patches, most of them just got committed upstream as well and managed to make it into the tarball. However, please copy firefox-0.7.3-psfonts.patch from rawhide which marco said you guys need. It applies cleanly. * I will let you slide with static linking for now as I'm guessing you have packages dependent on that right now, but we probably want to fix their usage to use the frozen APIs and get rid of that. Do file a bug and cc me there to do that. * Provides: gecko-libs = %{version} gecko-libs <--- extra gecko-libs * Your mozconfig also should define libdir in addition to prefix. Since you are exporting LIBDIR and PREFIX in the specfile (you copied from rawhide which is good) you can simply copy the "ac_add_options --prefix="$PREFIX" and ac_add_options --libdir="$LIBDIR" * Please move --with-system-nspr to be next to --with-system-nss for ease of reference. Those are tied very closely together.
http://people.freedesktop.org/~johnp/xulrunner.spec http://people.freedesktop.org/~johnp/xulrunner-1.9-5.a5pre.cvs20070519.1.src.rpm add suggested fixes rpmlint has no output on my end
One more thing that needs to be done which I just noticed when I tried to cvs update. All the CVS/Root files need to point to anon cvs instead of using marco's CVSRoot. :-) I'll approve this if you untar the source, cd into the top source directory, and run the following: echo ":pserver:anonymous.org:/cvsroot" > /tmp/cvschroot find -path "*/CVS/Root" | xargs -n1 cp -f /tmp/cvschroot rm /tmp/cvschroot Then re-tar it up. All upstream tarballs are set up with anoncvs, so we should not break this.
we need to version with xulrunner-1.9-0.a5.5.cvs20070621 because final version will be 1.9-1. This is a downgrade in versions from the fc6 olpc repo. Solution is to remove the package from the fc6-olpc repo once this is in. the fc6-olpc repo can be considered experimental as yum upgrades would produce nonbootable machines anyway because of the way the repos were set up (we were just learning how to make a branch project off of Fedora). It is better to start fresh because of this.
New Package CVS Request ======================= Package Name: xulrunner Short Description: XUL Runner Owners: mpg, johnp Branches: OLPC-2
So is this going to be usable for the other apps in fedora that currently BuildRequire: firefox-devel ? What olpc apps currently link static to this package? Your version is slightly wrong... the 'cvs' should be at the end... http://fedoraproject.org/wiki/Packaging/NamingGuidelines#head-d97a3f40b6dd9d2288206ac9bd8f1bf9b791b22a and there should be another digit there I think. So, 1.9-5.a5pre.cvs20070519.1 should be: 1.9-0.5.a5pre.20070519cvs Since you are using a cvs checkout, can you include a comment on how to check that exact version out ? See: http://fedoraproject.org/wiki/Packaging/SourceURL
>So is this going to be usable for the other apps in fedora that currently >BuildRequire: firefox-devel ? The current plan is to build it only on OLPC-2. Not sure what are caillon plans for Fedora. It could be used that way potentially (keep in mind this is just a pre release though). > What olpc apps currently link static to this package? Hulahop links statically, sugar use hulahop python bindings. >Your version is slightly wrong... the 'cvs' should be at the end... >http://fedoraproject.org/wiki/Packaging/NamingGuidelines#head-d97a3f40b6dd9d2288206ac9bd8f1bf9b791b22a >and there should be another digit there I think. Thanks, I'll fix it before importing. >Since you are using a cvs checkout, can you include a comment on how to check >that exact version out ? See: http://fedoraproject.org/wiki/Packaging/SourceURL We have a tarball on dev.laptop.org, is adding that as URL ok? http://dev.laptop.org/~marco/xulrunner-1.9a5pre-cvs20070519.tar.bz2
(In reply to comment #24) > So is this going to be usable for the other apps in fedora that currently > BuildRequire: firefox-devel ? If anything requires firefox-devel it is a bug. They should require gecko-devel which the firefox in rawhide provides and I made this package provide. seamonkey provides it in the place where it is a build environment, and xulrunner in rawhide/F8 will also provide it.
Looks like lots of packages didn't get that memo: repoquery -qa --srpm --repoid=development-source --whatrequires firefox-devel ruby-gnome2-0:0.16.0-6.fc8.src chmsee-0:1.0.0-0.19.beta2.fc8.src openvrml-0:0.16.5-1.fc8.src gcc-0:4.1.2-13.src liferea-0:1.2.16b-1.fc8.src eclipse-1:3.2.2-14.fc7.src kazehakase-0:0.4.7-3.fc8.src mugshot-0:1.1.45-1.fc8.src openoffice.org-1:2.2.1-18.3.fc8.src gecko-sharp2-0:0.12-1.src gnome-chemistry-utils-0:0.6.5-2.fc7.src Democracy-0:0.9.5.1-10.fc8.src gnome-python2-extras-0:2.19.1-1.fc8.src I can file bugs/poke people later unless someone else wants to.
cvs done.
I got errors while building xulrunner-1.9-5.a5pre.cvs20070519.1.src.rpm locally in Mock I got following errors for mock build against F7 repo c++ -o gfxFont.o -c -I../../../dist/include/system_wrappers -include ../../../config/gcc_hidden.h -DIMPL_THEBES -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_COM_OBSOLETE -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DOSTYPE=\"Linux2.6.21-1.3194\" -DOSARCH=Linux -DBUILD_ID=2007062123 -I../../../dist/include/cairo -I../../../dist/include/libpixman -I../../../dist/include/string -I../../../dist/include/pref -I../../../dist/include/xpcom -I../../../dist/include/unicharutil -I../../../dist/include -I../../../dist/include/thebes -I/usr/include/nspr4 -DMOZ_PNG_READ -DMOZ_PNG_WRITE -I../../../dist/sdk/include -fPIC -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -Os -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -I../../../dist/include/cairo -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I../../../dist/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -DMOZILLA_CLIENT -include ../../../mozilla-config.h -Wp,-MD,.deps/gfxFont.pp gfxFont.cpp ../../../dist/include/xpcom/nsExpirationTracker.h: In constructor 'nsExpirationTracker<T, K>::nsExpirationTracker(PRUint32)': ../../../dist/include/xpcom/nsExpirationTracker.h:109: error: there are no arguments to 'PR_STATIC_ASSERT' that depend on a template parameter, so a declaration of 'PR_STATIC_ASSERT' must be available ../../../dist/include/xpcom/nsExpirationTracker.h:109: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) gfxFont.cpp: In member function 'void gfxTextRun::Draw(gfxContext*, gfxPoint, PRUint32, PRUint32, const gfxRect*, gfxTextRun::PropertyProvider*, gfxFloat*)': gfxFont.cpp:1024: warning: unused variable 'charGlyphs' gfxFont.cpp: In member function 'void gfxTextRun::DrawToPath(gfxContext*, gfxPoint, PRUint32, PRUint32, gfxTextRun::PropertyProvider*, gfxFloat*)': gfxFont.cpp:1067: warning: unused variable 'charGlyphs' gfxFont.cpp: In member function 'gfxFont::RunMetrics gfxTextRun::MeasureText(PRUint32, PRUint32, PRBool, gfxTextRun::PropertyProvider*)': gfxFont.cpp:1184: warning: unused variable 'charGlyphs' ../../../dist/include/xpcom/nsExpirationTracker.h: In constructor 'nsExpirationTracker<T, K>::nsExpirationTracker(PRUint32) [with T = gfxFont, unsigned int K = 3u]': ../../../dist/include/thebes/gfxFont.h:159: instantiated from here ../../../dist/include/xpcom/nsExpirationTracker.h:109: error: 'PR_STATIC_ASSERT' was not declared in this scope gmake[6]: *** [gfxFont.o] Error 1
The above is familiar problem for me as I am already working on Firefox 3, I saw same error in Firefox 3 build also. If we use --enable-system-nspr then though we are using latest released nspr rpm on our Fedora but this new xulrunner and firefox 3 code have mozilla/xpcom/ds/nsExpirationTracker.h header file that uses PR_STATIC_ASSERT() which is not present in our /usr/include/nspr4/prerror.h but if we check xulrunner code then we can find same. following is patch that shows difference. =============================================================================== diff -urN /usr/include/nspr4/prerror.h /usr/src/redhat/SOURCES/mozilla/nsprpub/pr/include/prerror.h --- /usr/include/nspr4/prerror.h 2004-04-25 20:30:47.000000000 +0530 +++ /usr/src/redhat/SOURCES/mozilla/nsprpub/pr/include/prerror.h 2007-04-02 14:38:49.000000000 +0530 @@ -49,6 +49,21 @@ #include "prerr.h" /* +** Compile-time assert. "condition" must be a constant expression. +** The macro should be used only once per source line in places where +** a "typedef" declaration is allowed. +** For stringification of the line numbers where the macro is used we need some +** macro indirection. IMPL is required to get macro-expansion of __LINE__ to +** its integer value so that IMPL2 will stringify the number, not "__LINE__". +*/ +#define PR_STATIC_ASSERT(condition) \ + PR_STATIC_ASSERT_IMPL(condition, __LINE__) +#define PR_STATIC_ASSERT_IMPL(condition, line) \ + PR_STATIC_ASSERT_IMPL2(condition, line) +#define PR_STATIC_ASSERT_IMPL2(condition, line) \ + typedef int pr_static_assert_line_##line[(condition) ? 1 : -1] + +/* ** Set error will preserve an error condition within a thread context. ** The values stored are the NSPR (platform independent) translation of ** the error. Also, if available, the platform specific oserror is stored. =============================================================================== Additional Info:- Caillon, However for Firefox 3 you will find PR_STATIC_ASSERT() under mozilla/nsprpub/pr/include/prlog.h
Yeah, that's why I had system nspr disabled. Caillon, suggestions on how to go about this?
Fix nspr. Simple. Talk to kengert.
I built it with internal nspr for now (OLPC-2 branch only). I will work with kengert to get this fixed as soon as possible.
You are trying to compile beta code that is not yet supported by the system NSPR version. The code is only available on the latest NSPR branch that is heading to 4.7. Unfortunately, as of today, there is no 4.7 based release yet. I'm ok to build a new NSPR 4.6.x based RPM for Rawhide that includes the latest upstream patch. Since this is only a forward to another function, we should be fine. But note the patch quoted in comment 30 is no longer current, a different patch got landed on upstream NSPR, see bug 375985. I propose we include the following patch: Index: mozilla/nsprpub/pr/include/prlog.h diff -u mozilla/nsprpub/pr/include/prlog.h:3.14 mozilla/nsprpub/pr/include/prlog.h:3.15 --- mozilla/nsprpub/pr/include/prlog.h:3.14 Sun Apr 25 15:00:47 2004 +++ mozilla/nsprpub/pr/include/prlog.h Mon May 28 14:48:26 2007 @@ -251,6 +251,14 @@ #endif /* defined(DEBUG) || defined(FORCE_PR_ASSERT) */ +/* +** Compile-time assert. "condition" must be a constant expression. +** The macro can be used only in places where an "extern" declaration is +** allowed. +*/ +#define PR_STATIC_ASSERT(condition) \ + extern void pr_static_assert(int arg[(condition) ? 1 : -1]) + PR_END_EXTERN_C #endif /* prlog_h___ */
Package nspr-4.6.6-2 with support for PR_STATIC_ASSERT built into Rawhide.
Today I also built updated NSPR packages for FC6 and F7, and while doing so I included the PR_STATIC_ASSERT, too. However, the packages will first be visible in updates-testing. I plan to move them to final updates by mid of next week.