Bug 67937 - [PATCH] www/apache13-modssl, www/apache13-modssl+ipv6: sanitize version number handling
Summary: [PATCH] www/apache13-modssl, www/apache13-modssl+ipv6: sanitize version numbe...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-14 14:40 UTC by Oliver Eikemeier
Modified: 2004-07-19 05:09 UTC (History)
0 users

See Also:


Attachments
file.diff (9.36 KB, patch)
2004-06-14 14:40 UTC, Oliver Eikemeier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Eikemeier 2004-06-14 14:40:23 UTC
port www/apache13-modssl has an erratic version numbering scheme, depending on the
configured options. This confuses most package tools, including pkg_version, portaudit
and portupgrade, and possibly users. Besides, LATEST_LINK does not match the directory
name for no good reason and CONFLICTS setting is incorrect, the port does conflict with
itself, which it shouldn't.

While I'm here: user tunable variables should be WITH_*/WITHOUT_*.
Comment 1 Oliver Eikemeier freebsd_committer freebsd_triage 2004-06-14 14:41:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer.
Comment 2 dirk.meyer 2004-06-14 18:33:07 UTC
> 
> port www/apache13-modssl has an erratic version numbering scheme, depending on
>  the
> configured options. This confuses most package tools, including pkg_version, p
> ortaudit
> and portupgrade, and possibly users. Besides, LATEST_LINK does not match the d
> irectory
> name for no good reason and CONFLICTS setting is incorrect, the port does conf
> lict with
> itself, which it shouldn't.
> 
> While I'm here: user tunable variables should be WITH_*/WITHOUT_*.

1. Please give an example where pkg_version does not handle the version check.
I use pkg_version, and otehr tiolls without any problems.

2. I can't reproduce that the port conficts with it self.
# make -V CONFLICTS
apache+ipv6-1.* apache+ssl-1.* apache-1.* apache-2.*  apache_fp-1.* caudium-devel-1.* caudium10-1.* caudium12-*  ru-apache+mod_ssl-1.* ru-apache-1.* thttpd-2.* w3c-httpd-3.* apache+mod_snmp*-1.* apache+mod_accel*-1.* apache+mod_deflate*-1.*

3. tunable variables are syncronized with other apache ports.

4. Suggested patch is a regression, it fails to build with customized slave ports.

5. Why do you drop support of Makefile.local?

Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
Comment 3 Oliver Eikemeier 2004-06-14 19:28:32 UTC
Dirk Meyer wrote:

>  1. Please give an example where pkg_version does not handle the 
> version check.
>  I use pkg_version, and otehr tiolls without any problems.

Install the port with APACHE_WITH_MODDEFLATE=yes (sigh).
Try
   pkg_version -v | grep apache
You'll get
   apache+mod_ssl+mod_deflate-1.3.31+  >   succeeds port (port has 
1.3.31+2.8.18_4)
(not the truncated package name on -STABLE)

bump the PORTREVISION (security fix!)
   pkg_version -v | grep apache
   apache+mod_ssl+mod_deflate-1.3.31+  >   succeeds port (port has 
1.3.31+2.8.18_5)

Try
   portupgrade -n 'apache*'
  ** No need to upgrade 
'apache+mod_ssl+mod_deflate-1.3.31+2.8.18+1.0.21_4' (>= 
apache+mod_ssl-1.3.31+2.8.18_5). (specify -f to force)
You'll miss security fixes! Now, is the port broken?

>  2. I can't reproduce that the port conficts with it self.
>  # make -V CONFLICTS
>  apache+ipv6-1.* apache+ssl-1.* apache-1.* apache-2.*  apache_fp-1.* 
> caudium-devel-1.* caudium10-1.* caudium12-*  ru-apache+mod_ssl-1.* 
> ru-apache-1.* thttpd-2.* w3c-httpd-3.* apache+mod_snmp*-1.* 
> apache+mod_accel*-1.* apache+mod_deflate*-1.*

Try
   make APACHE_WITH_MODDEFLATE=yes -VCONFLICTS

