[PR #6404] [MERGED] build: improve reliability/portability of date command usage #6000

Closed
opened 2026-05-05 10:48:50 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/6404
Author: @kmk3
Created: 7/11/2024
Status: Merged
Merged: 7/20/2024
Merged by: @kmk3

Base: masterHead: build-man-fix-date


📝 Commits (1)

  • ca2d752 build: improve reliability/portability of date command usage

📊 Changes

1 file changed (+9 additions, -2 deletions)

View changed files

📝 src/man/mkman.sh (+9 -2)

📄 Description

Changes:

  • Use the exact same source date string for all date invocations
  • Use -d instead of --date=
  • Fallback to -r and then to no argument

Some date implementations only support BSD -r instead of GNU -d /
--date= and others may not support any of them since neither option is
in POSIX.

For example, if zoneinfo is installed by chromebrew on ChromeOS, it
provides a date program that only supports -r and overrides the system
one (which supports -d) [1]:

./mkman.sh 0.9.72 src/man/firejail.man firejail.1
date: invalid option -- '-'
date: usage: date [-u] [-c] [-r seconds] [+format]
make: *** [Makefile:42: firejail.1] Error 1

Environment: zoneinfo 2024a on ChromeOS M125.

Note: The changes are based on what is suggested by
reproducible-builds.org [2].

Relates to #193.

Fixes #6403.

[1] https://github.com/netblue30/firejail/issues/6403#issue-2402292506
[2] https://reproducible-builds.org/docs/source-date-epoch/

Reported-by: @Zopolis4
Cc: @reinerh (from #193)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/6404 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 7/11/2024 **Status:** ✅ Merged **Merged:** 7/20/2024 **Merged by:** [@kmk3](https://github.com/kmk3) **Base:** `master` ← **Head:** `build-man-fix-date` --- ### 📝 Commits (1) - [`ca2d752`](https://github.com/netblue30/firejail/commit/ca2d7526043366eccfccd13d873fbd6a44c57d03) build: improve reliability/portability of date command usage ### 📊 Changes **1 file changed** (+9 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/man/mkman.sh` (+9 -2) </details> ### 📄 Description Changes: * Use the exact same source date string for all `date` invocations * Use `-d` instead of `--date=` * Fallback to `-r` and then to no argument Some `date` implementations only support BSD `-r` instead of GNU `-d` / `--date=` and others may not support any of them since neither option is in POSIX. For example, if zoneinfo is installed by chromebrew on ChromeOS, it provides a date program that only supports `-r` and overrides the system one (which supports `-d`) [1]: ./mkman.sh 0.9.72 src/man/firejail.man firejail.1 date: invalid option -- '-' date: usage: date [-u] [-c] [-r seconds] [+format] make: *** [Makefile:42: firejail.1] Error 1 Environment: zoneinfo 2024a on ChromeOS M125. Note: The changes are based on what is suggested by reproducible-builds.org [2]. Relates to #193. Fixes #6403. [1] https://github.com/netblue30/firejail/issues/6403#issue-2402292506 [2] https://reproducible-builds.org/docs/source-date-epoch/ Reported-by: @Zopolis4 Cc: @reinerh (from #193) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:48:50 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#6000
No description provided.