wolfi-dev / wolfi-dev/tools

Add SOURCE_DATE_EPOCH for melange builds so that image has correct created timestamp

Open
#34 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HCL
Stars
28
Forks
25
Avg merge
4d 31m
Merged PRs (30d)
6

Description

Currently the images with melange builds (i.e. wolfictl) have a created timestamp matching the last built apk:

$ crane config ghcr.io/wolfi-dev/melange:latest@sha256:0cf85235ed98ad83f5d480210db8a8b3d513298d60aa5c56fd137920a69d4924 | jq -r .created
2023-06-06T21:13:45Z

we should set the SOURCE_DATE_EPOCH appropriately during the melange build so that this timestamp matches the last commit to the tool used (for example using git log -1 --pretty=%ct)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the melange build configuration for wolfictl and inspect how image creation metadata is produced. Use the proposed git log -1 --pretty=%ct value for SOURCE_DATE_EPOCH, then verify the resulting image's .created value with the crane config command and jq shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.