Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: fake-hwclock-0.11
@ 2019-10-04  8:11 voidlinux-github
  2019-10-04  8:17 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: voidlinux-github @ 2019-10-04  8:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1659 bytes --]

There is a new pull request by dreamtigers against master on the void-packages repository

https://github.com/dreamtigers/void-packages master
https://github.com/void-linux/void-packages/pull/15056

New package: fake-hwclock-0.11
Hello! I closed the previous pull request (#14985) and I'm making a new one
(sorry if it's wrong, I'm not used to pull requests) with some fixes so:
1. The template file now passes `xlint`'s test.
2. The service now behaves more like the systemd original one (that is, a
   "oneshot" service)

Thanks to maldridge, pulux, and bobertlo on IRC for their help and guidance!

Brief description of the package:

Save/restore system clock on machines without working RTC hardware.

Some machines don't have a working Real Time Clock (RTC) unit, or no driver for
said hardware. 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 the real time. This will stop
some of the problems that may be caused by a system believing it has travelled
in time back to 1970.

This is originally a Debian package, and as Debian uses systemd as it's init
and service manager, most of the init and service instructions were useless for
Void.

I took the liberty of adapting the scripts and patching the manpage with the
instructions to make fake-hwclock execute on boot and shutdown in Void Linux
(or at least distributions that use runit as init), all while being as
faithful to upstream as possible.


A patch file from https://github.com/void-linux/void-packages/pull/15056.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-15056.patch --]
[-- Type: text/x-diff, Size: 4075 bytes --]

From 50f73765411dd4f8e66ec72a4167f75650095178 Mon Sep 17 00:00:00 2001
From: Ivan Gonzalez Polanco <ivan14polanco@gmail.com>
Date: Fri, 4 Oct 2019 03:55:48 -0400
Subject: [PATCH] New package: fake-hwclock-0.11

Thanks maldridge, pulux, and bobertlo on IRC for the help provided!
---
 .../fake-hwclock/files/fake-hwclock/finish    |  2 ++
 srcpkgs/fake-hwclock/files/fake-hwclock/run   |  5 +++
 srcpkgs/fake-hwclock/patches/manpage.patch    | 34 +++++++++++++++++++
 srcpkgs/fake-hwclock/template                 | 25 ++++++++++++++
 4 files changed, 66 insertions(+)
 create mode 100755 srcpkgs/fake-hwclock/files/fake-hwclock/finish
 create mode 100755 srcpkgs/fake-hwclock/files/fake-hwclock/run
 create mode 100644 srcpkgs/fake-hwclock/patches/manpage.patch
 create mode 100644 srcpkgs/fake-hwclock/template

diff --git a/srcpkgs/fake-hwclock/files/fake-hwclock/finish b/srcpkgs/fake-hwclock/files/fake-hwclock/finish
new file mode 100755
index 00000000000..2b54817ed0b
--- /dev/null
+++ b/srcpkgs/fake-hwclock/files/fake-hwclock/finish
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec fake-hwclock save
diff --git a/srcpkgs/fake-hwclock/files/fake-hwclock/run b/srcpkgs/fake-hwclock/files/fake-hwclock/run
new file mode 100755
index 00000000000..e5f8c5a70c8
--- /dev/null
+++ b/srcpkgs/fake-hwclock/files/fake-hwclock/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+exec 1>&2
+[ -r /etc/default/fake-hwclock ] && . /etc/default/fake-hwclock
+fake-hwclock load $FORCE || exit 1
+exec chpst -b fake-hwclock pause
diff --git a/srcpkgs/fake-hwclock/patches/manpage.patch b/srcpkgs/fake-hwclock/patches/manpage.patch
new file mode 100644
index 00000000000..f404d6ffc4a
--- /dev/null
+++ b/srcpkgs/fake-hwclock/patches/manpage.patch
@@ -0,0 +1,34 @@
+--- o.fake-hwclock.8	2019-10-03 01:19:44.542744670 -0400
++++ fake-hwclock.8	2019-10-03 01:21:03.241032055 -0400
+@@ -1,4 +1,4 @@
+-.TH FAKE-HWCLOCK 8 "1 October 2014" Debian
++.TH FAKE-HWCLOCK 8 "4 October 2019" Linux
+ .SH NAME
+ fake-hwclock \- Control fake hardware clock
+ .SH SYNOPSIS
+@@ -23,6 +23,11 @@
+ case, in which case it is possible to modify the init system
+ configuration to move things earlier/later as appropriate.
+
++This program was originally written for Debian, which uses an init system
++different from \fBrunit\fP. To add \fBfake-hwclock\fP as a service, the system
++administrator must link the directory \fI/etc/sv/fake-hwclock\fP to
++\fI/var/service\fP.
++
+ .SH DESCRIPTION
+ \fBfake-hwclock\fP sets and queries a fake "hardware clock" which stores the
+ time in a file. This program may be run by the system administrator
+@@ -47,11 +52,8 @@
+ \fB/etc/fake-hwclock.data\fR
+ The file used to store the time
+ .TP
+-\fB/etc/init.d/fake-hwclock\fR
+-The init script used to run fake-hwclock on startup and shutdown
+-.TP
+-\fB/lib/systemd/system/fake-hwclock.service\fR
+-systemd service used to run fake-hwclock on startup and shutdown
++\fB/etc/sv/fake-hwclock/\fR
++runit service used to run fake-hwclock on startup and shutdown
+ .TP
+ \fB/etc/default/fake-hwclock\fR
+ Settings file for the init script.
diff --git a/srcpkgs/fake-hwclock/template b/srcpkgs/fake-hwclock/template
new file mode 100644
index 00000000000..5ce7a6e314a
--- /dev/null
+++ b/srcpkgs/fake-hwclock/template
@@ -0,0 +1,25 @@
+# Template file for 'fake-hwclock'
+pkgname=fake-hwclock
+version=0.11
+revision=1
+archs=noarch
+create_wrksrc=yes
+short_desc="Save/restore system clock on machines without working RTC hardware"
+maintainer="Ivan Gonzalez Polanco <ivan14polanco@gmail.com>"
+license="GPL-2.0"
+homepage="https://tracker.debian.org/pkg/fake-hwclock"
+distfiles="${DEBIAN_SITE}/main/f/${pkgname}/${pkgname}_${version}.tar.gz"
+checksum="58e29ff272a8e8b40ab972c49f82fd8fb6ef69a7fdde5f84292f800b53ea29ce"
+
+do_extract() {
+	filename="$(basename ${distfiles})"
+	tar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${filename} --strip-components=1 -C ${wrksrc}
+}
+
+do_install() {
+	vbin ${pkgname}
+	vconf etc/default/${pkgname}
+	vinstall debian/${pkgname}.cron.hourly 755 etc/cron.hourly ${pkgname}
+	vman ${pkgname}.8
+	vsv ${pkgname}
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] New package: fake-hwclock-0.11
  2019-10-04  8:11 [PR PATCH] New package: fake-hwclock-0.11 voidlinux-github
  2019-10-04  8:17 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-10-04  8:17 ` voidlinux-github
  2019-10-04 18:46 ` voidlinux-github
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: voidlinux-github @ 2019-10-04  8:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]

There is an updated pull request by dreamtigers against master on the void-packages repository

https://github.com/dreamtigers/void-packages master
https://github.com/void-linux/void-packages/pull/15056

New package: fake-hwclock-0.11
Hello! I closed the previous pull request (#14985) and I'm making a new one
(sorry if it's wrong, I'm not used to pull requests) with some fixes so:
1. The template file now passes `xlint`'s test.
2. The service now behaves more like the systemd original one (that is, a
   "oneshot" service)

Thanks to maldridge, pulux, and bobertlo on IRC for their help and guidance!

Brief description of the package:

Save/restore system clock on machines without working RTC hardware.

Some machines don't have a working Real Time Clock (RTC) unit, or no driver for
said hardware. 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 the real time. This will stop
some of the problems that may be caused by a system believing it has travelled
in time back to 1970.

This is originally a Debian package, and as Debian uses systemd as it's init
and service manager, most of the init and service instructions were useless for
Void.

I took the liberty of adapting the scripts and patching the manpage with the
instructions to make fake-hwclock execute on boot and shutdown in Void Linux
(or at least distributions that use runit as init), all while being as
faithful to upstream as possible.


A patch file from https://github.com/void-linux/void-packages/pull/15056.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-15056.patch --]
[-- Type: text/x-diff, Size: 4080 bytes --]

From 9488d2ea01eb9a8ebece701c0b16e40aef6fa537 Mon Sep 17 00:00:00 2001
From: Ivan Gonzalez Polanco <ivan14polanco@gmail.com>
Date: Fri, 4 Oct 2019 03:55:48 -0400
Subject: [PATCH] New package: fake-hwclock-0.11

Thanks maldridge, pulux, and bobertlo on IRC for the help provided!
---
 .../fake-hwclock/files/fake-hwclock/finish    |  2 ++
 srcpkgs/fake-hwclock/files/fake-hwclock/run   |  5 +++
 srcpkgs/fake-hwclock/patches/manpage.patch    | 34 +++++++++++++++++++
 srcpkgs/fake-hwclock/template                 | 25 ++++++++++++++
 4 files changed, 66 insertions(+)
 create mode 100755 srcpkgs/fake-hwclock/files/fake-hwclock/finish
 create mode 100755 srcpkgs/fake-hwclock/files/fake-hwclock/run
 create mode 100644 srcpkgs/fake-hwclock/patches/manpage.patch
 create mode 100644 srcpkgs/fake-hwclock/template

diff --git a/srcpkgs/fake-hwclock/files/fake-hwclock/finish b/srcpkgs/fake-hwclock/files/fake-hwclock/finish
new file mode 100755
index 00000000000..2b54817ed0b
--- /dev/null
+++ b/srcpkgs/fake-hwclock/files/fake-hwclock/finish
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec fake-hwclock save
diff --git a/srcpkgs/fake-hwclock/files/fake-hwclock/run b/srcpkgs/fake-hwclock/files/fake-hwclock/run
new file mode 100755
index 00000000000..e5f8c5a70c8
--- /dev/null
+++ b/srcpkgs/fake-hwclock/files/fake-hwclock/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+exec 1>&2
+[ -r /etc/default/fake-hwclock ] && . /etc/default/fake-hwclock
+fake-hwclock load $FORCE || exit 1
+exec chpst -b fake-hwclock pause
diff --git a/srcpkgs/fake-hwclock/patches/manpage.patch b/srcpkgs/fake-hwclock/patches/manpage.patch
new file mode 100644
index 00000000000..f404d6ffc4a
--- /dev/null
+++ b/srcpkgs/fake-hwclock/patches/manpage.patch
@@ -0,0 +1,34 @@
+--- o.fake-hwclock.8	2019-10-03 01:19:44.542744670 -0400
++++ fake-hwclock.8	2019-10-03 01:21:03.241032055 -0400
+@@ -1,4 +1,4 @@
+-.TH FAKE-HWCLOCK 8 "1 October 2014" Debian
++.TH FAKE-HWCLOCK 8 "4 October 2019" Linux
+ .SH NAME
+ fake-hwclock \- Control fake hardware clock
+ .SH SYNOPSIS
+@@ -23,6 +23,11 @@
+ case, in which case it is possible to modify the init system
+ configuration to move things earlier/later as appropriate.
+
++This program was originally written for Debian, which uses an init system
++different from \fBrunit\fP. To add \fBfake-hwclock\fP as a service, the system
++administrator must link the directory \fI/etc/sv/fake-hwclock\fP to
++\fI/var/service\fP.
++
+ .SH DESCRIPTION
+ \fBfake-hwclock\fP sets and queries a fake "hardware clock" which stores the
+ time in a file. This program may be run by the system administrator
+@@ -47,11 +52,8 @@
+ \fB/etc/fake-hwclock.data\fR
+ The file used to store the time
+ .TP
+-\fB/etc/init.d/fake-hwclock\fR
+-The init script used to run fake-hwclock on startup and shutdown
+-.TP
+-\fB/lib/systemd/system/fake-hwclock.service\fR
+-systemd service used to run fake-hwclock on startup and shutdown
++\fB/etc/sv/fake-hwclock/\fR
++runit service used to run fake-hwclock on startup and shutdown
+ .TP
+ \fB/etc/default/fake-hwclock\fR
+ Settings file for the init script.
diff --git a/srcpkgs/fake-hwclock/template b/srcpkgs/fake-hwclock/template
new file mode 100644
index 00000000000..3fe76b3b749
--- /dev/null
+++ b/srcpkgs/fake-hwclock/template
@@ -0,0 +1,25 @@
+# Template file for 'fake-hwclock'
+pkgname=fake-hwclock
+version=0.11
+revision=1
+archs=noarch
+create_wrksrc=yes
+short_desc="Save/restore system clock on machines without working RTC hardware"
+maintainer="Ivan Gonzalez Polanco <ivan14polanco@gmail.com>"
+license="GPL-2.0-only"
+homepage="https://tracker.debian.org/pkg/fake-hwclock"
+distfiles="${DEBIAN_SITE}/main/f/${pkgname}/${pkgname}_${version}.tar.gz"
+checksum="58e29ff272a8e8b40ab972c49f82fd8fb6ef69a7fdde5f84292f800b53ea29ce"
+
+do_extract() {
+	filename="$(basename ${distfiles})"
+	tar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${filename} --strip-components=1 -C ${wrksrc}
+}
+
+do_install() {
+	vbin ${pkgname}
+	vconf etc/default/${pkgname}
+	vinstall debian/${pkgname}.cron.hourly 755 etc/cron.hourly ${pkgname}
+	vman ${pkgname}.8
+	vsv ${pkgname}
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] New package: fake-hwclock-0.11
  2019-10-04  8:11 [PR PATCH] New package: fake-hwclock-0.11 voidlinux-github
@ 2019-10-04  8:17 ` voidlinux-github
  2019-10-04  8:17 ` voidlinux-github
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: voidlinux-github @ 2019-10-04  8:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]

There is an updated pull request by dreamtigers against master on the void-packages repository

https://github.com/dreamtigers/void-packages master
https://github.com/void-linux/void-packages/pull/15056

New package: fake-hwclock-0.11
Hello! I closed the previous pull request (#14985) and I'm making a new one
(sorry if it's wrong, I'm not used to pull requests) with some fixes so:
1. The template file now passes `xlint`'s test.
2. The service now behaves more like the systemd original one (that is, a
   "oneshot" service)

Thanks to maldridge, pulux, and bobertlo on IRC for their help and guidance!

Brief description of the package:

Save/restore system clock on machines without working RTC hardware.

Some machines don't have a working Real Time Clock (RTC) unit, or no driver for
said hardware. 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 the real time. This will stop
some of the problems that may be caused by a system believing it has travelled
in time back to 1970.

This is originally a Debian package, and as Debian uses systemd as it's init
and service manager, most of the init and service instructions were useless for
Void.

I took the liberty of adapting the scripts and patching the manpage with the
instructions to make fake-hwclock execute on boot and shutdown in Void Linux
(or at least distributions that use runit as init), all while being as
faithful to upstream as possible.


A patch file from https://github.com/void-linux/void-packages/pull/15056.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-15056.patch --]
[-- Type: text/x-diff, Size: 4080 bytes --]

From 9488d2ea01eb9a8ebece701c0b16e40aef6fa537 Mon Sep 17 00:00:00 2001
From: Ivan Gonzalez Polanco <ivan14polanco@gmail.com>
Date: Fri, 4 Oct 2019 03:55:48 -0400
Subject: [PATCH] New package: fake-hwclock-0.11

Thanks maldridge, pulux, and bobertlo on IRC for the help provided!
---
 .../fake-hwclock/files/fake-hwclock/finish    |  2 ++
 srcpkgs/fake-hwclock/files/fake-hwclock/run   |  5 +++
 srcpkgs/fake-hwclock/patches/manpage.patch    | 34 +++++++++++++++++++
 srcpkgs/fake-hwclock/template                 | 25 ++++++++++++++
 4 files changed, 66 insertions(+)
 create mode 100755 srcpkgs/fake-hwclock/files/fake-hwclock/finish
 create mode 100755 srcpkgs/fake-hwclock/files/fake-hwclock/run
 create mode 100644 srcpkgs/fake-hwclock/patches/manpage.patch
 create mode 100644 srcpkgs/fake-hwclock/template

diff --git a/srcpkgs/fake-hwclock/files/fake-hwclock/finish b/srcpkgs/fake-hwclock/files/fake-hwclock/finish
new file mode 100755
index 00000000000..2b54817ed0b
--- /dev/null
+++ b/srcpkgs/fake-hwclock/files/fake-hwclock/finish
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec fake-hwclock save
diff --git a/srcpkgs/fake-hwclock/files/fake-hwclock/run b/srcpkgs/fake-hwclock/files/fake-hwclock/run
new file mode 100755
index 00000000000..e5f8c5a70c8
--- /dev/null
+++ b/srcpkgs/fake-hwclock/files/fake-hwclock/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+exec 1>&2
+[ -r /etc/default/fake-hwclock ] && . /etc/default/fake-hwclock
+fake-hwclock load $FORCE || exit 1
+exec chpst -b fake-hwclock pause
diff --git a/srcpkgs/fake-hwclock/patches/manpage.patch b/srcpkgs/fake-hwclock/patches/manpage.patch
new file mode 100644
index 00000000000..f404d6ffc4a
--- /dev/null
+++ b/srcpkgs/fake-hwclock/patches/manpage.patch
@@ -0,0 +1,34 @@
+--- o.fake-hwclock.8	2019-10-03 01:19:44.542744670 -0400
++++ fake-hwclock.8	2019-10-03 01:21:03.241032055 -0400
+@@ -1,4 +1,4 @@
+-.TH FAKE-HWCLOCK 8 "1 October 2014" Debian
++.TH FAKE-HWCLOCK 8 "4 October 2019" Linux
+ .SH NAME
+ fake-hwclock \- Control fake hardware clock
+ .SH SYNOPSIS
+@@ -23,6 +23,11 @@
+ case, in which case it is possible to modify the init system
+ configuration to move things earlier/later as appropriate.
+
++This program was originally written for Debian, which uses an init system
++different from \fBrunit\fP. To add \fBfake-hwclock\fP as a service, the system
++administrator must link the directory \fI/etc/sv/fake-hwclock\fP to
++\fI/var/service\fP.
++
+ .SH DESCRIPTION
+ \fBfake-hwclock\fP sets and queries a fake "hardware clock" which stores the
+ time in a file. This program may be run by the system administrator
+@@ -47,11 +52,8 @@
+ \fB/etc/fake-hwclock.data\fR
+ The file used to store the time
+ .TP
+-\fB/etc/init.d/fake-hwclock\fR
+-The init script used to run fake-hwclock on startup and shutdown
+-.TP
+-\fB/lib/systemd/system/fake-hwclock.service\fR
+-systemd service used to run fake-hwclock on startup and shutdown
++\fB/etc/sv/fake-hwclock/\fR
++runit service used to run fake-hwclock on startup and shutdown
+ .TP
+ \fB/etc/default/fake-hwclock\fR
+ Settings file for the init script.
diff --git a/srcpkgs/fake-hwclock/template b/srcpkgs/fake-hwclock/template
new file mode 100644
index 00000000000..3fe76b3b749
--- /dev/null
+++ b/srcpkgs/fake-hwclock/template
@@ -0,0 +1,25 @@
+# Template file for 'fake-hwclock'
+pkgname=fake-hwclock
+version=0.11
+revision=1
+archs=noarch
+create_wrksrc=yes
+short_desc="Save/restore system clock on machines without working RTC hardware"
+maintainer="Ivan Gonzalez Polanco <ivan14polanco@gmail.com>"
+license="GPL-2.0-only"
+homepage="https://tracker.debian.org/pkg/fake-hwclock"
+distfiles="${DEBIAN_SITE}/main/f/${pkgname}/${pkgname}_${version}.tar.gz"
+checksum="58e29ff272a8e8b40ab972c49f82fd8fb6ef69a7fdde5f84292f800b53ea29ce"
+
+do_extract() {
+	filename="$(basename ${distfiles})"
+	tar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${filename} --strip-components=1 -C ${wrksrc}
+}
+
+do_install() {
+	vbin ${pkgname}
+	vconf etc/default/${pkgname}
+	vinstall debian/${pkgname}.cron.hourly 755 etc/cron.hourly ${pkgname}
+	vman ${pkgname}.8
+	vsv ${pkgname}
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: New package: fake-hwclock-0.11
  2019-10-04  8:11 [PR PATCH] New package: fake-hwclock-0.11 voidlinux-github
  2019-10-04  8:17 ` [PR PATCH] [Updated] " voidlinux-github
  2019-10-04  8:17 ` voidlinux-github
@ 2019-10-04 18:46 ` voidlinux-github
  2019-10-06  3:04 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: voidlinux-github @ 2019-10-04 18:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/15056#issuecomment-538517388

Comment:
Forgot to add, preferred workflow here is to force push branch, so all comments are kept in one PR.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] New package: fake-hwclock-0.11
  2019-10-04  8:11 [PR PATCH] New package: fake-hwclock-0.11 voidlinux-github
                   ` (2 preceding siblings ...)
  2019-10-04 18:46 ` voidlinux-github
@ 2019-10-06  3:04 ` voidlinux-github
  2019-10-06  3:04 ` voidlinux-github
  2019-11-09 21:13 ` [PR PATCH] [Merged]: " voidlinux-github
  5 siblings, 0 replies; 7+ messages in thread
From: voidlinux-github @ 2019-10-06  3:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]

There is an updated pull request by dreamtigers against master on the void-packages repository

https://github.com/dreamtigers/void-packages master
https://github.com/void-linux/void-packages/pull/15056

New package: fake-hwclock-0.11
Hello! I closed the previous pull request (#14985) and I'm making a new one
(sorry if it's wrong, I'm not used to pull requests) with some fixes so:
1. The template file now passes `xlint`'s test.
2. The service now behaves more like the systemd original one (that is, a
   "oneshot" service)

Thanks to maldridge, pulux, and bobertlo on IRC for their help and guidance!

Brief description of the package:

Save/restore system clock on machines without working RTC hardware.

Some machines don't have a working Real Time Clock (RTC) unit, or no driver for
said hardware. 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 the real time. This will stop
some of the problems that may be caused by a system believing it has travelled
in time back to 1970.

This is originally a Debian package, and as Debian uses systemd as it's init
and service manager, most of the init and service instructions were useless for
Void.

I took the liberty of adapting the scripts and patching the manpage with the
instructions to make fake-hwclock execute on boot and shutdown in Void Linux
(or at least distributions that use runit as init), all while being as
faithful to upstream as possible.


A patch file from https://github.com/void-linux/void-packages/pull/15056.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-15056.patch --]
[-- Type: text/x-diff, Size: 3988 bytes --]

From eca2d0a8670efcf0676d2966cd9fd2afa3314966 Mon Sep 17 00:00:00 2001
From: Ivan Gonzalez Polanco <ivan14polanco@gmail.com>
Date: Fri, 4 Oct 2019 03:55:48 -0400
Subject: [PATCH] New package: fake-hwclock-0.11

Thanks maldridge, pulux, and bobertlo on IRC for the help provided!
---
 .../fake-hwclock/files/fake-hwclock/finish    |  2 ++
 srcpkgs/fake-hwclock/files/fake-hwclock/run   |  5 +++
 srcpkgs/fake-hwclock/patches/manpage.patch    | 34 +++++++++++++++++++
 srcpkgs/fake-hwclock/template                 | 22 ++++++++++++
 4 files changed, 63 insertions(+)
 create mode 100755 srcpkgs/fake-hwclock/files/fake-hwclock/finish
 create mode 100755 srcpkgs/fake-hwclock/files/fake-hwclock/run
 create mode 100644 srcpkgs/fake-hwclock/patches/manpage.patch
 create mode 100644 srcpkgs/fake-hwclock/template

diff --git a/srcpkgs/fake-hwclock/files/fake-hwclock/finish b/srcpkgs/fake-hwclock/files/fake-hwclock/finish
new file mode 100755
index 00000000000..2b54817ed0b
--- /dev/null
+++ b/srcpkgs/fake-hwclock/files/fake-hwclock/finish
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec fake-hwclock save
diff --git a/srcpkgs/fake-hwclock/files/fake-hwclock/run b/srcpkgs/fake-hwclock/files/fake-hwclock/run
new file mode 100755
index 00000000000..e5f8c5a70c8
--- /dev/null
+++ b/srcpkgs/fake-hwclock/files/fake-hwclock/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+exec 1>&2
+[ -r /etc/default/fake-hwclock ] && . /etc/default/fake-hwclock
+fake-hwclock load $FORCE || exit 1
+exec chpst -b fake-hwclock pause
diff --git a/srcpkgs/fake-hwclock/patches/manpage.patch b/srcpkgs/fake-hwclock/patches/manpage.patch
new file mode 100644
index 00000000000..f404d6ffc4a
--- /dev/null
+++ b/srcpkgs/fake-hwclock/patches/manpage.patch
@@ -0,0 +1,34 @@
+--- o.fake-hwclock.8	2019-10-03 01:19:44.542744670 -0400
++++ fake-hwclock.8	2019-10-03 01:21:03.241032055 -0400
+@@ -1,4 +1,4 @@
+-.TH FAKE-HWCLOCK 8 "1 October 2014" Debian
++.TH FAKE-HWCLOCK 8 "4 October 2019" Linux
+ .SH NAME
+ fake-hwclock \- Control fake hardware clock
+ .SH SYNOPSIS
+@@ -23,6 +23,11 @@
+ case, in which case it is possible to modify the init system
+ configuration to move things earlier/later as appropriate.
+
++This program was originally written for Debian, which uses an init system
++different from \fBrunit\fP. To add \fBfake-hwclock\fP as a service, the system
++administrator must link the directory \fI/etc/sv/fake-hwclock\fP to
++\fI/var/service\fP.
++
+ .SH DESCRIPTION
+ \fBfake-hwclock\fP sets and queries a fake "hardware clock" which stores the
+ time in a file. This program may be run by the system administrator
+@@ -47,11 +52,8 @@
+ \fB/etc/fake-hwclock.data\fR
+ The file used to store the time
+ .TP
+-\fB/etc/init.d/fake-hwclock\fR
+-The init script used to run fake-hwclock on startup and shutdown
+-.TP
+-\fB/lib/systemd/system/fake-hwclock.service\fR
+-systemd service used to run fake-hwclock on startup and shutdown
++\fB/etc/sv/fake-hwclock/\fR
++runit service used to run fake-hwclock on startup and shutdown
+ .TP
+ \fB/etc/default/fake-hwclock\fR
+ Settings file for the init script.
diff --git a/srcpkgs/fake-hwclock/template b/srcpkgs/fake-hwclock/template
new file mode 100644
index 00000000000..16731b49dfe
--- /dev/null
+++ b/srcpkgs/fake-hwclock/template
@@ -0,0 +1,22 @@
+# Template file for 'fake-hwclock'
+pkgname=fake-hwclock
+version=0.11
+revision=1
+archs=noarch
+wrksrc=git
+short_desc="Save/restore system clock on machines without working RTC hardware"
+maintainer="Ivan Gonzalez Polanco <ivan14polanco@gmail.com>"
+license="GPL-2.0-only"
+homepage="https://tracker.debian.org/pkg/fake-hwclock"
+distfiles="${DEBIAN_SITE}/main/f/${pkgname}/${pkgname}_${version}.tar.gz"
+checksum="58e29ff272a8e8b40ab972c49f82fd8fb6ef69a7fdde5f84292f800b53ea29ce"
+
+conf_files="/etc/default/fake-hwclock"
+
+do_install() {
+	vbin fake-hwclock
+	vinstall etc/default/fake-hwclock 644 etc/default
+	vinstall debian/fake-hwclock.cron.hourly 755 etc/cron.hourly fake-hwclock
+	vman fake-hwclock.8
+	vsv fake-hwclock
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] New package: fake-hwclock-0.11
  2019-10-04  8:11 [PR PATCH] New package: fake-hwclock-0.11 voidlinux-github
                   ` (3 preceding siblings ...)
  2019-10-06  3:04 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-10-06  3:04 ` voidlinux-github
  2019-11-09 21:13 ` [PR PATCH] [Merged]: " voidlinux-github
  5 siblings, 0 replies; 7+ messages in thread
From: voidlinux-github @ 2019-10-06  3:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]

There is an updated pull request by dreamtigers against master on the void-packages repository

https://github.com/dreamtigers/void-packages master
https://github.com/void-linux/void-packages/pull/15056

New package: fake-hwclock-0.11
Hello! I closed the previous pull request (#14985) and I'm making a new one
(sorry if it's wrong, I'm not used to pull requests) with some fixes so:
1. The template file now passes `xlint`'s test.
2. The service now behaves more like the systemd original one (that is, a
   "oneshot" service)

Thanks to maldridge, pulux, and bobertlo on IRC for their help and guidance!

Brief description of the package:

Save/restore system clock on machines without working RTC hardware.

Some machines don't have a working Real Time Clock (RTC) unit, or no driver for
said hardware. 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 the real time. This will stop
some of the problems that may be caused by a system believing it has travelled
in time back to 1970.

This is originally a Debian package, and as Debian uses systemd as it's init
and service manager, most of the init and service instructions were useless for
Void.

I took the liberty of adapting the scripts and patching the manpage with the
instructions to make fake-hwclock execute on boot and shutdown in Void Linux
(or at least distributions that use runit as init), all while being as
faithful to upstream as possible.


A patch file from https://github.com/void-linux/void-packages/pull/15056.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-15056.patch --]
[-- Type: text/x-diff, Size: 3988 bytes --]

From eca2d0a8670efcf0676d2966cd9fd2afa3314966 Mon Sep 17 00:00:00 2001
From: Ivan Gonzalez Polanco <ivan14polanco@gmail.com>
Date: Fri, 4 Oct 2019 03:55:48 -0400
Subject: [PATCH] New package: fake-hwclock-0.11

Thanks maldridge, pulux, and bobertlo on IRC for the help provided!
---
 .../fake-hwclock/files/fake-hwclock/finish    |  2 ++
 srcpkgs/fake-hwclock/files/fake-hwclock/run   |  5 +++
 srcpkgs/fake-hwclock/patches/manpage.patch    | 34 +++++++++++++++++++
 srcpkgs/fake-hwclock/template                 | 22 ++++++++++++
 4 files changed, 63 insertions(+)
 create mode 100755 srcpkgs/fake-hwclock/files/fake-hwclock/finish
 create mode 100755 srcpkgs/fake-hwclock/files/fake-hwclock/run
 create mode 100644 srcpkgs/fake-hwclock/patches/manpage.patch
 create mode 100644 srcpkgs/fake-hwclock/template

diff --git a/srcpkgs/fake-hwclock/files/fake-hwclock/finish b/srcpkgs/fake-hwclock/files/fake-hwclock/finish
new file mode 100755
index 00000000000..2b54817ed0b
--- /dev/null
+++ b/srcpkgs/fake-hwclock/files/fake-hwclock/finish
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec fake-hwclock save
diff --git a/srcpkgs/fake-hwclock/files/fake-hwclock/run b/srcpkgs/fake-hwclock/files/fake-hwclock/run
new file mode 100755
index 00000000000..e5f8c5a70c8
--- /dev/null
+++ b/srcpkgs/fake-hwclock/files/fake-hwclock/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+exec 1>&2
+[ -r /etc/default/fake-hwclock ] && . /etc/default/fake-hwclock
+fake-hwclock load $FORCE || exit 1
+exec chpst -b fake-hwclock pause
diff --git a/srcpkgs/fake-hwclock/patches/manpage.patch b/srcpkgs/fake-hwclock/patches/manpage.patch
new file mode 100644
index 00000000000..f404d6ffc4a
--- /dev/null
+++ b/srcpkgs/fake-hwclock/patches/manpage.patch
@@ -0,0 +1,34 @@
+--- o.fake-hwclock.8	2019-10-03 01:19:44.542744670 -0400
++++ fake-hwclock.8	2019-10-03 01:21:03.241032055 -0400
+@@ -1,4 +1,4 @@
+-.TH FAKE-HWCLOCK 8 "1 October 2014" Debian
++.TH FAKE-HWCLOCK 8 "4 October 2019" Linux
+ .SH NAME
+ fake-hwclock \- Control fake hardware clock
+ .SH SYNOPSIS
+@@ -23,6 +23,11 @@
+ case, in which case it is possible to modify the init system
+ configuration to move things earlier/later as appropriate.
+
++This program was originally written for Debian, which uses an init system
++different from \fBrunit\fP. To add \fBfake-hwclock\fP as a service, the system
++administrator must link the directory \fI/etc/sv/fake-hwclock\fP to
++\fI/var/service\fP.
++
+ .SH DESCRIPTION
+ \fBfake-hwclock\fP sets and queries a fake "hardware clock" which stores the
+ time in a file. This program may be run by the system administrator
+@@ -47,11 +52,8 @@
+ \fB/etc/fake-hwclock.data\fR
+ The file used to store the time
+ .TP
+-\fB/etc/init.d/fake-hwclock\fR
+-The init script used to run fake-hwclock on startup and shutdown
+-.TP
+-\fB/lib/systemd/system/fake-hwclock.service\fR
+-systemd service used to run fake-hwclock on startup and shutdown
++\fB/etc/sv/fake-hwclock/\fR
++runit service used to run fake-hwclock on startup and shutdown
+ .TP
+ \fB/etc/default/fake-hwclock\fR
+ Settings file for the init script.
diff --git a/srcpkgs/fake-hwclock/template b/srcpkgs/fake-hwclock/template
new file mode 100644
index 00000000000..16731b49dfe
--- /dev/null
+++ b/srcpkgs/fake-hwclock/template
@@ -0,0 +1,22 @@
+# Template file for 'fake-hwclock'
+pkgname=fake-hwclock
+version=0.11
+revision=1
+archs=noarch
+wrksrc=git
+short_desc="Save/restore system clock on machines without working RTC hardware"
+maintainer="Ivan Gonzalez Polanco <ivan14polanco@gmail.com>"
+license="GPL-2.0-only"
+homepage="https://tracker.debian.org/pkg/fake-hwclock"
+distfiles="${DEBIAN_SITE}/main/f/${pkgname}/${pkgname}_${version}.tar.gz"
+checksum="58e29ff272a8e8b40ab972c49f82fd8fb6ef69a7fdde5f84292f800b53ea29ce"
+
+conf_files="/etc/default/fake-hwclock"
+
+do_install() {
+	vbin fake-hwclock
+	vinstall etc/default/fake-hwclock 644 etc/default
+	vinstall debian/fake-hwclock.cron.hourly 755 etc/cron.hourly fake-hwclock
+	vman fake-hwclock.8
+	vsv fake-hwclock
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Merged]: New package: fake-hwclock-0.11
  2019-10-04  8:11 [PR PATCH] New package: fake-hwclock-0.11 voidlinux-github
                   ` (4 preceding siblings ...)
  2019-10-06  3:04 ` voidlinux-github
@ 2019-11-09 21:13 ` voidlinux-github
  5 siblings, 0 replies; 7+ messages in thread
From: voidlinux-github @ 2019-11-09 21:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]

There's a merged pull request on the void-packages repository

New package: fake-hwclock-0.11
https://github.com/void-linux/void-packages/pull/15056

Description:
Hello! I closed the previous pull request (#14985) and I'm making a new one
(sorry if it's wrong, I'm not used to pull requests) with some fixes so:
1. The template file now passes `xlint`'s test.
2. The service now behaves more like the systemd original one (that is, a
   "oneshot" service)

Thanks to maldridge, pulux, and bobertlo on IRC for their help and guidance!

Brief description of the package:

Save/restore system clock on machines without working RTC hardware.

Some machines don't have a working Real Time Clock (RTC) unit, or no driver for
said hardware. 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 the real time. This will stop
some of the problems that may be caused by a system believing it has travelled
in time back to 1970.

This is originally a Debian package, and as Debian uses systemd as it's init
and service manager, most of the init and service instructions were useless for
Void.

I took the liberty of adapting the scripts and patching the manpage with the
instructions to make fake-hwclock execute on boot and shutdown in Void Linux
(or at least distributions that use runit as init), all while being as
faithful to upstream as possible.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-11-09 21:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-04  8:11 [PR PATCH] New package: fake-hwclock-0.11 voidlinux-github
2019-10-04  8:17 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-04  8:17 ` voidlinux-github
2019-10-04 18:46 ` voidlinux-github
2019-10-06  3:04 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-06  3:04 ` voidlinux-github
2019-11-09 21:13 ` [PR PATCH] [Merged]: " voidlinux-github

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).