Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 May 2010 22:44:05 +0300
From:      Ion-Mihai Tetcu <itetcu@FreeBSD.org>
To:        Brad Waite <freebsd@wcubed.net>
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: new port config in /etc?
Message-ID:  <20100501224405.764e7368@it.buh.tecnik93.com>
In-Reply-To: <4BDC62A4.90603@wcubed.net>
References:  <4BDC62A4.90603@wcubed.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/1UFa2FmYo02hT6ihW0dqH5y
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Sat, 01 May 2010 11:19:32 -0600
Brad Waite <freebsd@wcubed.net> wrote:

> I'm attempting to port FreePBX (asterisk GUI) which is built for
> CentOS.  The config file is hard coded in a number to be
> "/etc/amportal.conf".  I changed all occurrences to
> "${LOCALBASE}/etc/amportal.conf" and made patch files for the port.

s/LOCALBASE/PREFIX/

> That worked for the original build, but FreePBX has a built-in
> upgrade feature which can replace any of those patches files with
> upgraded versions.  Of course, the new files are using the old
> "/etc/amportal.conf".
>=20
> What's the best way to handle this?  Should I have the port create a
> symlink from /etc/amportal.conf to /usr/local/etc/amportal.conf?
> That seems to be the simplest solution, but also vaguely feels like
> The Wrong Thing(tm).
>=20
> Trying to patch the newly upgraded files would be a nightmare.  I
> could try to do a search/replace on the known directories, but
> there's no way to be sure there aren't new dirs created and used in
> the upgrade.  Obviously a recursive search from / is impractical.
> And what would trigger this replacement anyway?  I could build it in
> to the initial version via patch file, but that file could be updated
> in the upgrade.
>=20
> In a similar situation, there's a handful of files that have
> a /bin/bash or /bin/perl shebang that were upgraded as well.

Maybe you can disable auto-update? Or maybe you can wrap it into a
script, make it run inside a chroot and patch and then move the files
in the right place?

--=20
IOnut - Un^d^dregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"
FreeBSD committer -> itetcu@FreeBSD.org, PGP Key ID 057E9F8B493A297B

--Sig_/1UFa2FmYo02hT6ihW0dqH5y
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAkvchIUACgkQJ7GIuiH/oeXelQCgiVZlgM0l9IufwsFqzGzeqqbf
f2IAnR90akZYtk98LI3AkxvArgA1+yLM
=+HYC
-----END PGP SIGNATURE-----

--Sig_/1UFa2FmYo02hT6ihW0dqH5y--



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