[Glibc-bsd-commits] r5417 - in trunk/freebsd-utils/debian: . local/scripts/bin patches

rmh at alioth.debian.org rmh at alioth.debian.org
Wed Feb 5 21:30:45 UTC 2014


Author: rmh
Date: 2014-02-05 21:30:45 +0000 (Wed, 05 Feb 2014)
New Revision: 5417

Added:
   trunk/freebsd-utils/debian/patches/cli_compat.diff
Removed:
   trunk/freebsd-utils/debian/patches/mount_cli_compat.diff
Modified:
   trunk/freebsd-utils/debian/changelog
   trunk/freebsd-utils/debian/freebsd-utils.install
   trunk/freebsd-utils/debian/local/scripts/bin/sysctl
   trunk/freebsd-utils/debian/patches/series
Log:
Add 'sysctl -p' support. Replace /sbin/sysctl wrapper script with actual binary.

Modified: trunk/freebsd-utils/debian/changelog
===================================================================
--- trunk/freebsd-utils/debian/changelog	2014-02-05 20:59:48 UTC (rev 5416)
+++ trunk/freebsd-utils/debian/changelog	2014-02-05 21:30:45 UTC (rev 5417)
@@ -1,3 +1,10 @@
+freebsd-utils (10.0-3) UNRELEASED; urgency=low
+
+  * Add 'sysctl -p' support. Replace /sbin/sysctl wrapper script with
+    actual binary.
+
+ -- Robert Millan <rmh at debian.org>  Wed, 05 Feb 2014 22:09:43 +0100
+
 freebsd-utils (10.0-2) experimental; urgency=low
 
   * Handle USB keyboard attach/detach events.

Modified: trunk/freebsd-utils/debian/freebsd-utils.install
===================================================================
--- trunk/freebsd-utils/debian/freebsd-utils.install	2014-02-05 20:59:48 UTC (rev 5416)
+++ trunk/freebsd-utils/debian/freebsd-utils.install	2014-02-05 21:30:45 UTC (rev 5417)
@@ -2,11 +2,11 @@
 
 sbin/mount				/bin
 sbin/umount				/lib/freebsd
-sbin/sysctl				/lib/freebsd
+sbin/sysctl				/sbin
 src/etc/sysctl.conf			/etc
 
 debian/local/devfs.d/*			/etc/devfs.d
-debian/local/scripts/bin/sysctl		/sbin
+debian/local/scripts/bin/sysctl		/lib/freebsd
 debian/local/scripts/sbin/umount	/sbin
 
 sbin/dmesg				/bin

Modified: trunk/freebsd-utils/debian/local/scripts/bin/sysctl
===================================================================
--- trunk/freebsd-utils/debian/local/scripts/bin/sysctl	2014-02-05 20:59:48 UTC (rev 5416)
+++ trunk/freebsd-utils/debian/local/scripts/bin/sysctl	2014-02-05 21:30:45 UTC (rev 5417)
@@ -1,31 +1,3 @@
 #!/bin/sh
-set -e
-
-args=""
-quiet="false"
-use_sysctl_conf=false
-
-while [ $# -gt 0 ]; do
-  case "$1" in
-    -q) quiet=true ;;
-    -p) use_sysctl_conf=true ;;
-    *)  if [ -n "${args}" ] ; then args="${args} $1" ; else args="$1" ; fi ;;
-  esac
-  shift
-done
-
-if ${quiet} ; then
-  if ${use_sysctl_conf} ; then
-    sed /etc/sysctl.conf -e "s/\( \|\t\)*//g" -e "/^#/d" -e "/^$/d" \
-    | (while read i ; do /lib/freebsd/sysctl ${args} ${i} >/dev/null ; done)
-  else
-    /lib/freebsd/sysctl ${args} >/dev/null
-  fi
-else
-  if ${use_sysctl_conf} ; then
-    sed /etc/sysctl.conf -e "s/\( \|\t\)*//g" -e "/^#/d" -e "/^$/d" \
-    | (while read i ; do /lib/freebsd/sysctl ${args} ${i} ; done)
-  else
-    exec /lib/freebsd/sysctl ${args}
-  fi
-fi
+echo "$0: deprecated, use /sbin/sysctl instead" >&2
+exec /sbin/sysctl $@

