Your message dated Mon, 28 Jul 2014 12:05:46 +0000 with message-id <[email protected]> and subject line Bug#695281: fixed in runit 2.1.1-7 has caused the Debian Bug report #695281, regarding Please apply attached patch that optionally disables calling sync() in runit(8) to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 695281: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695281 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: runit Version: 2.1.1-6.2 Severity: wishlist Tags: patch Hi, I use runit extensively in vservers. Restarting a vserver occasionally takes a lot longer than necessary because runit(8) insists on calling sync() before shutting down. This is desirable on physical hosts, of course, but not in a vserver (which is basically just a glorified chroot). I wrote a small patch that adds a /etc/runit/nosync flag file that, if it exists, inhibits calling sync() on reboot/shutdown. Please consider applying it. Thanks Andras -- Andras Korn <korn at elan.rulez.org> There is an answer to every question. Usually it's No.diff -ru runit-2.1.1/doc/runit.8.html runit-2.1.1+nosync/doc/runit.8.html --- runit-2.1.1/doc/runit.8.html 2009-10-04 22:44:02.000000000 +0200 +++ runit-2.1.1+nosync/doc/runit.8.html 2012-12-06 16:48:51.239082000 +0100 @@ -34,6 +34,8 @@ and possibly halt or reboot the system are done here. If stage 3 returns, <b>runit</b> checks if the file <i>/etc/runit/reboot</i> exists and has the execute by owner permission set. If so, the system is rebooted, it’s halted otherwise. +If <i>/etc/runit/nosync</i> exists, <b>runit</b> doesn’t invoke +sync(). This is useful in vservers. <h2><a name='sect6'>Ctrl-alt-del</a></h2> If <b>runit</b> receives the ctrl-alt-del keyboard request and the file diff -ru runit-2.1.1/man/runit.8 runit-2.1.1+nosync/man/runit.8 --- runit-2.1.1/man/runit.8 2009-10-04 22:44:02.000000000 +0200 +++ runit-2.1.1+nosync/man/runit.8 2012-12-06 16:48:52.392406000 +0100 @@ -48,6 +48,11 @@ .I /etc/runit/reboot exists and has the execute by owner permission set. If so, the system is rebooted, it's halted otherwise. +If +.I /etc/runit/nosync +exists, +.B runit +doesn't invoke sync(). This is useful in vservers. .SH CTRL-ALT-DEL If .B runit diff -ru runit-2.1.1/src/runit.c runit-2.1.1+nosync/src/runit.c --- runit-2.1.1/src/runit.c 2009-10-04 22:44:02.000000000 +0200 +++ runit-2.1.1+nosync/src/runit.c 2012-12-06 16:44:30.055219000 +0100 @@ -41,6 +41,11 @@ } void sig_child_handler (void) { write(selfpipe[1], "", 1); } +void sync_if_needed() { + struct stat s; + if (stat(NOSYNC, &s) == -1) sync(); +} + int main (int argc, const char * const *argv, char * const *envp) { const char * prog[2]; int pid, pid2; @@ -305,28 +310,28 @@ case -1: if ((stat(REBOOT, &s) != -1) && (s.st_mode & S_IXUSR)) { strerr_warn2(INFO, "system reboot.", 0); - sync(); + sync_if_needed(); reboot_system(RB_AUTOBOOT); } else { #ifdef RB_POWER_OFF strerr_warn2(INFO, "power off...", 0); - sync(); + sync_if_needed(); reboot_system(RB_POWER_OFF); sleep(2); #endif #ifdef RB_HALT_SYSTEM strerr_warn2(INFO, "system halt.", 0); - sync(); + sync_if_needed(); reboot_system(RB_HALT_SYSTEM); #else #ifdef RB_HALT strerr_warn2(INFO, "system halt.", 0); - sync(); + sync_if_needed(); reboot_system(RB_HALT); #else strerr_warn2(INFO, "system reboot.", 0); - sync(); + sync_if_needed(); reboot_system(RB_AUTOBOOT); #endif #endif diff -ru runit-2.1.1/src/runit.h runit-2.1.1+nosync/src/runit.h --- runit-2.1.1/src/runit.h 2009-10-04 22:44:02.000000000 +0200 +++ runit-2.1.1+nosync/src/runit.h 2012-12-06 16:39:28.781315000 +0100 @@ -1,4 +1,5 @@ #define RUNIT "/sbin/runit" #define STOPIT "/etc/runit/stopit" #define REBOOT "/etc/runit/reboot" +#define NOSYNC "/erc/runit/nosync" #define CTRLALTDEL "/etc/runit/ctrlaltdel"
--- End Message ---
--- Begin Message ---Source: runit Source-Version: 2.1.1-7 We believe that the bug you reported is fixed in the latest version of runit, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Gerrit Pape <[email protected]> (supplier of updated runit package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Format: 1.8 Date: Mon, 28 Jul 2014 11:05:09 +0000 Source: runit Binary: runit Architecture: source amd64 Version: 2.1.1-7 Distribution: unstable Urgency: low Maintainer: Gerrit Pape <[email protected]> Changed-By: Gerrit Pape <[email protected]> Description: runit - system-wide service supervision Closes: 678985 695281 711335 715512 722116 726008 Changes: runit (2.1.1-7) unstable; urgency=low . * debian/runit.postinst, debian/runit.postrm: use test -d /proc/1 instead of ps -p 1. * debian/control: no longer Depends: procps. * debian/rules: work around diet using -mpowerpc-gpopt when itself given -Os, as -mpowerpc-gpopt generates instructions not available on 32-bit PowerPC CPUs (thx Ryan Finnie, closes: #726008). * debian/examples/start-stop-daemon.runit, debian/runit.examples: new; include start-stop-daemon.runit script by Andras Korn in /usr/share/doc/runit/examples/ (closes: #678985). * debian/diff/0003-support-etc-runit-nosync-file-to-make-sync...diff: new; support /etc/runit/nosync file to make sync on shutdown/reboot optional (thx Andras Korn, closes: #695281). * debian/contrib/sv-completion.bash: new; bash completion for sv (thx Jeremy Lal). * debian/rules: install sv bash completion (closes: #711335). * debian/diff/0004-sv.c-fix-typo-that-made-sv-status-get-...diff: new; sv.c: fix typo that made sv status get confused (closes: #715512). * debian/systemd/runit.service: new; runit systemd unit file (thx Daniel Kahn Gillmor). * debian/rules: install runit systemd unit file. * debian/runit.postinst, debian/runit.postrm: enable and start, disable and stop respectively, runit unit if systemd is process 1 (closes: #722116). Checksums-Sha1: 51b5ef89eaed2a146ce669a2d15e58c2cfd38b37 1071 runit_2.1.1-7.dsc b6032e2a994acfe7caa9dea0d4ac310048fe6d49 20059 runit_2.1.1-7.diff.gz c33b6c9ff178ee0399fabb31cc36a7227fd1a0c7 108586 runit_2.1.1-7_amd64.deb Checksums-Sha256: d9743dfabb2b6d1511ce9cee5268ca06da67f5a1b7a310f8743ae2a890436b7d 1071 runit_2.1.1-7.dsc 371c2920cee522b77c5b20937dd50efd9c9e3c6cea457df44d95984c9a472738 20059 runit_2.1.1-7.diff.gz 08ddd8aad4d3211730c56d522ad0ac5498e2519a9fd9c3b38fa55f6271aa0267 108586 runit_2.1.1-7_amd64.deb Files: 28cf9a0eca47353edc4167f96583337b 108586 admin optional runit_2.1.1-7_amd64.deb 1d313019580e044787a5fae77a4e0641 1071 admin optional runit_2.1.1-7.dsc 5652a6604bf222eaa9d4a3aaf54435e0 20059 admin optional runit_2.1.1-7.diff.gz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlPWOREACgkQGJoyQbxwpv8kkQCff3M7ctptzW0BLBXF/+1unJSL XDUAmwYC6Lw6U1SQ973YokdRe1VjllTf =ArVy -----END PGP SIGNATURE-----
--- End Message ---

