Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#63505 closed defect (fixed)

clamav @0.104.0 does not build on PPC Tiger, Mac OS X 10.4.11, because clamav-0.104.0/shared/linux/cert_util_linux.c is missing

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: tiger Cc: dluke@…
Port: clamav

Description

DEBUG: checksum phase started at Sat Sep 18 15:38:51 CEST 2021
--->  Verifying checksums for clamav
DEBUG: Executing org.macports.checksum (clamav)
--->  Checksumming clamav-0.104.0.tar.gz
DEBUG: Calculated (rmd160) is 6cae80695cb2e2f5214ce6b999517e1f1f2a4305
DEBUG: Correct (rmd160) checksum for clamav-0.104.0.tar.gz
DEBUG: Calculated (sha256) is a079d64cd55d6184510adfe0f341b2f278f7fb1bcc080d28d374298160f19cb2
DEBUG: Correct (sha256) checksum for clamav-0.104.0.tar.gz
DEBUG: Calculated (size) is 11896747
DEBUG: Correct (size) checksum for clamav-0.104.0.tar.gz
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: extract phase started at Sat Sep 18 15:38:52 CEST 2021
--->  Extracting clamav
DEBUG: Executing org.macports.extract (clamav)
--->  Extracting clamav-0.104.0.tar.gz
DEBUG: setting option extract.args to '/opt/local/var/macports/distfiles/clamav/clamav-0.104.0.tar.gz'
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_clamav/clamav/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
DEVELOPER_DIR='/Developer'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.4'
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_clamav/clamav/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/clamav/clamav-0.104.0.tar.gz' | /usr/bin/gnutar --no-same-owner -xf - 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_clamav/clamav/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/clamav/clamav-0.104.0.tar.gz' | /usr/bin/gnutar --no-same-owner -xf - 
/usr/bin/gnutar: Read 6656 bytes from -
DEBUG: euid/egid changed to: 0/0
DEBUG: chowned /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_clamav/clamav/work to macports
DEBUG: euid/egid changed to: 502/502
DEBUG: Executing proc-post-org.macports.extract-extract-0
replacing mac security with linux security
Error: Failed to extract clamav: error copying "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_clamav/clamav/work/clamav-0.104.0/shared/linux/cert_util_linux.c": no such file or directory
DEBUG: Error code: NONE
DEBUG: Backtrace: error copying "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_clamav/clamav/work/clamav-0.104.0/shared/linux/cert_util_linux.c": no such file or directory
    while executing
"$post $targetname"
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_clamav/clamav/main.log for details.

Attachments (1)

main.log (6.9 KB) - added by ballapete (Peter "Pete" Dyballa) 3 years ago.
Main.log from PPC Tiger

Download all attachments as: .zip

Change History (14)

Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger

comment:1 Changed 3 years ago by kencu (Ken)

couldn't really expect my gross hack to last forever :)

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:2 in reply to:  1 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

couldn't really expect my gross hack to last forever :)

They changed path from shared/linux/cert_util_linux.c to common/linux/cert_util_linux.c… (I am building xorg-server-legacy – this might take some time)

Last edited 3 years ago by ballapete (Peter "Pete" Dyballa) (previous) (diff)

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

This fixes the paths and lets compilation start:

--- /opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/sysutils/clamav/Portfile-orig     2021-09-18 17:42:08.000000000 +0200
+++ /opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/sysutils/clamav/Portfile  2021-09-18 17:42:21.000000000 +0200
@@ -47,14 +47,14 @@
 
 ## older systems support
 # use linux version of openssl cert util on systems < 10.7 that don't support the macOS version
-# ./shared/linux/cert_util_linux.c -> ./shared/mac/cert_util_mac.m
+# ./common/linux/cert_util_linux.c -> ./shared/mac/cert_util_mac.m
 # passes all tests. See: https://trac.macports.org/ticket/59168
 post-extract {
  if { ${os.platform} eq "darwin" && ${os.major} < 11 } {
     ui_msg "replacing mac security with linux security"
-    delete ${worksrcpath}/shared/mac/cert_util_mac.m
-    copy   ${worksrcpath}/shared/linux/cert_util_linux.c \
-           ${worksrcpath}/shared/mac/cert_util_mac.m
+    delete ${worksrcpath}/common/mac/cert_util_mac.m
+    copy   ${worksrcpath}/common/linux/cert_util_linux.c \
+           ${worksrcpath}/common/mac/cert_util_mac.m
   }
 }
 

Or just type in vi: :50,57s/shared/common/. (The message replacing mac security with linux security can be understood in many different ways, maybe Upgrading ClamAV code to use Linux security on Macs is clearer.)

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

clamav built, freshclam could be invoked, but no update yet…

comment:5 Changed 3 years ago by kencu (Ken)

I am getting errors about unrecognized command line options from apple-gcc4.2, so there is a bit more to do still before I can push the change.

comment:6 Changed 3 years ago by kencu (Ken)

but as usual, gcc7 gets past these. We could either do a big project and strip the unrecognized flags and see where we wind up, or do a small project and require a new compiler. You know which one I'd choose.

This port is closed, so I can't just push the fixes. We'll need a PR for these changes.

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

Since years I am using GCC7 on PPC Tiger and Leopard. This works. (GCC6 worked before.)

comment:8 Changed 3 years ago by kencu (Ken)

Owner: set to kencu
Resolution: fixed
Status: newclosed

In 9e5c3a0e82e17ea879e1c12af936d6c8df7a33e8/macports-ports (master):

clamav: tweak older systems patch

and remove two new switches from included unrar build
that are not supported on older gcc versions

closes: #63505

no PR as this change only affects very old macOS systems
that few can test.

comment:9 in reply to:  8 Changed 3 years ago by danielluke (Daniel J. Luke)

Replying to kencu:

no PR as this change only affects very old macOS systems that few can test.

For what it's worth, I still would appreciate a PR (or a heads up about a proposed change in the ticket or via email) before modifying one of my non-openmaintainer ports. If we as a project want to add a special exception for changes for very old MacOS systems, that should be discussed on the project mailing lists and then added to the documented list of exceptions in the guide: https://guide.macports.org/#project.update-policies

comment:10 Changed 3 years ago by kencu (Ken)

Noted.

I was 1/2 way to a PR (like the last time I fixed this port for Peter) as per <https://trac.macports.org/ticket/63505#comment:6> when I thought, "Oh, hell, he can't possibly test this and won't care anyway" and saved myself the 10 minutes and just pushed if from where I already had it fixed.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:11 Changed 3 years ago by danielluke (Daniel J. Luke)

That's what 'openmaintainer' is for ;-)

This change is fine, but I like to make sure that for things I can't directly test, that it at least doesn't cause unexpected problems with the systems that I can test on.

comment:12 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

clamav @0.104.4_0 is installed as probably last version (ClamAV 1.0 needs Rust), so this ticket can be closed IMO.

comment:13 Changed 2 years ago by kencu (Ken)

closed

Note: See TracTickets for help on using tickets.