You'll get `apache+mod_ssl-1.*', which is *this* port, please read how 
CONFLICTS work. Besides, you make it
unnecessary hard to CONFLICT with *this* port.

>  3. tunable variables are syncronized with other apache ports.

With which apache ports?
   grep -l APACHE_WITH_ /usr/ports/*/apache*/Makefile

>   4. Suggested patch is a regression, it fails to build with customized 
> slave ports.

What are `customized slave ports'? Of course they build.

>  5. Why do you drop support of Makefile.local?

Only bsd.port.mk includes ${MASTERDIR}/Makefile.local. Slave ports never 
include
a Makefile.local in the slaves port directory. If you want to change 
this, please submit
a patch for bsd.port.mk.

-Oliver
Comment 4 dirk.meyer 2004-06-15 05:37:59 UTC
Oliver Eikemeier schrieb:,

> Install the port with APACHE_WITH_MODDEFLATE=yes (sigh).
> Try
>    pkg_version -v | grep apache
> You'll get
>    apache+mod_ssl+mod_deflate-1.3.31+  >   succeeds port (port has 
> 1.3.31+2.8.18_4)
> (not the truncated package name on -STABLE)

Please set APACHE_WITH_MODDEFLATE=yes in /etc/make.conf

> bump the PORTREVISION (security fix!)
>    pkg_version -v | grep apache
>    apache+mod_ssl+mod_deflate-1.3.31+  >   succeeds port (port has 
> 1.3.31+2.8.18_5)

Please set options in /etc/make.conf

apache+mod_ssl-1.3.31+2.8.17_3      <   needs updating (port has 1.3.31+2.8.18_4)

> Try
>    portupgrade -n 'apache*'
>   ** No need to upgrade 
> 'apache+mod_ssl+mod_deflate-1.3.31+2.8.18+1.0.21_4' (>= 
> apache+mod_ssl-1.3.31+2.8.18_5). (specify -f to force)
> You'll miss security fixes! Now, is the port broken?

will work when options set in /etc/make.conf

> Try
>    make APACHE_WITH_MODDEFLATE=yes -VCONFLICTS
> 
> You'll get `apache+mod_ssl-1.*', which is *this* port, please read how 
> CONFLICTS work. Besides, you make it
> unnecessary hard to CONFLICT with *this* port.

This is required for some options.
IPV6 can be build from teh master port or from the Slave port.
To avoid overwrites CONFLICTS is set.

> With which apache ports?
>    grep -l APACHE_WITH_ /usr/ports/*/apache*/Makefile


> What are `customized slave ports'? Of course they build.

e.G. ports/www/apache13-modssl+ipv6
You removed to possiblitiy to overwrite some options.

> >  5. Why do you drop support of Makefile.local?
> 
> Only bsd.port.mk includes ${MASTERDIR}/Makefile.local. Slave ports never 
> include
> a Makefile.local in the slaves port directory. If you want to change 
> this, please submit
> a patch for bsd.port.mk.

When Fixes will take less than 6 Month to get in ...
INFO works just with the last revision of bsd.port.mk,
how long since it was introduced?

No reason to removes "features" that have been asked for by users.

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
Comment 5 Oliver Eikemeier 2004-06-15 11:40:29 UTC
Dirk Meyer wrote:

> Oliver Eikemeier schrieb:,

>>>  Dirk Meyer wrote:
>>  
>>>  1. Please give an example where pkg_version does not handle the
>>>     version check.
>>>      I use pkg_version, and otehr tiolls without any problems.
>>
>> Install the port with APACHE_WITH_MODDEFLATE=yes (sigh).
>> Try
>>    pkg_version -v | grep apache
>> You'll get
>>    apache+mod_ssl+mod_deflate-1.3.31+  >   succeeds port (port has  1.3.31+2.8.18_4)
>> (note the truncated package name on -STABLE)
>
> Please set APACHE_WITH_MODDEFLATE=yes in /etc/make.conf

I expect that most users won't do this. Actually setting user
tunable variables in make.conf(5) can lead to unexpected results
when they are not specifically designed to be effective on the
whole ports tree, so I would advise against doing this.

>> bump the PORTREVISION (security fix!)
>>    pkg_version -v | grep apache
>>    apache+mod_ssl+mod_deflate-1.3.31+  >   succeeds port (port has 1.3.31+2.8.18_5)
>
> Please set options in /etc/make.conf
>
> apache+mod_ssl-1.3.31+2.8.17_3      <   needs updating (port has 1.3.31+2.8.18_4)

... which is the line you'll get when no options have been set.

>> Try
>>    portupgrade -n 'apache*'
>>   ** No need to upgrade 
>> 'apache+mod_ssl+mod_deflate-1.3.31+2.8.18+1.0.21_4' (>= apache+mod_ssl-1.3.31+2.8.18_5). (specify -f to force)
>> You'll miss security fixes! Now, is the port broken?
>
> will work when options set in /etc/make.conf

Please, you don't do the users of your port a favour here. Besides requiring
that options are set in make.conf(5) and are not changed between upgrades, you
make it excessively expensive to add entries to the vulnerability database.
Currently 16 entries would be required, instead of two.

>>>  2. I can't reproduce that the port conficts with it self.
>>>  # make -V CONFLICTS
>>>  apache+ipv6-1.* apache+ssl-1.* apache-1.* apache-2.*  apache_fp-1.* 
>>> caudium-devel-1.* caudium10-1.* caudium12-*  ru-apache+mod_ssl-1.* 
>>> ru-apache-1.* thttpd-2.* w3c-httpd-3.* apache+mod_snmp*-1.* 
>>> apache+mod_accel*-1.* apache+mod_deflate*-1.*
>>
>> Try
>>    make APACHE_WITH_MODDEFLATE=yes -VCONFLICTS
>> 
>> You'll get `apache+mod_ssl-1.*', which is *this* port, please read how 
>> CONFLICTS work. Besides, you make it unnecessary hard to CONFLICT with *this* port.
>
> This is required for some options.
> IPV6 can be build from teh master port or from the Slave port.
> To avoid overwrites CONFLICTS is set.

No. Apply the patch and you'll see that exactly www/apache13-modssl and
www/apache13-modssl+ipv6 conflict, and nothing else. Also it is *much* easier
for other ports to add CONFLICTS for these ports, and to guess their names.

>>> 4. Suggested patch is a regression, it fails to build with customized 
>>>    slave ports.
>>  
>>  What are `customized slave ports'? Of course they build.
>
> e.G. ports/www/apache13-modssl+ipv6
> You removed to possiblitiy to overwrite some options.

Hmmm... I don't understand what options you are referring to.
Could you name an example?

>>>  5. Why do you drop support of Makefile.local?
>> 
>> Only bsd.port.mk includes ${MASTERDIR}/Makefile.local. Slave ports never 
>> include a Makefile.local in the slaves port directory. If you want to change 
>> this, please submit a patch for bsd.port.mk.
>
> When Fixes will take less than 6 Month to get in ...
> INFO works just with the last revision of bsd.port.mk,
> how long since it was introduced?
>
> No reason to removes "features" that have been asked for by users.

I try not to introduce "features" in my ports that I have to describe
using double quotes. Anyway, I don't care, this was just a drive-by.
These and other issues are not a concern of this PR, so keep it the way
it is.

-Oliver
Comment 6 Will Andrews 2004-06-21 00:19:40 UTC
Dirk,

Specifying two version numbers for one package is illegal.
Please don't abuse PKGNAME or PKGNAME{PRE,SUF}FIX.  Metadata like
this should be put in metadata files, not PKGNAME.

Regards,
-- 
wca
Comment 7 Dirk Meyer freebsd_committer freebsd_triage 2004-07-19 05:08:35 UTC
State Changed
From-To: open->closed

- waited for next update of distribution, to avoid setting of PORTEPOCH