portmaster and PKGNAMESUFFIX

Hi There,

On my webserver I need multiple Drupal 6 installations. Within the ports I installed them like this:

(cd /usr/ports/www/drupal6)

Code:
make install PKGNAMESUFFIX=_webnwc DRUPAL_DIR=/data/www/webnwc/drupal WWWOWN=webnwc WWWGRP=www

make install PKGNAMESUFFIX=_webhub DRUPAL_DIR=/data/www/webhub/drupal WWWOWN=webhub WWWGRP=www

(etc.)

After installation, the ports are installed correctly and this is in the /var/db/pkg:

Code:
drupal6_webnwc-6.12/
drupal6_webhub-6.12/
(etc.)

After upgrading the ports, the Drupal6-6.13 is in the ports and I want to upgrade them with portmaster. A 'portmaster -L' says:

Code:
===>>> drupal6_webnwc-6.12
        ===>>> New version available: drupal6-6.13
===>>> drupal6_webhub-6.12
        ===>>> New version available: drupal6-6.13
(etc.)

I tried upgrading like this:

Code:
portmaster drupal6_webnwc

This fails, because drupal6 is then installed in the default '/usr/local/www/drupal6' directory.

OK, then using the -m options of portmaster:

Code:
portmaster -m "PKGNAMESUFFIX=_webnwc DRUPAL_DIR=/data/www/webnwc/drupal WWWOWN=webnwc WWWGRP=www" drupal6_webnwc

This also fails, this error appears:

Code:
===>>> Currently installed version: drupal6_webnwc-6.12
===>>> Port directory: /usr/ports/www/drupal6

===>>> Gathering distinfo list for installed ports

===>>> Launching 'make checksum' for www/drupal6 in background
===>>> Gathering dependency list for www/drupal6 from ports
===>>> Starting recursive 'make config' check
"Makefile", line 175: Could not find /Makefile.ext
make: fatal errors encountered -- cannot continue
"Makefile", line 175: Could not find /Makefile.ext
"/usr/ports/Mk/bsd.port.mk", line 1686: Malformed conditional (${ARCH} == "amd64" || ${ARCH} =="ia64")
"/usr/ports/Mk/bsd.port.mk", line 2289: Malformed conditional (${PREFIX} == /usr)
"/usr/ports/Mk/bsd.port.mk", line 2941: Malformed conditional (${PREFIX} == /usr)
"/usr/ports/Mk/bsd.port.mk", line 2943: if-less else
"/usr/ports/Mk/bsd.port.mk", line 2945: if-less endif
"/usr/ports/Mk/bsd.port.mk", line 3051: Malformed conditional (${PREFIX} == /usr)
"/usr/ports/Mk/bsd.port.mk", line 3053: if-less else
"/usr/ports/Mk/bsd.port.mk", line 3055: if-less endif
"/usr/ports/Mk/bsd.port.mk", line 5399: Malformed conditional (${OSVERSION} >= 603104)
"/usr/ports/Mk/bsd.port.mk", line 5428: if-less else
"/usr/ports/Mk/bsd.port.mk", line 5492: if-less endif
"/usr/ports/Mk/bsd.port.mk", line 5763: Malformed conditional ((${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${X11BASE} && ${PREFIX} != ${LINUXBASE} && ${PREFIX} != "/usr"))
"/usr/ports/Mk/bsd.port.mk", line 5768: if-less endif
"/usr/ports/Mk/bsd.port.mk", line 6277: if-less endif
"/usr/ports/Mk/bsd.port.mk", line 6280: if-less endif
make: fatal errors encountered -- cannot continue

===>>> Is /usr/ports/lang/php5/Makefile missing?
===>>> Aborting update

Does anyone know how to upgrade these ports with portmaster?

Thanks in advance!

Greetings from The Netherlands,
Martijn
 
If you use the -m option with portmaster the variables you define need to have -D.

# portmaster -m "-DPKGNAMESUFFIX=_webnwc -DDRUPAL_DIR=/data/www/webnwc/drupal -DWWWOWN=webnwc -DWWWGRP=www" drupal6_webnwc

There might also be a way to put this into /etc/make.conf but I'm not sure what to check for. Maybe something like this might work:

Code:
.if ${PKGNAMESUFFIX:M:*_webnwc}
 DRUPAL_DIR=/data/www/webnwc/drupal
 WWWOWN=webnwc
 WWWGRP=www
.endif

The idea being you would only have to supply the PKGNAMESUFFIX with make.
 
Hi,

The first option:

# portmaster -m "-DPKGNAMESUFFIX=_webnwc -DDRUPAL_DIR=/data/www/webnwc/drupal -DWWWOWN=webnwc -DWWWGRP=www" drupal6_webnwc

gives this error:

# export: -DDRUPAL_DIR: bad variable name

And when using the code in make.conf:

Code:
.if ${PKGNAMESUFFIX:M:*_webnwc}
 DRUPAL_DIR=/data/www/webnwc/drupal
 WWWOWN=webnwc
 WWWGRP=www
.endif

this error appears when invoking portmaster (or just make):

# "/etc/make.conf", line 36: Malformed conditional (${PKGSUFFIXNAME:M*_webnwc})
"/usr/share/mk/sys.mk", line 346: if-less endif
make: fatal errors encountered -- cannot continue
 
zuul said:
# export: -DDRUPAL_DIR: bad variable name
Ah wait.. I didn't look to good at your error. The -D shouldn't be there. The original error you had refers to some missing files. Is your ports tree complete?

And when using the code in make.conf:

Code:
.if ${PKGNAMESUFFIX:M:*_webnwc}
 DRUPAL_DIR=/data/www/webnwc/drupal
 WWWOWN=webnwc
 WWWGRP=www
.endif

this error appears when invoking portmaster (or just make):

# "/etc/make.conf", line 36: Malformed conditional (${PKGSUFFIXNAME:M*_webnwc})
"/usr/share/mk/sys.mk", line 346: if-less endif
make: fatal errors encountered -- cannot continue


Err.. I made a booboo :r
The .if should read:

Code:
.if ${PKGNAMESUFFIX:M*_webnwc}

If you have other ports/packages that use the _webnwc suffex it might be a good idea to enclose the whole in another .if to prevent them from applying to other ports:

Code:
.if ${.CURDIR:M*/www/drupal*}
 # global drupal options here
 .if ${PKGNAMESUFFIX:M*_webnwc}
   # webnwc options here
 .endif
.endif

But as I've said, I'm not a 100% confident this is the correct way to do it :e
 
Hi SirDice,

Ah wait.. I didn't look to good at your error. The -D shouldn't be there. The original error you had refers to some missing files. Is your ports tree complete?

Yep, my ports tree is up to date...

Removing the -D didn't help, the same error as in my original post reappears.

Err.. I made a booboo
The .if should read:
Code:
.if ${PKGNAMESUFFIX:M*_webnwc}

I already noticed the extra : and removed it... but it doesn't solve the problem. Same error about "Malformed conditional (${PKGSUFFIXNAME:M*_webnwc})" keeps coming.

I just think postmaster can't do the job for me (or we are overlooking something completely). I don't want to use portupgrade, because I just switched from that to portmaster.

To upgrade my 'custom' installations for now, I just remove the drupal6_webnwc package and reinstalled it with 'make' (and all my custom options).

Thanks for all the help so far.
 
zuul said:
Same error about "Malformed conditional (${PKGSUFFIXNAME:M*_webnwc})" keeps coming.
It's PKGNAMESUFFIX not PKGSUFFIXNAME :e
 
Back
Top