Re: needing install OpenOffice.org without messing up perl

2009-07-23 Thread Scott Bennett
Hi Alexey,
 On Wed, 22 Jul 2009 20:01:33 +0200 Alexey Shuvaev
shuv...@physik.uni-wuerzburg.de wrote:
On Wed, Jul 22, 2009 at 07:52:11AM -0500, Scott Bennett wrote:
  I wrote:
  Sure, but OOo is so huge and requires so much other stuff
 that there is almost certainly something it wants installed that
 I do not already have installed.
 
  Why wouldn't OOo, once installed, simply use whatever were
 installed as /usr/local/bin/perl?
  It seems to me that the bigger worry it that portmaster may
 try to rebuild it whenever a -a option is used.  portmanager, OTOH,
 has a -u option that might do the job.  portupgrade, of course,
 
  My mistake.  portmanager -u is supposed to accomplish roughly
 what portmaster -a or portupgrade -a accomplishes.  I meant to write
 portmanager -u -ip packagename rather than what I wrote before.
 
 can have all sorts of things blocked from upgrading by putting the
 proper magic into /etc/portupgrade.conf.  If only portmaster had
 a similar way of doing things.  Since so many people now advocate
 using either portmanager or portmaster to do general upgrades (-a),
 rather than portupgrade -a, I guess portmanager is the only method
 available to keep OOo from being rebuilt whenever one of its
 dependencies gets upgraded.
 
If only you have RTFM %)

 Well, I had read it, but didn't mention it because...

