Closed Bug 65218 Opened 24 years ago Closed 15 years ago

mozilla/xpinstall/packager/Makefile does not know how to make a Solaris package

Categories

(Firefox Build System :: General, defect, P5)

Sun
Solaris
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: roland.mainz, Assigned: roland.mainz)

References

(Depends on 1 open bug)

Details

Attachments

(2 files)

As the subject says... mozilla/xpinstall/packager/Makefile does not know how to
make a Solaris package (e.g. something to pkgadd).

If noone if working on this I can write that little piece of code... :-)

Question is if there is something else to-do beyond the normal "copy to
/usr/local/mozilla" (registering components for example)...

Any hints ?
this is a build/config issue.  resetting bug to default owner of build/config.
Assignee: ssu → cls
Component: Installer → Build Config
QA Contact: gemal → granrose
None of the other package formats do any sort of reqistration.  You might,
however, want to consider running regxpcom & regchrome in a post-installation
script otherwise you'll probably hit many of the problems cited in bug 41057.
Assignee: cls → Roland.Mainz
Is this enougth:
-- snip --
% export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
% regxpcom
% regchrome
-- snip --

Is there any way how I can check for postsinstall errors ?
Status: NEW → ASSIGNED
That may work.  I have no idea how to check those for post install errors. 
Check $? maybe?
Uhm... shell programming is not the problem. 
Question is if these tools set the exit code to EXIT_FAILURE&co. if something
goes wrong...
Testing:
-- snip --
./regxpcom 
Warning: MOZILLA_FIVE_HOME not set.
RegSelf Shift_JIS to Unicode converter complete
RegSelf EUC-JP to Unicode converter complete
RegSelf ISO-2022-JP to Unicode converter complete
RegSelf Unicode to Shift_JIS converter complete
RegSelf Unicode to EUC-JP converter complete
RegSelf Unicode to ISO-2022-JP converter complete
RegSelf Unicode to jis_0201 converter complete
RegSelf Unicode to jis_0208-1983 converter complete
RegSelf Unicode to jis_0212-1990 converter complete
RegSelf Unicode to Big5 converter complete
RegSelf Unicode to x-x-big5 converter complete
RegSelf Big5 to Unicode converter complete
**************************************************
nsNativeComponentLoader:
SelfRegisterDll(/home/gisburn/tmp/moz07/package/components/libgfxxprt.so) Load
FAILED with error: ld.so.1: ./regxpcom: fatal: relocation error: file
/home/gisburn/tmp/moz07/package/components/libgfxxprt.so: symbol
GetAppUnitsToDevUnits__C17DeviceContextImplRf: referenced symbol not found
**************************************************
Registering lineterm interface
Registering xmlterm shell interface
*** Deferring registration of sample JS components
registerSelf for remoteControl
*** Registering -chat handler.
*** Registering x-application-irc handler.
*** Registering irc protocol handler.
*** Registering -terminal handler.
*** Registering x-application-telnet handler.
*** Registering telnet protocol handler.
*** Registering sample JS components
*** Unloading sample JS components
-- snip --

