Opened 3 months ago

Last modified 6 weeks ago

#74383 new defect

openldap @2.6.13 applies useless patch on macOS

Reported by: ballapete (Peter "Pete" Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.12.6
Keywords: x86_64 sonoma Cc: mascguy@…
Port: openldap

Description

The patch patch-tests-gdate.diff is not necessary since system's date can without problem:

date -u -r `port file openldap` +%T

tests/scripts/all decides which arguments and options will be passed to date:

+ date -j
+ RC=0
+ '[' 0 -ne 0 ']'
+ DATEOPT='-r '

Change History (4)

comment:1 Changed 3 months ago by ballapete (Peter "Pete" Dyballa)

The timer() function is defined in tests/scripts/functions.sh:

timer() {
	if [ -n "$STARTTIME" ]; then
		now=`date +%s`
		delta=`expr $now - $STARTTIME`
		date -u $DATEOPT$delta +%T
	fi
}

comment:2 Changed 3 months ago by ballapete (Peter "Pete" Dyballa)

Of course the date (or gdate) invocation is faulty!

$DATEOPT$delta should better be two separate words (for legibility), and the line

delta=`expr $now - $STARTTIME`

should be two lines:

delta=`expr $now - $STARTTIME`
touch $delta

comment:3 Changed 3 months ago by ballapete (Peter "Pete" Dyballa)

It's better to patch date -j to become gdate -j that in any way -d @ is used as DATEOPT and tests can proceed without faulty date invocations. At least on Mac OS X 10.5.8, Leopard.

See also ​https://bugs.openldap.org/show_bug.cgi?id=10582.

comment:4 Changed 6 weeks ago by ballapete (Peter "Pete" Dyballa)

The new OpenLDAP version 2.6.15 has a change in tests/scripts/all that now tests:

# check for BSD vs GNU date
date -d @0 >/dev/null 2>&1

This delivers correct results for both old (Mac OS X 10.5.8, macOS High Sierra) and quite new Macs (macOS Sonoma). It should be provided by MacPorts:

version             2.6.15
revision            0

checksums           rmd160  aa423e340275d3cbd82dfa7aecf7f0d8496ec334 \
                    sha256  bc91225dbfc50354033b1303bc91d1a7f6ddd1dc32fac950d79c28fe66d6bca8 \
                    size    6526401

On old Macs the test suite produces since OpenLDAP version 2.6.14 failures, see ​https://bugs.openldap.org/show_bug.cgi?id=10613 and ​https://bugs.openldap.org/show_bug.cgi?id=10614.

Note: See TracTickets for help on using tickets.