Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diffutils: fix bug with 32-bit builds #18890

Merged
merged 1 commit into from Jun 1, 2023
Merged

Conversation

RobK88
Copy link
Contributor

@RobK88 RobK88 commented May 31, 2023

Description

diffutils: fix bug with 32-bit builds

  • change patchfiles to patchfiles-append
  • Remove pre-configure {} code block
  • Add "--disable-year2038" to configure.args-append for ALL builds

SEE: https://trac.macports.org/ticket/67475 (CLOSED)
#18787 (MERGED)

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 10.13.6 17G14042 x86_64
Xcode 10.1 10B61

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • checked your Portfile with port lint --nitpick?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?
  • checked that the Portfile's most important variants haven't been broken?

@jmroot
Copy link
Member

jmroot commented May 31, 2023

  • Remove "--disable-silent-rules" from configure.args-append

Why? Does this no longer work, or are you deliberately enabling silent make rules for some reason?

@mascguy mascguy self-assigned this May 31, 2023
@RobK88
Copy link
Contributor Author

RobK88 commented May 31, 2023

@jmroot - Joshua the original Portfile that I modified a week ago, never had the flag "--disable-silent-rules". I added the flag for testing. I can add the flag back in if you like. Should "--disable-silent-rules" be added to most ports? I often do not see the flag being used.

@RobK88
Copy link
Contributor Author

RobK88 commented May 31, 2023

Here is the real question. With 64-bit only builds, I am not sure whether specifying --disable-year2038 will build the 64-bit binary using 32-bit time_t which has the year 2038 limitation. If that is the case, maybe, it would be better to use pre-configure {} code block where the --disable-year2038 flag is only used when the build is NOT 64-bit only (i.e. the build is a 32-bit only build or is a universal build). Something like:

pre-configure {

     if {build != 64bit) { configure.args-append --disable-year2038 }
}

Or

pre-configure {

     if {{$universal_possible && [variant_isset universal]} || {build==32bit}} { 
            configure.args-append --disable-year2038 
     }
}


The tests {build != 64bit) and {build==32bit} are psuedo code. I do not know how to make the real test. Is there a global variable available that specifying whether the build is 32-bit or 64-bit?

P.S. Maybe I am overthinking this bug. I may not be around in 2038! :-)

@jmroot
Copy link
Member

jmroot commented May 31, 2023

We always prefer to not use silent make rules, because they make logs much less useful. So if this flag is needed to disable them, it should be kept.

time_t is always 64-bit when used from 64-bit code on macOS, so don't worry about that.

* Change patchfiles to patchfiles-append
* Remove pre-configure {} code block
* Add "--disable-year2038" to configure.args-append for ALL builds
@RobK88
Copy link
Contributor Author

RobK88 commented May 31, 2023

Thanks Joshua. I added the "--disable-silent-rules" flag to configure.args-append.
It looks like this PR is ready to be merged.

@jmroot jmroot merged commit a5c1493 into macports:master Jun 1, 2023
3 checks passed
@RobK88 RobK88 deleted the diffutils branch June 1, 2023 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants