[arch-commits] Commit in util-linux/trunk (PKGBUILD hwclock-systz.patch su.1)

Tom Gundersen tomegun at archlinux.org
Sat Oct 13 12:07:35 UTC 2012

    Date: Saturday, October 13, 2012 @ 08:07:35
  Author: tomegun
Revision: 168616

upgpkg: util-linux 2.22.1-1

upstream release


 PKGBUILD            |   37 ++------
 hwclock-systz.patch |   96 --------------------
 su.1                |  230 --------------------------------------------------
 3 files changed, 11 insertions(+), 352 deletions(-)

Modified: PKGBUILD
--- PKGBUILD	2012-10-13 11:49:54 UTC (rev 168615)
+++ PKGBUILD	2012-10-13 12:07:35 UTC (rev 168616)
@@ -3,8 +3,8 @@
 # Contributor: judd <jvinet at zeroflux.org>
 pkgdesc="Miscellaneous system utilities for Linux"
 arch=('i686' 'x86_64')
@@ -16,12 +16,10 @@
-        su.1
-        pam-su
-	hwclock-systz.patch)
+        pam-su)
@@ -32,13 +30,6 @@
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
-  patch -p1 -i ../hwclock-systz.patch
-  # unbreak --localstatedir
-  # TODO(dreisner): find out what sami had in mind with these heuristics
-  sed -i '71,75d' configure.ac
-  ./autogen.sh
   ./configure --prefix=/usr \
               --libdir=/usr/lib \
               --localstatedir=/run \
@@ -52,15 +43,16 @@
 #              --enable-reset \ # part of ncurses
-#              --enable-last \ # not part of any package
-#              --enable-line \ # not compat
+#              --enable-line \ # not part of any package
+#              --enable-last \ # not compat
-check() {
-  make -C "$pkgname-$pkgver" check
+#check() {
+# fails for some reason in chroot, works outside
+#  make -C "$pkgname-$pkgver" check
 package() {
   cd "${srcdir}/${pkgname}-${pkgver}"
@@ -79,19 +71,12 @@
   install -m644 "$srcdir/pam-su" "${pkgdir}/etc/pam.d/su"
   install -m644 "$srcdir/pam-su" "${pkgdir}/etc/pam.d/su-l"
-  # broken buildsys doesn't include su(1), which means it
-  # isn't even in the dist tarball
-  # TODO(dreisner): patched upstream
-  install -m644 "$srcdir/su.1" "$pkgdir/usr/share/man/man1/su.1"
   # include tmpfiles fragment for uuidd
   # TODO(dreisner): offer this upstream?
   install -Dm644 "$srcdir/uuidd.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/uuidd.conf"
-         '7f524538dcf57284a86f03a98e624f04'
-         'fa85e5cce5d723275b14365ba71a8aad'
-         '19eaa197a0cfb046661dede2e991120b')
+         'fa85e5cce5d723275b14365ba71a8aad')

