Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Nov 2005 05:09:12 -0800
From:      "Michael C. Shultz" <ringworm01@gmail.com>
To:        Jan Grant <Jan.Grant@bristol.ac.uk>, freebsd-stable@freebsd.org
Subject:   Re: gnome-upgrade.sh
Message-ID:  <200511110509.13451.ringworm01@gmail.com>
In-Reply-To: <Pine.GSO.4.62.0511110929440.19268@mail.ilrt.bris.ac.uk>
References:  <43726E40.3090701@iaces.com> <200511100943.30024.ringworm01@gmail.com> <Pine.GSO.4.62.0511110929440.19268@mail.ilrt.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 11 November 2005 01:43, Jan Grant wrote:
> Hope you don't mind me taking you up on your offer to someone else :-) -
> this is more of a feature request from a portupgrade user who'd like to
> migrate.
>
> On Thu, 10 Nov 2005, Michael C. Shultz wrote:
> > On Thursday 10 November 2005 09:42, Paul T. Root wrote:
> > > I moved the machine to a DSL line here, and am running
> > > portmanager. It seems to be working.
> > >
> > > We're going to investigate issues with this beta Cisco
> > > ASA machine.
> >
> > I am very interested at how things go with your upgrade,
> > please keep me informed.  Just to let you know, the current
> > version of portmanager is 0.3.3_2 if anything goes wrong check
> > that first "portmanager -v".   If any problems arise I am more
> > than happy to work with you in solving them quickly.
>
> I've been very interested in portmanager, but I'm facing a large
> migration task because I've come from a portupgrade environment (and the
> pain of migrating to portupgrade was bad enough :-) )
>
> Ideally I'd like to be able to manage my portupgrade rules and derive
> portmanager rules directly (at least for an interim period). There are a
> couple of things which stop me shifting over (which I'd like to do,
> since portupgrade still requires manual intervention too often). Note I
> don't have what I'd describe as a _complex_ portupgrade configuration,
> just a _large_ one.
>
> Firstly: unfortunately I believe that the wildcard-matching facility
> available in pkgtools.conf isn't available in portmanager (I can't tell
> from the man page or the sample, but it looks like that's not the case).
>
> My pkgtools.conf has hundreds(! - busy workstation) of entries along
> these lines - some entries apply to several ports, and the portupgrade
> toolset just basically uses the union of all matching rules:
>
> [[[
>   '*/*' => 'BATCH=yes',
>   '*/kde*' => 'WITH_KDE_DEBUG=yes',
>   'databases/p5-DBI' => 'WITH_PROXY=yes',
>   'deskutils/kdepim3' => 'WITH_KPILOT=yes',
>   'devel/gnomevfs2' => 'WITH_X11=yes',
>   'devel/sdl12' => 'WITH_X11=yes',
>   'devel/subversion' => 'WITH_PYTHON=yes WITH_MOD_DAV_SVN=yes
> WITHOUT_BDB=yes', ]]]
>
> ... and so on; so deskutils/kdepim3 gets built with
> 	BATCH=yes WITH_KPILOT=yes WITH_KDE_DEBUG=yes
> but more importantly, any future kde packages also get
> WITH_KDE_DEBUG=yes automatically.
>
> It'd be convenient if portmanager supported the same wildcard
> ability (it'd make the script to migrate settings from pkgtools.conf to
> portmanager much more straightforward).
>
> The second issue is the AFTERINSTALL feature of pkgtools.conf; although
> I make much less use of this, it's really handy to be able to specify
> things like:
>
> [[[
> AFTERINSTALL = {
>  'www/jakarta-tomcat5' => 'chmod a-x
> /usr/local/etc/rc.d/020.jakarta-tomcat*.sh', # ... etc
> }
> ]]]
>
> which let me encapsulate common small tweaks, post-installation.
>
> Do you have any suggestions about either of these? Lacking CFT at the
> moment or I'd dive into the source.

Port build options are covered in man portmanager(1). You didn't provide an 
example where wild cards are used so I'm not sure what you mean there.

Here is how to handle this one:

> AFTERINSTALL = {
>  'www/jakarta-tomcat5' => 'chmod a-x
> /usr/local/etc/rc.d/020.jakarta-tomcat*.sh', # ... etc
> }

from portmanager(1) setting up pm-020.conf

      #
      # STOP/START these programs if they are updated
      #
      # Stop command will be run after program is built, before
      # old installed version is removed
      #
      # Start command will be run after rebuilt program is
      # installed and successfully registerd
      #
      # note:
      #   must have leading "/" in /{category}/{port dir}
      #   anything after  /{category}/{port dir} is run as
      #   a sh shell command
      #
      #STOP|/mail/postfix /usr/local/sbin/postfix stop|
      #START|/mail/postfix /usr/local/sbin/postfix start|

In your case you would do this:

STOP| www/jakarta-tomcat5 /usr/local/etc/rc.d/020.jakarta-tomcat*.sh|

Stopping/starting is a new feature just introduced in 0.3.3_3.

-Mike



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511110509.13451.ringworm01>