commit f3ff667d2138cd4c7923c70d2d36381d26aa70e8aabdfe96d7b1fa17f1989c16 Author: Stefan Seyfried Date: Mon Jun 10 06:31:31 2024 +0000 I want to maintain fake-hwclock in Factory and would like to use Base:System as the devel/feeder project. OBS-URL: https://build.opensuse.org/package/show/Base:System/fake-hwclock?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..09110ab --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +.PHONY: install + +install: + install -p -m 0755 -d $(DESTDIR)/usr/lib/systemd/system + install -p -m 0755 -D fake-hwclock $(DESTDIR)/usr/sbin/fake-hwclock + install -p -m 0644 -D debian/fake-hwclock-load.service $(DESTDIR)/usr/lib/systemd/system/fake-hwclock-load.service + install -p -m 0644 -D debian/fake-hwclock-save.service $(DESTDIR)/usr/lib/systemd/system/fake-hwclock-save.service + install -p -m 0644 -D debian/fake-hwclock-save.timer $(DESTDIR)/usr/lib/systemd/system/fake-hwclock-save.timer + install -p -m 0644 -D etc/default/fake-hwclock $(DESTDIR)/etc/default/fake-hwclock + install -p -m 0644 -D fake-hwclock.8 $(DESTDIR)/usr/share/man/man8/fake-hwclock.8 diff --git a/_service b/_service new file mode 100644 index 0000000..e601b02 --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + https://git.einval.com/git/fake-hwclock.git + git + @PARENT_TAG@ + v(.*) + + + + + xz + fake-hwclock*.tar + + diff --git a/fake-hwclock-0.13.tar.xz b/fake-hwclock-0.13.tar.xz new file mode 100644 index 0000000..f3251ca --- /dev/null +++ b/fake-hwclock-0.13.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1bd7f62dbc65a8c57ec15b2286edc74373cb2703bfc2aa7c5c889bcdbd5876e9 +size 12124 diff --git a/fake-hwclock.changes b/fake-hwclock.changes new file mode 100644 index 0000000..5fc7e97 --- /dev/null +++ b/fake-hwclock.changes @@ -0,0 +1,14 @@ +------------------------------------------------------------------- +Tue Jun 4 16:37:10 UTC 2024 - Jonas Kvinge + +- Update to version 0.13 + +------------------------------------------------------------------- +Sun Mar 27 18:28:07 UTC 2022 - Stefan Seyfried + +- add timer for regularly saving the fake hwclock timestamp + +------------------------------------------------------------------- +Sun Mar 27 17:54:10 UTC 2022 - Stefan Seyfried + +- initial version 0.12 diff --git a/fake-hwclock.spec b/fake-hwclock.spec new file mode 100644 index 0000000..5f3dadb --- /dev/null +++ b/fake-hwclock.spec @@ -0,0 +1,79 @@ +# +# spec file for package fake-hwclock +# +# Copyright (c) 2022 B1 Systems GmbH, Vohburg +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: fake-hwclock +Version: 0.13 +Release: 0 +Summary: Save/restore system clock on machines without working RTC hardware +License: GPL-2.0-only +URL: https://tracker.debian.org/pkg/fake-hwclock +Source: %{name}-%{version}.tar.xz +Source1: Makefile +BuildArch: noarch + +%description +Some machines don't have a working realtime clock (RTC) unit, or no +driver for the hardware that does exist. fake-hwclock is a simple set +of scripts to save the kernel's current clock periodically (including +at shutdown) and restore it at boot so that the system clock keeps at +least close to realtime. This will stop some of the problems that may +be caused by a system believing it has travelled in time back to +1970, such as needing to perform filesystem checks at every boot. + +On top of this, use of NTP is still recommended to deal with the fake +clock "drifting" while the hardware is halted or rebooting. + +%prep +%autosetup -p1 + +%build +cp -p %{SOURCE1} . + +%install +%make_install + +%pre +%service_add_pre fake-hwclock-load.service +%service_add_pre fake-hwclock-save.service +%service_add_pre fake-hwclock-save.timer + +%post +%service_add_post fake-hwclock-load.service +%service_add_post fake-hwclock-save.service +%service_add_post fake-hwclock-save.timer + +%preun +%service_del_preun fake-hwclock-load.service +%service_del_preun fake-hwclock-save.service +%service_del_preun fake-hwclock-save.timer + +%postun +%service_del_postun fake-hwclock-load.service +%service_del_postun fake-hwclock-save.service +%service_del_postun fake-hwclock-save.timer + + +%files +%license COPYING +%doc debian/changelog debian/copyright +%doc %{_mandir}/man8/* +%config(noreplace) /etc/default/fake-hwclock +/usr/lib/systemd/system/ +/usr/sbin/fake-hwclock + +%changelog