diff options
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes-global/utils.bbclass | 10 | ||||
| -rw-r--r-- | meta/classes-recipe/kernel-yocto.bbclass | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/meta/classes-global/utils.bbclass b/meta/classes-global/utils.bbclass index c9cae8930f..530a490ea8 100644 --- a/meta/classes-global/utils.bbclass +++ b/meta/classes-global/utils.bbclass | |||
| @@ -367,3 +367,13 @@ check_git_config() { | |||
| 367 | git config --local user.name "${PATCH_GIT_USER_NAME}" | 367 | git config --local user.name "${PATCH_GIT_USER_NAME}" |
| 368 | fi | 368 | fi |
| 369 | } | 369 | } |
| 370 | |||
| 371 | # Sets fixed git committer and author for reproducible commits | ||
| 372 | reproducible_git_committer_author() { | ||
| 373 | export GIT_COMMITTER_NAME="${PATCH_GIT_USER_NAME}" | ||
| 374 | export GIT_COMMITTER_EMAIL="${PATCH_GIT_USER_EMAIL}" | ||
| 375 | export GIT_COMMITTER_DATE="$(date -d @${SOURCE_DATE_EPOCH})" | ||
| 376 | export GIT_AUTHOR_NAME="${PATCH_GIT_USER_NAME}" | ||
| 377 | export GIT_AUTHOR_EMAIL="${PATCH_GIT_USER_EMAIL}" | ||
| 378 | export GIT_AUTHOR_DATE="$(date -d @${SOURCE_DATE_EPOCH})" | ||
| 379 | } | ||
diff --git a/meta/classes-recipe/kernel-yocto.bbclass b/meta/classes-recipe/kernel-yocto.bbclass index 7d80e9aa52..697132c073 100644 --- a/meta/classes-recipe/kernel-yocto.bbclass +++ b/meta/classes-recipe/kernel-yocto.bbclass | |||
| @@ -352,6 +352,9 @@ do_patch() { | |||
| 352 | cd ${S} | 352 | cd ${S} |
| 353 | 353 | ||
| 354 | check_git_config | 354 | check_git_config |
| 355 | if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then | ||
| 356 | reproducible_git_committer_author | ||
| 357 | fi | ||
| 355 | meta_dir=$(kgit --meta) | 358 | meta_dir=$(kgit --meta) |
| 356 | (cd ${meta_dir}; ln -sf patch.queue series) | 359 | (cd ${meta_dir}; ln -sf patch.queue series) |
| 357 | if [ -f "${meta_dir}/series" ]; then | 360 | if [ -f "${meta_dir}/series" ]; then |
| @@ -434,6 +437,9 @@ do_kernel_checkout() { | |||
| 434 | rm -f .gitignore | 437 | rm -f .gitignore |
| 435 | git init | 438 | git init |
| 436 | check_git_config | 439 | check_git_config |
| 440 | if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then | ||
| 441 | reproducible_git_committer_author | ||
| 442 | fi | ||
| 437 | git add . | 443 | git add . |
| 438 | git commit -q -n -m "baseline commit: creating repo for ${PN}-${PV}" | 444 | git commit -q -n -m "baseline commit: creating repo for ${PN}-${PV}" |
| 439 | git clean -d -f | 445 | git clean -d -f |
