Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2022-08-28 15:10:12 +0300
committernl6720 <nl6720@gmail.com>2022-08-28 15:10:12 +0300
commit8ed192b70568a5a29a898decba35d0da69608414 (patch)
tree8f3455bacd5eff283c1c0acab373502557751052
parent642beb7e706474c3c6ef6af361ed81735bfb4d7f (diff)
parentaef242720d8d17bdaf56fd573fff3c02ccc062cb (diff)
Merge remote-tracking branch 'origin/merge-requests/281'
By Christian Hesse * origin/merge-requests/281: mkarchiso: touch clock-epoch for extra hint on date and time See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/281 While it feels dirty to place files in /usr/lib/, since it is the package manager's teritory, the path is unfortunately hardcoded. https://github.com/systemd/systemd/commit/5170afbc55d492f270c8948579324910c8c0b838
-rw-r--r--CHANGELOG.rst1
-rwxr-xr-xarchiso/mkarchiso5
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index cb4d5d6..1993cd6 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -10,6 +10,7 @@ Added
- Add ``efibootimg`` to ``mkarchiso`` to abstract the FAT image path.
- Copy all files from the ``grub`` directory to ISO9660 and the FAT image, not just only ``grub.cfg``.
+- Touching ``/usr/lib/clock-epoch`` to to help ``systemd`` with screwed or broken RTC.
Changed
-------
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 04c1e52..5f0c79b 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -1590,6 +1590,11 @@ _make_version() {
[[ ! -e "${_os_release}" ]] || sed -i '/^IMAGE_ID=/d;/^IMAGE_VERSION=/d' "${_os_release}"
printf 'IMAGE_ID=%s\nIMAGE_VERSION=%s\n' "${iso_name}" "${iso_version}" >> "${_os_release}"
fi
+
+ # Touch /usr/lib/clock-epoch to give another hint on date and time
+ # for systems with screwed or broken RTC.
+ touch -m -d"@${SOURCE_DATE_EPOCH}" -- "${pacstrap_dir}/usr/lib/clock-epoch"
+
_msg_info "Done!"
}