The error above does not look very healthy... ;-(
regchrome looks good, no errors...

Running Mozilla - no luck:
-- snip --
gisburn@castor/usr/local/mozilla5% ./mozilla
./run-mozilla.sh ./mozilla-bin
MOZILLA_FIVE_HOME=.
 
LD_LIBRARY_PATH=.:/usr/local/staden/lib/solaris-binaries:/usr/local/lib:/usr/local/rvplayer5.0:/usr/local/arb/lib:/usr/local/mozilla5
     LIBRARY_PATH=.:./components
       SHLIB_PATH=.
          LIBPATH=.
       ADDON_PATH=.
      MOZ_PROGRAM=./mozilla-bin
      MOZ_TOOLKIT=
        moz_debug=0
     moz_debugger=

Gdk-WARNING **: shmat failed!

Gdk-WARNING **: shmat failed!
Registering plugin 0 for: "application/x-java-vm","Java(tm) Plug-in",""
Registering plugin 1 for: "application/x-java-applet","Java(tm) Plug-in",""
Registering plugin 2 for: "application/x-java-applet;version=1.1","Java(tm)
Plug-in",""
Registering plugin 3 for: "application/x-java-applet;version=1.1.1","Java(tm)
Plug-in",""
Registering plugin 4 for: "application/x-java-applet;version=1.1.2","Java(tm)
Plug-in",""
Registering plugin 5 for: "application/x-java-applet;version=1.1.3","Java(tm)
Plug-in",""
Registering plugin 6 for: "application/x-java-applet;version=1.2","Java(tm)
Plug-in",""
Registering plugin 7 for: "application/x-java-applet;version=1.2.1","Java(tm)
Plug-in",""
Registering plugin 8 for: "application/x-java-applet;version=1.2.2","Java(tm)
Plug-in",""
Registering plugin 9 for: "application/x-java-applet;version=1.3","Java(tm)
Plug-in",""
Registering plugin 10 for:
"application/x-java-applet;jpi-version=1.3.0_01","Java(tm) Plug-in",""
Registering plugin 11 for: "application/x-java-bean","Java(tm) Plug-in",""
Registering plugin 12 for: "application/x-java-bean;version=1.1","Java(tm)
Plug-in",""
Registering plugin 13 for: "application/x-java-bean;version=1.1.1","Java(tm)
Plug-in",""
Registering plugin 14 for: "application/x-java-bean;version=1.1.2","Java(tm)
Plug-in",""
Registering plugin 15 for: "application/x-java-bean;version=1.1.3","Java(tm)
Plug-in",""
Registering plugin 16 for: "application/x-java-bean;version=1.2","Java(tm)
Plug-in",""
Registering plugin 17 for: "application/x-java-bean;version=1.2.1","Java(tm)
Plug-in",""
Registering plugin 18 for: "application/x-java-bean;version=1.2.2","Java(tm)
Plug-in",""
Registering plugin 19 for: "application/x-java-bean;version=1.3","Java(tm)
Plug-in",""
Registering plugin 20 for:
"application/x-java-bean;jpi-version=1.3.0_01","Java(tm) Plug-in",""
Registering plugin 0 for: "*","All types",".*"
-- snip --

Stack trace:
-- snip --
18438:  ./mozilla-bin
-----------------  lwp# 1 / thread# 1  --------------------
 fef15f50 poll     (2260a8, 5, ffffffff)
 fee5b438 poll     (ffffffff, 0, 0, 14ab18, ff3df650, 378) + 34
 fd8b7710 g_main_iterate (1, 1, fed01c0c, fde26a5c, ff3df650, 1b) + 7b8
 fd8b7f64 g_main_run (14a938, 14a938, 1, fde26ae8, 0, 1) + 104
 fdbd60a0 gtk_main (76488, fde2682c, fdf2755c, 61588, fdf19658, 1) + 1b8
 fde26a5c Run__10nsAppShell (5ff10, fde26a24, 5ff10, 1, 1, 8000ffe) + 38
 fdf1e144 Run__17nsAppShellService (621e0, fdf1e130, 621e0, 1, 1, 8000ffe) + 14
 fd548bb8 LoadDefaultProfileDir__9nsProfileR9nsCString (0, ffbee5d8, ffbee5d4,
ffbee5d8, 0, 0) + 4b8
 fd5486c8 StartupWithArgs__9nsProfileP17nsICmdLineService (99478, ffbee5d8,
99478, fd548644, ff21130c, 1) + 84
 00016670 ???????? (0, ffbee720, 80000000, fdf1d490, fef3af58, 3f8)
 00016ea0 ???????? (0, ff2cb610, 0, 2, d4, 100d4)
 0001787c main     (0, ffbeea44, ffbeea4c, 372a8, 0, 0) + 15c
 00014258 _start   (0, 0, 0, 0, 0, 0) + 5c
-----------------  lwp# 2 / thread# 2  --------------------
 fef17704 signotifywait ()
 fee4f79c _dynamiclwps (fee6ca0c, fee6e344, 2, 0, fef33bb0, 0) + 1c
 fee5278c thr_yield (0, 0, 0, 0, 0, 0) + 8c
-----------------  lwp# 3 / thread# 4  --------------------
 fef15f50 poll     (fd531bc8, 1, 88b8)
 fee5b438 poll     (1226f0, 1, 3567e0, aaaaaaaa, 0, fef33bb0) + 34
 fd3da340 Run__24nsSocketTransportService (d0148, 80470007, d014c, fee6ca0c,
fee6fc38, cd9b5) + 54
 ff21869c Main__8nsThreadPv (d3000, ff218674, 1, fee6ca0c, 4, d0bf8) + 28
 ff0537ec ???????? (d0bf8, fed25d68, 1, fee7973c, 0, fed15dc8)
 fee5bcec _thread_start (d0bf8, 0, 0, 0, 0, 0) + 40
-----------------  lwp# 4 / thread# 5  --------------------
 fef17d34 lwp_sema_wait (fd021e78)
 fee4b1c8 _park    (fd021dc8, fd021e78, 0, 1, fee6d7a0, 0) + 10c
 fee4aebc _swtch   (5, fee6ca0c, fd021e58, fd021e54, fd021e50, fd021e4c) + 350
 fee49b64 cond_wait (94290, 1222d8, 4356, fee6ca0c, 0, ff200884) + bc
 fee49a88 pthread_cond_wait (94290, 1222d8, 9, 0, 0, fd3d4bbc) + 8
 ff04ede0 PR_WaitCondVar (94288, ffffffff, 1215b8, ff1e9658, fef3a560, 5a2c8) +
64
 ff219474 GetRequest__12nsThreadPoolP9nsIThread (d0b98, 13b228, 0, 0, 0,
fef33bb0) + 120
 ff219be4 Run__20nsThreadPoolRunnable (0, ff219bbc, 14a870, fee6ca0c, fee6fc38,
14de8d) + 28
 ff21869c Main__8nsThreadPv (13b228, ff218674, 1, fee6ca0c, 4, 135538) + 28
 ff0537ec ???????? (135538, fed15d68, 1, fee7973c, 0, fed15dc8)
 fee5bcec _thread_start (135538, 0, 0, 0, 0, 0) + 40
-----------------  lwp# 5  --------------------------------
 fef152dc door     (0, 0, 0, 0, fd705d68, 4)
 fee4bd9c _lwp_start (6000, fed15bcc, fee6d7e0, fee6d7c8, fee6ca0c, fed15ac0) +
14
 fee5278c thr_yield (0, 0, 0, 0, 0, 0) + 8c
-----------------  lwp# 6  --------------------------------
 fef17ce8 lwp_cond_wait (fee73f50, fee73f60, fd193c98)
 fef0fa78 _lwp_cond_timedwait (fee73f50, fee73f60, 0, 3a626951, 0, 0) + 90
 fee4a8ac _age     (fee6ca0c, fee6d794, fee6e030, fee6e048, 3, fee6ca0c) + 90
 fee4bd9c _lwp_start (4000, fec0fc84, fee6d7e0, fee6d7c8, fee6ca0c, fec0fb78) +
14
 fee5278c thr_yield (0, 0, 0, 0, 0, 0) + 8c
--------------------------  thread# 3  --------------------
 fee4e830 _reap_wait (fee713b0, 1e490, 0, 0, 0, 0) + 34
 fee4e5ac _reaper  (fee6ca0c, fee713b0, fee6d810, 3736c, 1, fe400000) + 34
 fee5bcec _thread_start (0, 0, 0, 0, 0, 0) + 40
-- snip --

And hangs there "forever" (at least the last 70mins)...

And ideas ?
OK, Solaris build scripts are ready and working, but...
...without getting it working for normal users working on read-only
/usr/local/mozilla5 (=bug 41057) it will be useless... ;-(
Depends on: 41057
Added TGZ archive with my "prototype" scripts.
Build script assumes that there is a package/ subdir from a normal Mozilla
tar.gz package build. Script verifies some things, creates list of files, builds
package and checks it - that's all (except the bugs listed in 
./makemozsolarispkg).

Known bugs:
 - files created by postinstall are not included in package database
   (this includes component.reg and some *.rdf files)
 - script modifies permissions of package/ ($MYPACKAGE) dir contents
 - /usr/bin/pkgproto has no "easy" way top force user/group;
   awk is used to strip owner/group from output of /usr/bin/pkgproto, but
   there is no pkgproto(4) manual page which says "OK, you're allowed 
   to-do so"

1. most important bug - people like to get rid of the packages _cleanly_: is
there a way how I can find all files created by registration in a _safe_ way
(please, no timestamp stunts) ?
2. 2nd bug is more or less a NOP
3. 3rd bug: Need comment from a Sun engineer - in fact it's working but there is
no spec which says: It's OK... :-)
4. Script copies libstdc++ into Mozilla libdir - this is evil but not avoidable
unless we switch from gcc to Sun Workshop...

WARNING: Do not play with the "postinstall" script unless you _know_ what you
are doing!! (future versions may modify the package database to include files
created by postinstall - killing the package database in Solaris is one of the
worst things I can imagine (from the view as an Admin)).

ToDo-List:
- What about Solaris patches (e.g. something to patchadd for GISWmoz5 package) -
and how to integrate them into package creation makefiles... ?
adding ed for any Sun commentary.
Depends on: 42792
Thanks Jonathan, let me add Ashu and Girish, two people who have worked with 
XPInstall and Solaris Packages.
Sorry about the spam. An unset priority should be less than P5.  
Priority: -- → P5
Any comments/updates about the attached scripts ?
Updated scripts for Mozilla .08:
now Mozilla .08 works from a readonly-mounted filesystem (see postpatch script
changes) and "makemozsolarispkg" copies all libs in /usr/local/lib required by
Mozilla binaries/libs into distribution package... :-)