Deleted: hwclock-systz.patch
--- hwclock-systz.patch	2012-10-13 11:49:54 UTC (rev 168615)
+++ hwclock-systz.patch	2012-10-13 12:07:35 UTC (rev 168616)
@@ -1,96 +0,0 @@
-From 46a8834c2eb9b0c37d92e30d1a262e41306cf36f Mon Sep 17 00:00:00 2001
-From: Tom Gundersen <teg at jklm.no>
-Date: Wed, 19 Sep 2012 18:10:34 +0200
-Subject: [PATCH 1/2] hwclock: don't warp the systemtime if it is in UTC
-A sideeffect of 839be2ba6b44fa9dc927f081d547ebadec9de19c is that we now
-warp the systemtime according to the timezone, on the first call of
---systz. This is not always the correct thing to do, and causes a
-regression for us in Arch Linux.
-This is the correct thing to do if the RTC, and hence the systemtime is
-set in localtime. However, if the systemtime is already in UTC we don't
-want to touch it when we set the kernel timezone (which we still need to
-do as e.g. FAT stores timestamps in localtime).
-An almost identical issue was also fixed in systemd commit
-Signed-off-by: Tom Gundersen <teg at jklm.no>
- sys-utils/hwclock.8 | 11 +++++++----
- sys-utils/hwclock.c | 17 +++++++++++++++--
- 2 files changed, 22 insertions(+), 6 deletions(-)
-diff --git a/sys-utils/hwclock.8 b/sys-utils/hwclock.8
-index 07d9fc0..5c599ad 100644
---- a/sys-utils/hwclock.8
-+++ b/sys-utils/hwclock.8
-@@ -58,10 +58,12 @@ This is a good option to use in one of the system startup scripts.
- Set the Hardware Clock to the current System Time.
- .TP
- .B \-\-systz
--Reset the System Time based on the current timezone.
-+Set the kernel's timezone and reset the System Time based on the current timezone.
--Also set the kernel's timezone value to the local timezone
--as indicated by the TZ environment variable and/or
-+The system time is only reset on the first call after boot.
-+The local timezone is taken to be what is
-+indicated by the TZ environment variable and/or
- .IR /usr/share/zoneinfo ,
- as
- .BR tzset (3)
-@@ -74,7 +76,8 @@ This is an alternate option to
- .B \-\-hctosys
- that does not read the hardware clock, and may be used in system startup
- scripts for recent 2.6 kernels where you know the System Time contains
--the Hardware Clock time.
-+the Hardware Clock time. If the Hardware Clock is already in UTC, it is
-+not reset.
- .TP
- .B \-\-adjust
- Add or subtract time from the Hardware Clock to account for systematic
-diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
-index 5a4c87e..351ce1f 100644
---- a/sys-utils/hwclock.c
-+++ b/sys-utils/hwclock.c
-@@ -772,7 +772,6 @@ static int set_system_clock_timezone(const bool universal, const bool testing)
- 	struct timeval tv;
- 	struct tm *broken;
- 	int minuteswest;
--	int rc;
- 	gettimeofday(&tv, NULL);
- 	if (debug) {
-@@ -818,10 +817,24 @@ static int set_system_clock_timezone(const bool universal, const bool testing)
- 		       ("Not setting system clock because running in test mode.\n"));
- 		retcode = 0;
- 	} else {
-+		const struct timezone tz_utc = { 0, 0 };
- 		const struct timezone tz = { minuteswest, 0 };
- 		const struct timeval *tv_null = NULL;
-+		int rc = 0;
-+		/* The first call to settimeofday after boot will assume the systemtime
-+		 * is in localtime, and adjust it according to the given timezone to
-+		 * compensate. If the systemtime is in fact in UTC, then this is wrong
-+		 * so we first do a dummy call to make sure the time is not shifted.
-+		 */
-+		if (universal)
-+			rc = settimeofday(tv_null, &tz_utc);
-+		/* Now we set the real timezone. Due to the above dummy call, this will
-+		 * only warp the systemtime if the RTC is not in UTC. */
-+		if (!rc)
-+			rc = settimeofday(tv_null, &tz);
--		rc = settimeofday(tv_null, &tz);
- 		if (rc) {
- 			if (errno == EPERM) {
- 				warnx(_

Deleted: su.1
--- su.1	2012-10-13 11:49:54 UTC (rev 168615)
+++ su.1	2012-10-13 12:07:35 UTC (rev 168616)
@@ -1,230 +0,0 @@
-.TH SU "1" "June 2012" "util-linux" "User Commands"
-su \- run a command with substitute user and group ID
-.B su
-[options...] [\-] [user [args...]]
-.B su
-allows to run commands with substitute user and group ID.
-When called without arguments
-.B su
-defaults to running an interactive shell as
-.IR root .
-For backward compatibility
-.B su
-defaults to not change the current directory and to only set the
-environment variables
-if the target
-.I user
-is not root).  It is recommended to always use the
-.B \-\-login
-option (instead it's shortcut
-.BR \- )
-to avoid side effects caused by mixing environments.
-This version of
-.B su
-uses PAM for authentication, account and session management.  Some
-configuration options found in other
-.B su
-implementations such as e.g. support of a wheel group have to be
-configured via PAM.
-\fB\-c\fR \fIcommand\fR, \fB\-\-command\fR=\fIcommand\fR
-.I command
-to the shell with the
-.B \-c
-Same as
-.B \-c
-but do not create a new session (discouraged).
-\fB\-f\fR, \fB\-\-fast\fR
-.B \-f
-to the shell which may or may not be useful depending on the
-\fB\-g\fR, \fB\-\-group\fR=\fIgroup\fR\fR
-specify the primary group, this option is allowed for root user only
-\fB\-G\fR, \fB\-\-supp-group\fR=\fIgroup\fR\fR
-specify a supplemental group, this option is allowed for root user only
-\fB\-\fR, \fB\-l\fR, \fB\-\-login\fR
-Starts the shell as login shell with an environment similar to a real
-.RS 10
-clears all environment variables except for
-initializes the environment variables
-changes to the target user's home directory
-sets argv[0] of the shell to
-.RB ' \- '
-in order to make the shell a login shell
-\fB\-m\fR, \fB\-p\fR, \fB\-\-preserve-environment\fR
-Preserves the whole environment, ie does not set
-\fB\-s\fR \fISHELL\fR, \fB\-\-shell\fR=\fISHELL\fR
-Runs the specified shell instead of the default.  The shell to run is
-selected according to the following rules in order:
-.RS 10
-the shell specified with
-.B \-\-shell
-The shell specified in the environment variable
-if the
-.B \-\-preserve-environment
-option is used.
-the shell listed in the passwd entry of the target user
-If the target user has a restricted shell (i.e. not listed in
-/etc/shells) the
-.B \-\-shell
-option and the
-environment variables are ignored unless the calling user is root.
-Display help text and exit.
-Display version information and exit.
-.B su
-reads the
-.I /etc/default/su
-.I /etc/login.defs
-configuration files.  The following configuration items are relevant
-.BR su (1):
-.RS 4
-Delay in seconds in case of authentication failure.  Number must be
-a non-negative integer.
-.RS 4
-Defines the PATH environment variable for a regular user.  The
-default value is
-.IR /usr/local/bin:\:/bin:\:/usr/bin .
-.RS 4
-Defines the PATH environment variable for root. The default value is
-.IR /usr/local/sbin:\:/usr/local/bin:\:/sbin:\:/bin:\:/usr/sbin:\:/usr/bin .
-.RS 4
-If set to
-.I yes
-and \-\-login and \-\-preserve\-environment were not specified
-.B su
-.B su
-normally returns the exit status of the command it executed.  If the
-command was killed by a signal,
-.B su
-returns the number of the signal plus 128.
-Exit status generated by
-.B su
-.RS 10
-Generic error before executing the requested command
-The requested command could not be executed
-The requested command could was not found
-.PD 0
-.TP 17
-default PAM configuration file
-PAM configuration file if \-\-login is specified
-command specific logindef config file
-global logindef config file
-.PD 1
-.BR pam (8),
-.BR shells (5),
-.BR login.defs (5)
-Derived from coreutils' su which was based on an implementation from
-David MacKenzie.
-The su command is part of the util-linux package and is
-available from
-.UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
-Linux Kernel Archive
-.UE .

More information about the arch-commits mailing list