depends: touch command for creating determinstic archive timestamps fails on OpenBSD #29447

issue theStack openend this issue on February 18, 2024
  1. theStack commented at 5:17 pm on February 18, 2024: contributor

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    In the course of the “Caching…” step of a depends build, the touch command for creating determinstic package archive timestamps fails on OpenBSD. The reason is that the used option -h option (introduced in PR #21995, commit 6ebe57622cb70df529879b15f291166177f2827c) doesn’t exist in OpenBSD’s version of touch (see https://man.openbsd.org/touch.1). E.g. for zeromq:

    0[ ... ]
    1Postprocessing zeromq...
    2Caching zeromq...
    3touch: unknown option -- h
    4usage: touch [-acm] [-d ccyy-mm-ddTHH:MM:SS[.frac][Z]] [-r file]
    5             [-t [[cc]yy]mmddHHMM[.SS]] file ...
    

    Expected behaviour

    Ideally, creating deterministic package archive timestamps should also work on OpenBSD. As an alternative, if that’s not easily possible, the touch command shouldn’t be executed at all on OpenBSD, do avoid the “unknown option” error message.

    Steps to reproduce

    Make a fresh depends build on OpenBSD, e.g. (for zeromq):

    0$ gmake -C depends clean
    1$ gmake -C depends NO_BDB=1 NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_SQLITE=1 NO_NATPMP=1 NO_UPNP=1 NO_USDT=1
    

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    master branch (commit 6c24eb55e021991196003dc7f0a643e806b14295)

    Operating system and version

    OpenBSD 7.4 (amd64)

    Machine specifications

    No response

  2. theStack commented at 5:22 pm on February 18, 2024: contributor
    ping @hebasto (Haven’t investigated deeper what -h exactly does, but as far as I understand, the build still succeeds and there is no big harm in the failing touch command other than that the timestamps are not determinstic. Considering that OpenBSD is rather a niche OS, I think it’s only worth fixing if there’s an easy way to do so.)
  3. hebasto commented at 10:18 am on February 19, 2024: member

    Haven’t investigated deeper what -h exactly does

    0$ touch --help | grep -A 2 -e "-h," 
    1  -h, --no-dereference   affect each symbolic link instead of any referenced
    2                         file (useful only on systems that can change the
    3                         timestamps of a symlink)
    
  4. maflcko added the label Build system on Feb 21, 2024
  5. fanquake referenced this in commit 8aff3fd292 on Mar 8, 2024
  6. fanquake closed this on Mar 12, 2024

  7. fanquake referenced this in commit e70590988a on Mar 12, 2024
  8. kevkevinpal referenced this in commit 3a31b0cdeb on Mar 13, 2024
  9. kevkevinpal referenced this in commit 605f87e0f0 on Mar 13, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-29 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me