From man portmaster:

 /var/db/pkg/*/+IGNOREME
   If this file exists, several things will happen:

   1. The port will be ignored for all purposes, including
   dependency updates, if there is no directory for it in
   /usr/ports, and there is no entry for it in /usr/ports/MOVED.
   If the -v option is used, the fact that the port is being
   ignored will be mentioned.

   2. If using the
   -L option, and a new version exists, the existence of the
   +IGNOREME file will be mentioned.

   3. If you do a regular update of the port, or if the
   -a option is being used, you will be asked if you want to
   update the port anyway; unless the -u option is being used, in
   which case the port will be ignored.

So,
touch /var/db/pkg/openoffice.org-/+IGNOREME
would do the trick.

...I figured that the next time either cvsup or portsnap--I normally use the
latter--were run to update the ports tree, that it would correct such
changes as being discrepancies from the official version of the ports tree.
I don't want to use a method that would have to be done manually every time
I run portsnap.  If that is mistaken, please let me know.
 Also, the /etc/portupgrade.conf method allows a list of ports one does
not want automatically rebuilt to be kept in a single location, rather than
as files dispersed throughout the ports directory tree, which I grant was
not the issue I was originally posting about, but it is an advantage over
the +IGNOREME method.
 Here's a related question.  Where can I find a list/table of advantages
and disadvantages for each of portmanager, portmaster, and portupgrade?  I
don't want a flame war, just a list or table, so that I can decide for myself
which set of advantages and disadvantages will serve me best or will piss me
off least. :-)


  Scott Bennett, Comm. ASMELG, CFIAG
**
* Internet:   bennett at cs.niu.edu  *
**
* A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army.   *
*-- Gov. John Hancock, New York Journal, 28 January 1790 *
**
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: needing install OpenOffice.org without messing up perl

2009-07-23 Thread Scott Bennett
 On Wed, 22 Jul 2009 22:44:08 +0100 Matthew Seaman
m.sea...@infracaninophile.co.uk wrote:
Lowell Gilbert wrote:
 Scott Bennett benn...@cs.niu.edu writes:

  Why wouldn't OOo, once installed, simply use whatever were
 installed as /usr/local/bin/perl?
=20
 Because perl doesn't tend to be backwards-compatible.

Untrue.

perl as a language is generally very good at backwards compatibility. The=
re is
new syntax available in 5.10, but it's pretty much a superset of 5.8, so =
existing
perl programs should just work(tm).  In fact, I've not seen any problem=
s on a
swathe of machines I've updated.

{{{
   Aside::

The problem comes for applications that embed a perl interpreter.  Meanin=
g
they dynamically link against libperl.so.  OpenOffice doesn't do this as =
far
as I can tell, but eg. snmpd does:

happy-idiot-talk:~:% ldd /usr/local/sbin/snmpd=20
/usr/local/sbin/snmpd:
libnetsnmpagent.so.16 =3D /usr/local/lib/libnetsnmpagent.so.16 (=
0x28082000)
libnetsnmphelpers.so.16 =3D /usr/local/lib/libnetsnmphelpers.so.=
16 (0x280c5000)
libnetsnmpmibs.so.16 =3D /usr/local/lib/libnetsnmpmibs.so.16 (0x=
280e6000)
libwrap.so.5 =3D /usr/lib/libwrap.so.5 (0x2819b000)
libnetsnmp.so.16 =3D /usr/local/lib/libnetsnmp.so.16 (0x281a2000=
)
libcrypto.so.5 =3D /usr/local/lib/libcrypto.so.5 (0x2824f000)
libelf.so.1 =3D /usr/lib/libelf.so.1 (0x28397000)
libkvm.so.4 =3D /lib/libkvm.so.4 (0x283c)
libdevstat.so.6 =3D /lib/libdevstat.so.6 (0x283c8000)
libperl.so =3D /usr/local/lib/perl5/5.10.0/mach/CORE/libperl.so =
(0x283cd000) --
libm.so.5 =3D /lib/libm.so.5 (0x284fd000)
libcrypt.so.4 =3D /lib/libcrypt.so.4 (0x28512000)
libutil.so.7 =3D /lib/libutil.so.7 (0x2852b000)
libc.so.7 =3D /lib/libc.so.7 (0x28539000)
libz.so.4 =3D /lib/libz.so.4 (0x2863b000)
libthr.so.3 =3D /lib/libthr.so.3 (0x2864d000)

That is dependent on the version of perl installed -- not just because th=
e
version number is embedded in the path to the shlib, but also because the=

ABI can change between different versions.  In this case, you would have =
no
alternative but to recompile the app to link against a different version =
of
perl.

}}}

One way to fix the problem of dragging in an unwanted version of perl whe=
n
using precompiled packages for OpenOffice is to do the following:

 0) I'm assuming perl-5.10 is already installed

 i) Download the openoffice package you want to install.

 # setenv PKG_SITES 'ftp.freebsd.org other.site.org third.site.org'
  # pkg_fetch openoffice.org-3.1.0_2

ii) Install all required dependencies for OpenOffice /except/ for
perl-5.8 for the package you downloaded:

  # pkg_info -qr ./openoffice.org-3.1.0_2.tbz | grep -v perl | \
   cut -d ' ' -f 2 | xargs portinstall=20

   iii) Install the OpenOffice package without dependencies:

  # pkg_add -i ./openoffice.org-3.1.0_2.tbz

iv) Use pkgdb to fix the dependency linkages:

 # pkgdb -F
=20
(when prompted, substitute perl-5.10 instead of the missing perl-=
5.8
 dependency)=20

However, this is quite an inelegant approach which involves spending far =
too
much effort (It's also untested by me and quite possibly won't work at al=
l...).

 Nevertheless, I'll hang onto your message in case I end up needing to
try something like your procedure above.  Thank you very much for that.

You'ld have to do the same thing all over again if ever you need to upgra=
de
OpenOffice.  Chances are some of the dependencies you install at stage (i=

 True enough.  OOo is such a pain to deal with that I normally do *not*
upgrade OOo between releases of FreeBSD.  When I install/upgrade to a new
FreeBSD release, all the packages and ports are supposed to get trashed and
reinstalled anyway.  In between releases, I have generally kept OOo ignored
in /etc/portupgrade.conf.  I have also often done the same for all of the
X11-related stuff and only commented out those lines in /etc/portupgrade.conf
when I had the time and/or need to update that software because it takes so
many hours to rebuild and often needs intervention before it completes.  I've
now learned the lesson that perl should not be upgraded either when I can
avoid doing so.

i)
will have been updated in ports after the openoffice.org package was buil=
t:
this should do no more than cause some warning messages and maybe make yo=
u do
a bit more work at stage (iv).  Or it could just make everything break ho=
rribly.

 :-}

Note: this *won't* work in the general case -- it relies on perl scripts =
being
compatible across different versions.  Using this approach to make arbitr=
ary
substitutions in the dependencies of a package will almost certainly end =
in
tears before bedtime.

 My experience has been more like tears six to twelve hours *past*
bedtime when I needed to have slept enough to get up and take care 

Re: needing install OpenOffice.org without messing up perl

2009-07-22 Thread Scott Bennett
 Finally getting back to this...sigh...
 On Thu, 09 Jul 2009 14:10:54 -0400 Lowell Gilbert
freebsd-ports-lo...@be-well.ilk.org wrote:
Scott Bennett benn...@cs.niu.edu writes:

  What is the best way to install OpenOffice.org from a package without
 the installation trying to reinstall perl5.8 over perl5.10?

Get a package that includes them?

 Do you have any suggestions of where to find such a beast?

Short of that, you would have to install the package without
dependencies.  There is a pkg_add option to do this, but the 

 Sure, but OOo is so huge and requires so much other stuff
that there is almost certainly something it wants installed that
I do not already have installed.

trick comes afterwards, when you have to fix it up to use the 
perl you actually have (perl-after-upgrade(1) might be able to
handle this, but you have no guarantees.).  Or you could just 

 Why wouldn't OOo, once installed, simply use whatever were
installed as /usr/local/bin/perl?
 It seems to me that the bigger worry it that portmaster may
try to rebuild it whenever a -a option is used.  portmanager, OTOH,
has a -u option that might do the job.  portupgrade, of course,
can have all sorts of things blocked from upgrading by putting the
proper magic into /etc/portupgrade.conf.  If only portmaster had
a similar way of doing things.  Since so many people now advocate
using either portmanager or portmaster to do general upgrades (-a),
rather than portupgrade -a, I guess portmanager is the only method
available to keep OOo from being rebuilt whenever one of its
dependencies gets upgraded.

install both perl versions; they should be able to coexist 
just fine.

 That would be nice and reasonably simple if it were an option.
Unfortunately, the two versions are incompatible.


  Scott Bennett, Comm. ASMELG, CFIAG
**
* Internet:   bennett at cs.niu.edu  *
**
* A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army.   *
*-- Gov. John Hancock, New York Journal, 28 January 1790 *
**
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: needing install OpenOffice.org without messing up perl

2009-07-22 Thread Scott Bennett
 I wrote:
 Finally getting back to this...sigh...
 On Thu, 09 Jul 2009 14:10:54 -0400 Lowell Gilbert
freebsd-ports-lo...@be-well.ilk.org wrote:
Scott Bennett benn...@cs.niu.edu writes:

  What is the best way to install OpenOffice.org from a package without
 the installation trying to reinstall perl5.8 over perl5.10?

Get a package that includes them?

 Do you have any suggestions of where to find such a beast?

Short of that, you would have to install the package without
dependencies.  There is a pkg_add option to do this, but the 

 Sure, but OOo is so huge and requires so much other stuff
that there is almost certainly something it wants installed that
I do not already have installed.

trick comes afterwards, when you have to fix it up to use the 
perl you actually have (perl-after-upgrade(1) might be able to
handle this, but you have no guarantees.).  Or you could just 

 Why wouldn't OOo, once installed, simply use whatever were
installed as /usr/local/bin/perl?
 It seems to me that the bigger worry it that portmaster may
try to rebuild it whenever a -a option is used.  portmanager, OTOH,
has a -u option that might do the job.  portupgrade, of course,

 My mistake.  portmanager -u is supposed to accomplish roughly
what portmaster -a or portupgrade -a accomplishes.  I meant to write
portmanager -u -ip packagename rather than what I wrote before.

can have all sorts of things blocked from upgrading by putting the
proper magic into /etc/portupgrade.conf.  If only portmaster had
a similar way of doing things.  Since so many people now advocate
using either portmanager or portmaster to do general upgrades (-a),
rather than portupgrade -a, I guess portmanager is the only method
available to keep OOo from being rebuilt whenever one of its
dependencies gets upgraded.

install both perl versions; they should be able to coexist 
just fine.

 That would be nice and reasonably simple if it were an option.
Unfortunately, the two versions are incompatible.


  Scott Bennett, Comm. ASMELG, CFIAG
**
* Internet:   bennett at cs.niu.edu  *
**
* A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army.   *
*-- Gov. John Hancock, New York Journal, 28 January 1790 *
**
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: needing install OpenOffice.org without messing up perl

2009-07-22 Thread Alexey Shuvaev
On Wed, Jul 22, 2009 at 07:52:11AM -0500, Scott Bennett wrote:
  I wrote:
  Sure, but OOo is so huge and requires so much other stuff
 that there is almost certainly something it wants installed that
 I do not already have installed.
 
  Why wouldn't OOo, once installed, simply use whatever were
 installed as /usr/local/bin/perl?
  It seems to me that the bigger worry it that portmaster may
 try to rebuild it whenever a -a option is used.  portmanager, OTOH,
 has a -u option that might do the job.  portupgrade, of course,
 
  My mistake.  portmanager -u is supposed to accomplish roughly
 what portmaster -a or portupgrade -a accomplishes.  I meant to write
 portmanager -u -ip packagename rather than what I wrote before.
 
 can have all sorts of things blocked from upgrading by putting the
 proper magic into /etc/portupgrade.conf.  If only portmaster had
 a similar way of doing things.  Since so many people now advocate
 using either portmanager or portmaster to do general upgrades (-a),
 rather than portupgrade -a, I guess portmanager is the only method
 available to keep OOo from being rebuilt whenever one of its
 dependencies gets upgraded.
 
If only you have RTFM %)
From man portmaster:

 /var/db/pkg/*/+IGNOREME
   If this file exists, several things will happen:

   1. The port will be ignored for all purposes, including
   dependency updates, if there is no directory for it in
   /usr/ports, and there is no entry for it in /usr/ports/MOVED.
   If the -v option is used, the fact that the port is being
   ignored will be mentioned.

   2. If using the
   -L option, and a new version exists, the existence of the
   +IGNOREME file will be mentioned.

   3. If you do a regular update of the port, or if the
   -a option is being used, you will be asked if you want to
   update the port anyway; unless the -u option is being used, in
   which case the port will be ignored.

So,
touch /var/db/pkg/openoffice.org-/+IGNOREME
would do the trick.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: needing install OpenOffice.org without messing up perl

2009-07-22 Thread Lowell Gilbert
Scott Bennett benn...@cs.niu.edu writes:

  Finally getting back to this...sigh...
  On Thu, 09 Jul 2009 14:10:54 -0400 Lowell Gilbert
 freebsd-ports-lo...@be-well.ilk.org wrote:
Scott Bennett benn...@cs.niu.edu writes:

  What is the best way to install OpenOffice.org from a package without
 the installation trying to reinstall perl5.8 over perl5.10?

Get a package that includes them?

  Do you have any suggestions of where to find such a beast?

Wait?  The official packages will match this description eventually.  

I could offer you the package I built, which matches this description.
It takes a day to build, but it doesn't take any of my attention while
it does so.  And you'd have to live with whatever other options I'd
chosen.

Short of that, you would have to install the package without
dependencies.  There is a pkg_add option to do this, but the 

  Sure, but OOo is so huge and requires so much other stuff
 that there is almost certainly something it wants installed that
 I do not already have installed.

Um, possibly, but you can look at the port makefile and load them on
your own.  Or you could let OpenOffice install perl5.8, then delete it
afterwards and fix up the dependency databases.

trick comes afterwards, when you have to fix it up to use the 
perl you actually have (perl-after-upgrade(1) might be able to
handle this, but you have no guarantees.).  Or you could just 

  Why wouldn't OOo, once installed, simply use whatever were
 installed as /usr/local/bin/perl?

Because perl doesn't tend to be backwards-compatible.

install both perl versions; they should be able to coexist 
just fine.

  That would be nice and reasonably simple if it were an option.
 Unfortunately, the two versions are incompatible.

Oops, sorry; that's right.

I guess you could get out a bigger hammer, but editing the package
directly to change the dependency is probably easier.  You'll still need
to fix up the scripts afterwards.

Good luck.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: needing install OpenOffice.org without messing up perl

2009-07-22 Thread Matthew Seaman

Lowell Gilbert wrote:

Scott Bennett benn...@cs.niu.edu writes:



 Why wouldn't OOo, once installed, simply use whatever were
installed as /usr/local/bin/perl?


Because perl doesn't tend to be backwards-compatible.


Untrue.

perl as a language is generally very good at backwards compatibility. There is
new syntax available in 5.10, but it's pretty much a superset of 5.8, so 
existing
perl programs should just work(tm).  In fact, I've not seen any problems on a
swathe of machines I've updated.

{{{
  Aside::

The problem comes for applications that embed a perl interpreter.  Meaning
they dynamically link against libperl.so.  OpenOffice doesn't do this as far
as I can tell, but eg. snmpd does:

happy-idiot-talk:~:% ldd /usr/local/sbin/snmpd 
/usr/local/sbin/snmpd:

   libnetsnmpagent.so.16 = /usr/local/lib/libnetsnmpagent.so.16 
(0x28082000)
   libnetsnmphelpers.so.16 = /usr/local/lib/libnetsnmphelpers.so.16 
(0x280c5000)
   libnetsnmpmibs.so.16 = /usr/local/lib/libnetsnmpmibs.so.16 (0x280e6000)
   libwrap.so.5 = /usr/lib/libwrap.so.5 (0x2819b000)
   libnetsnmp.so.16 = /usr/local/lib/libnetsnmp.so.16 (0x281a2000)
   libcrypto.so.5 = /usr/local/lib/libcrypto.so.5 (0x2824f000)
   libelf.so.1 = /usr/lib/libelf.so.1 (0x28397000)
   libkvm.so.4 = /lib/libkvm.so.4 (0x283c)
   libdevstat.so.6 = /lib/libdevstat.so.6 (0x283c8000)
   libperl.so = /usr/local/lib/perl5/5.10.0/mach/CORE/libperl.so (0x283cd000) 
--
   libm.so.5 = /lib/libm.so.5 (0x284fd000)
   libcrypt.so.4 = /lib/libcrypt.so.4 (0x28512000)
   libutil.so.7 = /lib/libutil.so.7 (0x2852b000)
   libc.so.7 = /lib/libc.so.7 (0x28539000)
   libz.so.4 = /lib/libz.so.4 (0x2863b000)
   libthr.so.3 = /lib/libthr.so.3 (0x2864d000)

That is dependent on the version of perl installed -- not just because the
version number is embedded in the path to the shlib, but also because the
ABI can change between different versions.  In this case, you would have no
alternative but to recompile the app to link against a different version of
perl.

}}}

One way to fix the problem of dragging in an unwanted version of perl when
using precompiled packages for OpenOffice is to do the following:

0) I'm assuming perl-5.10 is already installed

i) Download the openoffice package you want to install.

  # setenv PKG_SITES 'ftp.freebsd.org other.site.org third.site.org'
 # pkg_fetch openoffice.org-3.1.0_2

   ii) Install all required dependencies for OpenOffice /except/ for
   perl-5.8 for the package you downloaded:

 # pkg_info -qr ./openoffice.org-3.1.0_2.tbz | grep -v perl | \
	cut -d ' ' -f 2 | xargs portinstall 


  iii) Install the OpenOffice package without dependencies:

 # pkg_add -i ./openoffice.org-3.1.0_2.tbz

   iv) Use pkgdb to fix the dependency linkages:

  # pkgdb -F

   (when prompted, substitute perl-5.10 instead of the missing perl-5.8
dependency) 


However, this is quite an inelegant approach which involves spending far too
much effort (It's also untested by me and quite possibly won't work at all...).
You'ld have to do the same thing all over again if ever you need to upgrade
OpenOffice.  Chances are some of the dependencies you install at stage (ii)
will have been updated in ports after the openoffice.org package was built:
this should do no more than cause some warning messages and maybe make you do
a bit more work at stage (iv).  Or it could just make everything break horribly.

Note: this *won't* work in the general case -- it relies on perl scripts being
compatible across different versions.  Using this approach to make arbitrary
substitutions in the dependencies of a package will almost certainly end in
tears before bedtime.

Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


needing install OpenOffice.org without messing up perl

2009-07-09 Thread Scott Bennett
 What is the best way to install OpenOffice.org from a package without
the installation trying to reinstall perl5.8 over perl5.10?
 Please copy me in on any responses, as well as to the list.  Thanks!


  Scott Bennett, Comm. ASMELG, CFIAG
**
* Internet:   bennett at cs.niu.edu  *
**
* A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army.   *
*-- Gov. John Hancock, New York Journal, 28 January 1790 *
**
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: needing install OpenOffice.org without messing up perl

2009-07-09 Thread Lowell Gilbert
Scott Bennett benn...@cs.niu.edu writes:

  What is the best way to install OpenOffice.org from a package without
 the installation trying to reinstall perl5.8 over perl5.10?

Get a package that includes them?

Short of that, you would have to install the package without
dependencies.  There is a pkg_add option to do this, but the 
trick comes afterwards, when you have to fix it up to use the 
perl you actually have (perl-after-upgrade(1) might be able to
handle this, but you have no guarantees.).  Or you could just 
install both perl versions; they should be able to coexist 
just fine.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org