On my FreeBSD system, my apache
webserver would get angry whenever I update the php
& extensions ports. Requiring a bunch of other operations after the 'portmaster -a
'.
Since I've been playing around with CFEngine 3, I had started to add to my "bundle agent apache
", to do more than just promise config files current, process running, reloads, etc.
So, one of the first problems I had run into on FreeBSD, is that there are certain extensions that need to be in order in '/usr/local/etc/php/extension.ini
'. Which is solved by using fixphpextorder.sh
.
Well, fortunately when this script is run it results in a backup file of 'extensions.ini.old
' which is the same age or newer than 'extennsions.ini
'.
CFEngine3 can take care of it this way:
Code
vars: | |
| |
"ext_dir" string => "/usr/local/etc/php"; | |
| |
"ext_file" string => "extensions.ini"; | |
| |
"fix_php_ext" string => "/usr/local/etc/fixphpextorder.sh"; | |
| |
classes: | |
| |
"need_fix_php" expression => isnewerthan("$(ext_dir)/$(ext_file)","$(ext_dir)/$(ext_file).old"); | |
| |
commands: | |
| |
need_fix_php:: | |
| |
"$(fix_php_ext)" contain => in_dir("$(ext_dir)"); | |
| |
"$(g.lrc_d)/$(g.apache) graceful"; |
g.apache
is "apache22
" currently on FreeBSD, and "apache2
" on Ubuntu. Someday it might become "apache24
" on FreeBSD.
Since I did FreeBSD first, and I'm still working on getting my one of 4 (or less) Ubuntu rolled in, I have:
g.rc_d
as "/etc/rc.d
" and g.lrc_d
as "/usr/local/etc/rc.d
" for FreeBSD. They are both set to "/etc/init.d
" for Ubuntu. I also have a g.init_d
for Ubuntu, but not FreeBSD. Not sure which I'll use where....I suppose if its an OS specific case, g.init_d
would get used and if its not...then which ever one is the correct one for FreeBSD will get used.
Pages: 1· 2
This weekend, I decided it was time that I checked on port updates in my /compat/i386
FreeBSD 'system'. Which primarily exists to provide me some ports that don't build on 64-bit, namely emulators/wine-devel and net/nxserver. Don't recall the last time I used nx since I got it working, probably should check to see whether it is still working or not (probably okay on my home system, but might be broke on work one....and might see about setting it up on other work computer too).
Hmmm, hadn't updated ports since May 5th. Start with working through /usr/ports/UPDATING
, run into a problem that on 20130609: AFFECTS: users of audio/flac and any port that depends on it, in that there it thinks perl depends on it (kind of an annoyance I have with dependencies....there can be miles of separation between one port and another port, but everything get's marked as depending on that very bottom port, when it in fact didn't or doesn't... Was annoying in trying to figure out why a port was marked BROKEN / DEPRECATED and not get any attention except that people should stop using it...when 100's of ports on my system depend on it. When it turns out that its one or two ports, had an option set that caused it to depend on it. While the other ports generally don't care what options are enabled in that port, just that the command exists for it...or other reason. Though there are some ports that do care about what options were used, which I had ranted about earlier...and I ran into Thunderbird also having that dependency, resulting in this kluge patch:
Code
--- Makefile.orig 2013-06-26 06:01:34.000000000 -0500 | |
+++ Makefile 2013-06-27 20:07:04.142845537 -0500 | |
@@ -98,6 +98,8 @@ | |
.endif | |
| |
post-patch: | |
+ @${REINPLACE_CMD} -e '/with SQLITE_SECURE_DELETE/s/_ERROR/_WARN/' \ | |
+ ${WRKSRC}/mozilla/configure.in | |
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ | |
${WRKSRC}/mail/app/nsMailApp.cpp | |
.if ${PORT_OPTIONS:MENIGMAIL} |
But, I let the portmaster -r flac
run aways, with the suspicion that it would break later because perl modules that depend on perl (and not flac) wouldn't get picked up as needed to be re-installed or upgraded, due to 20130612: AFFECTS: users of lang/perl* and any port that depends on it. But, would break the re-install or upgrade of a port somewhere and abort. Which is what I found when I checked on it this morning.
So, I did a portmaster -R -r perl
, and noticed that it seemed to include most of the ports that the previous portmaster
hadn't done. In fact it included all of them. I also peeked in /usr/local/lib/perl5/5.14.2
and /usr/local/lib/perl5/site_perl/5.14.2
to see what perl modules had gotten missed....mainly the p5-XML-* ones that caused the previous portmaster
to abort.
Though I probably should've looked to see if the second portmaster
was going to address those, instead of doing them while it was asking to proceed. Because that caused it to abort when re-installing those perl modules (that I had done while it was waiting), but restarting it got things done.
That leaves the latest entry 20130627: AFFECTS: users of ports-mgmt/portmaster, which is just informational and not currently applicable.
Before running in to the flac entry, there had been "20130527: AFFECTS: users of lang/ruby18" which was pretty straight forward, since it only exists as a dependency to ports-mgmt/portupgrade
, which I seldom use now...but I have other scripts that use binaries that come as part of it (namely portsclean
), which I could probably replace with the portmaster
way or something else. But, its not really a priority, plus who knows if I won't decide to go back to using portupgrade
...which has options in its pkgtools.conf
that I haven't found equivalents for with portmaster
, though isn't currently an issue right now. Except perhaps that I'm holding back on updating to the latest emulators/virtualbox-ose
, since I've gotten warnings from various sources to stay away from it.
The other big one is what's the portmaster
equivalent to portupgrade
's ALT_PKGDEP?
Will eventually run into a port that has a line one of these:
Code
RUN_DEPENDS+= mysql-server>=0:${PORTSDIR}/databases/mysql${MYSQL_VER}-server | |
RUN_DEPENDS+= mysql-server>=0:${PORTSDIR}/databases/mysql${MYSQL_VER}-server | |
RUN_DEPENDS+= mysqld_safe:${PORTSDIR}/databases/mysql55-server | |
RUN_DEPENDS+= ${LOCALBASE}/bin/mysqld_safe:${PORTSDIR}/databases/mysql55-server | |
RUN_DEPENDS= ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql${MYSQL_VER}-server | |
RUN_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql${MYSQL_VER}-server | |
RUN_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql${MYSQL_VER}-server | |
RUN_DEPENDS+= mysql-server>=0:${PORTSDIR}/databases/mysql${WANT_MYSQL_VER}-server | |
RUN_DEPENDS+= mysql-server>=0:${PORTSDIR}/databases/mysql${MYSQL_VER}-server | |
RUN_DEPENDS+= mysql-server>=0:${PORTSDIR}/databases/mysql${WANT_MYSQL_VER}-server | |
LIB_DEPENDS+= mysqlclient:${PORTSDIR}/databases/mysql55-client | |
RUN_DEPENDS+= mysqld_safe:${PORTSDIR}/databases/mysql${MYSQL_VER}-server |
Where I'm using databases/percona55-server
& databases/percona55-client
now....
Somehow expected there would be more than 12 ports wanting either client or server... probably missing the occurrences in multiline RUN_DEPENDS or some other way to specify the depend. Since pkg_info says there are 103 ports that depend on the client, and two ports that depend on the server (neither being www/owncloud
or mail/roundcube
, which are the ports that I'm running on 'zen' using the mysql server. On cbox, there are 73 ports that depend on it, some are obviously true...like net-mgmt/cacti
and net-mgmt/cacti-spine
, but nothing is depending on the server...though it is obviously being used by cacti. I left dbox with the default databases/mysql55-client
...there are 71 ports depending on it.
Meanwhile I have postgres server running on zen, which was a depend of something else that I had since removed....but I haven't stopped or removed postgres yet....
In fact after dealing with ruby, flac and perl....the only ports left to update are:
dialog4ports-0.1.3 < needs updating (index has 0.1.5_1)
freeglut-2.8.0 < needs updating (index has 2.8.1)
portmaster-3.16 < needs updating (index has 3.17)
Might be time to see what else I can get working under wine.
Wonder when I had last updated ports in the /compat/i386
on my system at work? And, do I want to tackle that from home, on a Sunday instead of other important tasks/projects....
But first...lets see what port got updated since yesterday....
ports-mgmt/portupgrade
Odd, I seemed to have missed updating to lang/ruby19
from lang/ruby18
on cbox and dbox....