Copied: trunk/freebsd-utils/debian/patches/cli_compat.diff (from rev 5364, trunk/freebsd-utils/debian/patches/mount_cli_compat.diff)
===================================================================
--- trunk/freebsd-utils/debian/patches/cli_compat.diff	                        (rev 0)
+++ trunk/freebsd-utils/debian/patches/cli_compat.diff	2014-02-05 21:30:45 UTC (rev 5417)
@@ -0,0 +1,60 @@
+
+Upstream wants the "-o remount" glue in kernel, see:
+
+http://lists.freebsd.org/pipermail/freebsd-fs/2013-July/017794.html
+
+Also see kfreebsd-10/debian/patches/mount_remount.diff
+
+--- a/src/sbin/mount/mount.c
++++ b/src/sbin/mount/mount.c
+@@ -253,7 +253,7 @@
+ 	options = NULL;
+ 	vfslist = NULL;
+ 	vfstype = "ufs";
+-	while ((ch = getopt(argc, argv, "adF:fLlno:prt:uvw")) != -1)
++	while ((ch = getopt(argc, argv, "adF:fLlno:prt:uvwO:")) != -1)
+ 		switch (ch) {
+ 		case 'a':
+ 			all = 1;
+@@ -277,6 +277,9 @@
+ 		case 'n':
+ 			/* For compatibility with the Linux version of mount. */
+ 			break;
++		case 'O':
++			/* For compatibility with the Linux version of mount. */
++			break;
+ 		case 'o':
+ 			if (*optarg) {
+ 				options = catopt(options, optarg);
+@@ -774,6 +777,11 @@
+ 			} else if (strncmp(p, groupquotaeq,
+ 			    sizeof(groupquotaeq) - 1) == 0) {
+ 				continue;
++			} else if (strcmp(p, "remount") == 0) {
++				/* Compatibility glue. */
++				append_arg(a, strdup("-o"));
++				append_arg(a, strdup("update"));
++				continue;
+ 			} else if (*p == '-') {
+ 				append_arg(a, p);
+ 				p = strchr(p, '=');
+--- a/src/sbin/sysctl/sysctl.c
++++ b/src/sbin/sysctl/sysctl.c
+@@ -93,7 +93,7 @@
+ 	setbuf(stdout,0);
+ 	setbuf(stderr,0);
+ 
+-	while ((ch = getopt(argc, argv, "Aabdef:hiNnoqTwWxX")) != -1) {
++	while ((ch = getopt(argc, argv, "Aabdef:hiNnoqTwWxXp:")) != -1) {
+ 		switch (ch) {
+ 		case 'A':
+ 			/* compatibility */
+@@ -111,6 +111,8 @@
+ 		case 'e':
+ 			eflag = 1;
+ 			break;
++		case 'p':
++			/* For compatibility with the Linux version of sysctl. */
+ 		case 'f':
+ 			conffile = optarg;
+ 			break;

Deleted: trunk/freebsd-utils/debian/patches/mount_cli_compat.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/mount_cli_compat.diff	2014-02-05 20:59:48 UTC (rev 5416)
+++ trunk/freebsd-utils/debian/patches/mount_cli_compat.diff	2014-02-05 21:30:45 UTC (rev 5417)
@@ -1,40 +0,0 @@
-
-Upstream wants the "-o remount" glue in kernel, see:
-
-http://lists.freebsd.org/pipermail/freebsd-fs/2013-July/017794.html
-
-Also see kfreebsd-10/debian/patches/mount_remount.diff
-
---- a/src/sbin/mount/mount.c
-+++ b/src/sbin/mount/mount.c
-@@ -253,7 +253,7 @@
- 	options = NULL;
- 	vfslist = NULL;
- 	vfstype = "ufs";
--	while ((ch = getopt(argc, argv, "adF:fLlno:prt:uvw")) != -1)
-+	while ((ch = getopt(argc, argv, "adF:fLlno:prt:uvwO:")) != -1)
- 		switch (ch) {
- 		case 'a':
- 			all = 1;
-@@ -277,6 +277,9 @@
- 		case 'n':
- 			/* For compatibility with the Linux version of mount. */
- 			break;
-+		case 'O':
-+			/* For compatibility with the Linux version of mount. */
-+			break;
- 		case 'o':
- 			if (*optarg) {
- 				options = catopt(options, optarg);
-@@ -774,6 +777,11 @@
- 			} else if (strncmp(p, groupquotaeq,
- 			    sizeof(groupquotaeq) - 1) == 0) {
- 				continue;
-+			} else if (strcmp(p, "remount") == 0) {
-+				/* Compatibility glue. */
-+				append_arg(a, strdup("-o"));
-+				append_arg(a, strdup("update"));
-+				continue;
- 			} else if (*p == '-') {
- 				append_arg(a, p);
- 				p = strchr(p, '=');

Modified: trunk/freebsd-utils/debian/patches/series
===================================================================
--- trunk/freebsd-utils/debian/patches/series	2014-02-05 20:59:48 UTC (rev 5416)
+++ trunk/freebsd-utils/debian/patches/series	2014-02-05 21:30:45 UTC (rev 5417)
@@ -5,7 +5,7 @@
 
 # Patches that are in good shape for merging upstream
 pf_regex_c.diff
-mount_cli_compat.diff
+cli_compat.diff
 ppp_macros.diff
 netstat_numeric_default.diff
 route_list.diff




More information about the Glibc-bsd-commits mailing list