In theory I could make a package now - but there's bug 69362 which prevents me
from shipping a working Xprint - and without it: No package !! Grrrr... ;-(
I do not think we should be packaging any system libs or 3rd party libraries. 
If users need them, point them to the proper site (http://www.sunfreeware.com)
to get those dependencies.  I'll test them as soon as I get back on a solaris box.
> I do not think we should be packaging any system libs or 3rd party libraries

I theory I would agree with you - unfortunately there's currently no way around
shipping GTK+ libs - there is no (guranteed) binary compatibility between minor
revs of the GTK+ libs if you compile them yourself. I either have to replace my
own builds with those from Sunfreeware or add missing libs in the builds to
avoid binary compatibility hell... ;-((
And yet we ship without bundled gtk libraries on every other unix platform and
binary compatibility does not seem to be a problem.  If you think your build
requires a version of gtk built with specific options, then note that in the
requirements documentation and provide the libraries separately if you must. 
Bundling the libraries will give the user the impression that a) we have our own
special set of glib/gtk libraries that must be used with the product and b) that
we support those libraries as we do the rest of the product.  Neither of these
is true.
Depends on: 116669
This ticket has been open for a while.
Here is my view on the situation as it is today:
Mozilla builds ok(-ish) under Solaris 8 and 9, using either Forte7EA or GCC.
What I do next is:

mkdir fakeroot; gmake DESTDIR=`pwd`/fakeroot install (still as a normal user)

Although quite a bit of code does get recompiled, I have a complete mozilla
install below the fakeroot directory a while later.

cd fakeroot; pkgproto usr/local= |awk '{$5="root"; $6="other"; print $0}' >prototype
(The awk just sets the ownership of each file in the package)

Create a pkginfo with the BASEDIR set to /usr/local (see earlier comments in
this thread for an example) and add it to the prototype file:
echo "i ./pkginfo" >>prototype

Then create the package using
pkgmk -o
This creates the package in /var/spool/pkg as a directory package.

Only now do you need root-access, to do a 
pkgadd Mozilla
which installs the package from /var/spool/pkg, with all files under /usr/local.

Drop superuser privileges again, and start Mozilla from /usr/local/bin... 
Works For Me!

These simple steps could be scripted. I could do that, if someone can give some
pointers on the proper place inside the tree such a tool should live, what it
should be called etc.
The advantage of this method is that it needs no knowledge at all about what
files will be in the package, and one doesn't need to be root to create the
package.
The Mozilla package as I made it doesn't need a postinstall as far as I can see.

Any comments please?
Product: Browser → Seamonkey
Roland,
Are you still working on this ?
Product: SeaMonkey → Core
QA Contact: granrosebugs → build-config
This code is no longer.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: