svn commit: r359835 - head/usr.sbin/bsdconfig

2020-04-12 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Sun Apr 12 20:54:35 2020
New Revision: 359835
URL: https://svnweb.freebsd.org/changeset/base/359835

Log:
  Add mention of wireless option in bsdconfig
  
  Submitted by: debdrup
  Approved by:  dteske (maintainer)
  Differential Revision:https://reviews.freebsd.org/D24378

Modified:
  head/usr.sbin/bsdconfig/bsdconfig.8

Modified: head/usr.sbin/bsdconfig/bsdconfig.8
==
--- head/usr.sbin/bsdconfig/bsdconfig.8 Sun Apr 12 19:25:28 2020
(r359834)
+++ head/usr.sbin/bsdconfig/bsdconfig.8 Sun Apr 12 20:54:35 2020
(r359835)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 5, 2013
+.Dd April 12, 2020
 .Dt BSDCONFIG 8
 .Os
 .Sh NAME
@@ -148,8 +148,8 @@ Shortcut to the DNS Nameservers menu under networking.
 .It Cm netdev
 Shortcut to the Network Interfaces menu under networking.
 .It Cm networking
-Utilities to set/change Hostname/Domain, Network Interfaces, Default
-Router/Gateway, and DNS Nameservers.
+Utilities to set/change Hostname/Domain, Network Interfaces, Wireless
+Network, Default Router/Gateway, and DNS Nameservers.
 .It Cm packages
 Browse, install, uninstall, or re-install packaged software.
 .It Cm password
@@ -209,6 +209,8 @@ Shortcut to the Delete Users menu under usermgmt.
 Shortcut to the Edit/View Users menu under usermgmt.
 .It Cm usermgmt
 Utilities to Add/Edit/View/Delete User Accounts.
+.It Cm wireless
+Shortcut to the Wireless Networks menu under networking.
 .El
 .Sh INTERNATIONALIZATION
 i18n features are built into
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-10-12 Thread Chris Rees
Hi again,

On 9 April 2019 22:13:29 BST, Chris Rees  wrote:
>
>
>On 9 April 2019 22:08:35 BST, "Rodney W. Grimes"
> wrote:
>>> On 09/04/2019 20:59, Chris Rees wrote:
>>> > On 9 April 2019 20:55:07 BST, "Rodney W. Grimes"
>> wrote:
>>> >>> On 09/04/2019 21:33, Rodney W. Grimes wrote:
>>> >>>> I think the trigger issue is:
>>> >>>> grep zfs /etc/rc.d/zvol
>>> >>>> rcvar="zfs_enable"
>>> >>>> required_modules="zfs"
>>> >>>>
>>> >>>> that module requires may be going south with the
>>> >>>> new code when the module is built into the kernel.
>>> >>> Maybe it's because the module's name is zfsctrl (for whatever
>>reason)
>>> >> while the
>>> >>> module file is named zfs.ko.
>>> >> I suspect that could also lead to issues with the new code.
>>> >> It seems to be failing to detect that zfs is infact functional in
>>the
>>> >> kernel,
>>> >> and blindly, or not so blindly, trying to load zfs,ko, which when
>>you
>>> >> build
>>> >> it into the kernel you usually do so without any modules built,
>so
>>> >> there is
>>> >> no /boot/kernel/zfs.ko, and even if you did build it any attempt
>>to
>>> >> load
>>> >> it would return an error.
>>> > Loading with it built in isn't a problem, as I showed earlier.
>>> >
>>> > Loading when it doesn't exist *is*.
>>> >
>>> > I'm torn.  Either we could revert this, or add a check to the
>>required_modules function instead, which I think is the better
>>solution.
>>> 
>>> Hang on,
>>> 
>>> [crees@pegasus]~% sudo kldload -n zfsctrl && echo yes
>>> yes
>>
>>I think your testing the return value of sudo here?
>
>Sudo returns the child's return value.
>

Turns out Oliver had also reported this to current@ with a log

https://lists.freebsd.org/pipermail/freebsd-current/2019-April/073148.html

Jilles@, mind if I revert this while I get some testing on this scenario done?

It seems to me that zfs may not be included in the kernel, just zfsctrl, or 
something like that.

Chris
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r352107 - head/share/man/man5

2019-09-09 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Mon Sep  9 20:48:12 2019
New Revision: 352107
URL: https://svnweb.freebsd.org/changeset/base/352107

Log:
  Reverse the referenced tables.
  
  If ipv4_prefer is specified, Section 10.3 is relevant.
  If ipv6_prefer is specified, Section  2.1 is relevant.
  
  This change makes the corresponding options/sections 'respective'
  
  PR:   docs/234249
  Submitted by: David Fiander 

Modified:
  head/share/man/man5/rc.conf.5

Modified: head/share/man/man5/rc.conf.5
==
--- head/share/man/man5/rc.conf.5   Mon Sep  9 20:04:45 2019
(r352106)
+++ head/share/man/man5/rc.conf.5   Mon Sep  9 20:48:12 2019
(r352107)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 18, 2019
+.Dd September 9, 2019
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -1779,10 +1779,10 @@ or
 .Dq Li ipv6_prefer
 is specified,
 .Xr ip6addrctl 8
-installs a pre-defined policy table described in Section 2.1
-.Pq IPv6-preferred
-or 10.3
+installs a pre-defined policy table described in Section 10.3
 .Pq IPv4-preferred
+or 2.1
+.Pq IPv6-preferred
 of RFC 3484.
 .Pp
 If
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-09-03 Thread Chris Rees



On 09/04/2019 20:59, Chris Rees wrote:

On 9 April 2019 20:55:07 BST, "Rodney W. Grimes"  
wrote:

On 09/04/2019 21:33, Rodney W. Grimes wrote:

I think the trigger issue is:
grep zfs /etc/rc.d/zvol
rcvar="zfs_enable"
required_modules="zfs"

that module requires may be going south with the
new code when the module is built into the kernel.

Maybe it's because the module's name is zfsctrl (for whatever reason)

while the

module file is named zfs.ko.

I suspect that could also lead to issues with the new code.
It seems to be failing to detect that zfs is infact functional in the
kernel,
and blindly, or not so blindly, trying to load zfs,ko, which when you
build
it into the kernel you usually do so without any modules built, so
there is
no /boot/kernel/zfs.ko, and even if you did build it any attempt to
load
it would return an error.

Loading with it built in isn't a problem, as I showed earlier.

Loading when it doesn't exist *is*.

I'm torn.  Either we could revert this, or add a check to the required_modules 
function instead, which I think is the better solution.


Hang on,

[crees@pegasus]~% sudo kldload -n zfsctrl && echo yes
yes

[crees@pegasus]~% find /boot -name zfsctrl\*
[crees@pegasus]~%

I think that, rather than speculating, we should wait for Oliver to 
confirm that this is actually the problem, because I still don't think 
it is.


Chris


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r346072 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-09-03 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Wed Apr 10 07:51:13 2019
New Revision: 346072
URL: https://svnweb.freebsd.org/changeset/base/346072

Log:
  Revert r346017 pending compiled-in zfs fix
  
  PR:   237172
  Approved by:  jilles
  Differential Revision:https://reviews.freebsd.org/D18670

Modified:
  head/libexec/rc/rc.d/abi
  head/libexec/rc/rc.d/bthidd
  head/libexec/rc/rc.d/cfumass
  head/libexec/rc/rc.d/kld
  head/libexec/rc/rc.d/mdconfig
  head/libexec/rc/rc.d/mdconfig2
  head/libexec/rc/rc.d/mountcritremote
  head/libexec/rc/rc.d/syscons
  head/libexec/rc/rc.subr
  head/share/man/man5/rc.conf.5

Modified: head/libexec/rc/rc.d/abi
==
--- head/libexec/rc/rc.d/abiWed Apr 10 06:23:15 2019(r346071)
+++ head/libexec/rc/rc.d/abiWed Apr 10 07:51:13 2019(r346072)
@@ -27,10 +27,10 @@ linux_start()
local _tmpdir
 
echo -n ' linux'
-   load_kld linux
+   load_kld -e 'linux(aout|elf)' linux
case `sysctl -n hw.machine_arch` in
amd64)
-   load_kld linux64
+   load_kld -e 'linux64elf' linux64
;;
esac
if [ -x /compat/linux/sbin/ldconfigDisabled ]; then

Modified: head/libexec/rc/rc.d/bthidd
==
--- head/libexec/rc/rc.d/bthidd Wed Apr 10 06:23:15 2019(r346071)
+++ head/libexec/rc/rc.d/bthidd Wed Apr 10 07:51:13 2019(r346072)
@@ -34,11 +34,11 @@ evdev_enabled()
 bthidd_prestart()
 {
if evdev_enabled; then
-   load_kld uinput
+   load_kld -m uinput uinput
fi
-   load_kld kbdmux
-   load_kld vkbd
-   load_kld ng_btsocket
+   load_kld -m kbdmux kbdmux
+   load_kld -m vkbd vkbd
+   load_kld -m ng_btsocket ng_btsocket
return 0
 }
 

Modified: head/libexec/rc/rc.d/cfumass
==
--- head/libexec/rc/rc.d/cfumassWed Apr 10 06:23:15 2019
(r346071)
+++ head/libexec/rc/rc.d/cfumassWed Apr 10 07:51:13 2019
(r346072)
@@ -75,7 +75,7 @@ cfumass_start()
return "${err}"
fi
 
-   load_kld cfumass
+   load_kld -e cfumass cfumass
 
# If the template is already switched to Mass Storage, then reset
# it to -1 to force the host to reenumerate it; otherwise it might

Modified: head/libexec/rc/rc.d/kld
==
--- head/libexec/rc/rc.d/kldWed Apr 10 06:23:15 2019(r346071)
+++ head/libexec/rc/rc.d/kldWed Apr 10 07:51:13 2019(r346072)
@@ -46,7 +46,7 @@ kld_start()
 
echo 'Loading kernel modules:'
for _kld in $kld_list ; do
-   load_kld $_kld
+   load_kld -e ${_kld}.ko $_kld
done
 }
 

Modified: head/libexec/rc/rc.d/mdconfig
==
--- head/libexec/rc/rc.d/mdconfig   Wed Apr 10 06:23:15 2019
(r346071)
+++ head/libexec/rc/rc.d/mdconfig   Wed Apr 10 07:51:13 2019
(r346072)
@@ -114,7 +114,7 @@ mdconfig_start()
continue
fi
if [ "${_file}" != "${_file%.uzip}" ]; then
-   load_kld geom_uzip || return 3
+   load_kld -m g_uzip geom_uzip || return 3
# sleep a bit to allow creation of 
/dev/mdX.uzip
sleep 2
fi

Modified: head/libexec/rc/rc.d/mdconfig2
==
--- head/libexec/rc/rc.d/mdconfig2  Wed Apr 10 06:23:15 2019
(r346071)
+++ head/libexec/rc/rc.d/mdconfig2  Wed Apr 10 07:51:13 2019
(r346072)
@@ -123,7 +123,7 @@ mdconfig2_start()
# been created.
if [ "${_type}" = "vnode" -a "${_fs}" != "/" ]; then
if [ "${_file}" != "${_file%.uzip}" ]; then
-   load_kld geom_uzip || return 3
+   load_kld -m g_uzip geom_uzip || return 3
fi
if is_readonly ${_fs}; then
warn "${_fs} is mounted read-only, skipping 
${_md}."

Modified: head/libexec/rc/rc.d/mountcritremote
==
--- head/libexec/rc/rc.d/mountcritremoteWed Apr 10 06:23:15 2019
(r346071)
+++ head/libexec/rc/rc.d/mountcritremoteWed Apr 10 07:51:13 2019
(r346072)
@@ -27,7 +27,7 @@ mountcritremote_precmd()
case "`mount -d -a -t nfs 2> /dev/null`" in
*mount_nfs*)
 

Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-09-03 Thread Chris Rees



On 9 April 2019 20:55:07 BST, "Rodney W. Grimes"  
wrote:
>> On 09/04/2019 21:33, Rodney W. Grimes wrote:
>> > I think the trigger issue is:
>> > grep zfs /etc/rc.d/zvol 
>> > rcvar="zfs_enable"
>> > required_modules="zfs"
>> > 
>> > that module requires may be going south with the
>> > new code when the module is built into the kernel.
>> 
>> Maybe it's because the module's name is zfsctrl (for whatever reason)
>while the
>> module file is named zfs.ko.
>
>I suspect that could also lead to issues with the new code.
>It seems to be failing to detect that zfs is infact functional in the
>kernel,
>and blindly, or not so blindly, trying to load zfs,ko, which when you
>build
>it into the kernel you usually do so without any modules built, so
>there is
>no /boot/kernel/zfs.ko, and even if you did build it any attempt to
>load
>it would return an error.

Loading with it built in isn't a problem, as I showed earlier.

Loading when it doesn't exist *is*.

I'm torn.  Either we could revert this, or add a check to the required_modules 
function instead, which I think is the better solution.

Chris
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-09-03 Thread Chris Rees
Hey,

On 9 April 2019 14:13:54 BST, "O. Hartmann"  wrote:
>On Sun, 7 Apr 2019 18:31:45 + (UTC)
>Chris Rees  wrote:
>
>> Author: crees (doc,ports committer)
>> Date: Sun Apr  7 18:31:45 2019
>> New Revision: 346017
>> URL: https://svnweb.freebsd.org/changeset/base/346017
>>
>> Log:
>>   Remove now unnecessary kldstat check before attempting to load
>modules.
>>
>>   Since r233109, kldload has the -n option, which silently ignores
>options
>>   that are already loaded.
>>
>>  
>https://lists.freebsd.org/pipermail/freebsd-rc/2018-December/003899.html
>>
>>   Note that this script no longer reports if the module is already
>loaded,
>>   but it could be argued this wasn't particularly useful information.
>>
>>   PR:docs/234248
>>   Reviewed by:   bcr (docs), kib, rgrimes (visual)
>>   Approved by:   jilles
>>   Differential Revision: https://reviews.freebsd.org/D18670
>>
>> Modified:
>>   head/libexec/rc/rc.d/abi
>>   head/libexec/rc/rc.d/bthidd
>>   head/libexec/rc/rc.d/cfumass
>>   head/libexec/rc/rc.d/kld
>>   head/libexec/rc/rc.d/mdconfig
>>   head/libexec/rc/rc.d/mdconfig2
>>   head/libexec/rc/rc.d/mountcritremote
>>   head/libexec/rc/rc.d/syscons
>>   head/libexec/rc/rc.subr
>>   head/share/man/man5/rc.conf.5
>>
>> Modified: head/libexec/rc/rc.d/abi
>>
>==


{Snip}


>It seems this patch breaks ZFS if ZFS is built-in kernel!
>
>Having ZFS as kernel built-in leaves the system not mounting ANY(!) ZFS
>volume
>at boot time, rendering servers unusable.
>Mounting ZFS filesystems with "zfs mount -a" bring back the ZFS
>filesystems as
>expected.
>

Are you sure it's this causing that?  Please try reverting it.

Chris 
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-09-03 Thread Chris Rees



On 9 April 2019 22:08:35 BST, "Rodney W. Grimes"  
wrote:
>> On 09/04/2019 20:59, Chris Rees wrote:
>> > On 9 April 2019 20:55:07 BST, "Rodney W. Grimes"
> wrote:
>> >>> On 09/04/2019 21:33, Rodney W. Grimes wrote:
>> >>>> I think the trigger issue is:
>> >>>> grep zfs /etc/rc.d/zvol
>> >>>> rcvar="zfs_enable"
>> >>>> required_modules="zfs"
>> >>>>
>> >>>> that module requires may be going south with the
>> >>>> new code when the module is built into the kernel.
>> >>> Maybe it's because the module's name is zfsctrl (for whatever
>reason)
>> >> while the
>> >>> module file is named zfs.ko.
>> >> I suspect that could also lead to issues with the new code.
>> >> It seems to be failing to detect that zfs is infact functional in
>the
>> >> kernel,
>> >> and blindly, or not so blindly, trying to load zfs,ko, which when
>you
>> >> build
>> >> it into the kernel you usually do so without any modules built, so
>> >> there is
>> >> no /boot/kernel/zfs.ko, and even if you did build it any attempt
>to
>> >> load
>> >> it would return an error.
>> > Loading with it built in isn't a problem, as I showed earlier.
>> >
>> > Loading when it doesn't exist *is*.
>> >
>> > I'm torn.  Either we could revert this, or add a check to the
>required_modules function instead, which I think is the better
>solution.
>> 
>> Hang on,
>> 
>> [crees@pegasus]~% sudo kldload -n zfsctrl && echo yes
>> yes
>
>I think your testing the return value of sudo here?

Sudo returns the child's return value.

Chris

>> [crees@pegasus]~% find /boot -name zfsctrl\*
>> [crees@pegasus]~%
>> 
>> I think that, rather than speculating, we should wait for Oliver to 
>> confirm that this is actually the problem, because I still don't
>think 
>> it is.
>> 
>> Chris
>> 
>> 
>> -- 
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>> 
>> 

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-09-03 Thread Chris Rees

Hi Rod,

On 09/04/2019 19:33, Rodney W. Grimes wrote:

Hey,

On 9 April 2019 14:13:54 BST, "O. Hartmann"  wrote:

On Sun, 7 Apr 2019 18:31:45 +0000 (UTC)
Chris Rees  wrote:


Author: crees (doc,ports committer)
Date: Sun Apr  7 18:31:45 2019
New Revision: 346017
URL: https://svnweb.freebsd.org/changeset/base/346017

Log:
   Remove now unnecessary kldstat check before attempting to load

modules.

   Since r233109, kldload has the -n option, which silently ignores

options

   that are already loaded.

  

https://lists.freebsd.org/pipermail/freebsd-rc/2018-December/003899.html

   Note that this script no longer reports if the module is already

loaded,

   but it could be argued this wasn't particularly useful information.

   PR:  docs/234248
   Reviewed by: bcr (docs), kib, rgrimes (visual)
   Approved by: jilles
   Differential Revision:   https://reviews.freebsd.org/D18670

Modified:
   head/libexec/rc/rc.d/abi
   head/libexec/rc/rc.d/bthidd
   head/libexec/rc/rc.d/cfumass
   head/libexec/rc/rc.d/kld
   head/libexec/rc/rc.d/mdconfig
   head/libexec/rc/rc.d/mdconfig2
   head/libexec/rc/rc.d/mountcritremote
   head/libexec/rc/rc.d/syscons
   head/libexec/rc/rc.subr
   head/share/man/man5/rc.conf.5

Modified: head/libexec/rc/rc.d/abi


==


{Snip}



It seems this patch breaks ZFS if ZFS is built-in kernel!

Having ZFS as kernel built-in leaves the system not mounting ANY(!) ZFS
volume
at boot time, rendering servers unusable.
Mounting ZFS filesystems with "zfs mount -a" bring back the ZFS
filesystems as
expected.


Are you sure it's this causing that?  Please try reverting it.

I think the trigger issue is:
grep zfs /etc/rc.d/zvol
rcvar="zfs_enable"
required_modules="zfs"

that module requires may be going south with the
new code when the module is built into the kernel.



I wondered that, but I don't think so.

[crees@pegasus]~% kldstat -v |head
Id Refs Address    Size Name
 1   30 0x8020 11df240  kernel (/boot/kernel.PEGASUS/kernel)
    Contains modules:
    Id Name
    227 newreno
    215 if_lo
    229 ipsec
    228 mld
    226 igmp
    201 elf32
[crees@pegasus]~% sudo kldload ipsec
kldload: can't load ipsec: module already loaded or in kernel
[crees@pegasus]~% sudo kldload -n ipsec
[crees@pegasus]~% echo $?
0
[crees@pegasus]~%

The required_modules code calls load_kld, which uses kldload -n. This 
always returns true... unless Oliver has removed the zfs module from 
/boot/kernel perhaps?


Chris


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2019-09-03 Thread Chris Rees

On 2019-04-08 08:57, Oliver Pinter wrote:

On Monday, April 8, 2019, Warner Losh  wrote:




On Sun, Apr 7, 2019, 3:16 PM Oliver Pinter 


wrote:


Please revert this patch. If I'm not wrong, this will break the
freebsd-version command's generation or output.



You are going to need to be a lot more specific about this. It makes 
no
sense to me at all how any of this could break that. The code is 
identical

logically and produces the same result.



Now I double checked, it may work, but I remembered to this "black 
magic" :

https://github.com/freebsd/freebsd/blob/master/bin/freebsd-version/Makefile



Given it will evaluate to

BRANCH=${BRANCH_OVERRIDE:-CURRENT}

which unless you set BRANCH_OVERRIDE, then it will still work no 
problem.


Chris

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-09-03 Thread Chris Rees
Hey,

On 7 April 2019 22:14:56 BST, Oliver Pinter  
wrote:
>On Sunday, April 7, 2019, Chris Rees  wrote:
>
>> Author: crees (doc,ports committer)
>> Date: Sun Apr  7 18:31:45 2019
>> New Revision: 346017
>> URL: https://svnweb.freebsd.org/changeset/base/346017
>>
>> Log:
>>   Remove now unnecessary kldstat check before attempting to load
>modules.
>>
>>   Since r233109, kldload has the -n option, which silently ignores
>options
>>   that are already loaded.
>>
>>  
>https://lists.freebsd.org/pipermail/freebsd-rc/2018-December/003899.html
>>
>>   Note that this script no longer reports if the module is already
>loaded,
>>   but it could be argued this wasn't particularly useful information.
>>
>>   PR:   docs/234248
>
>
>This is why a docs PR?

Followup from that PR.

>>   Reviewed by:  bcr (docs), kib, rgrimes (visual)
>
>
>I haven't seen kib on the reviewers list.

Please refer to the conversation on freebsd-rc that I linked in the commit 
message.

Chris
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-09-03 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Sun Apr  7 18:31:45 2019
New Revision: 346017
URL: https://svnweb.freebsd.org/changeset/base/346017

Log:
  Remove now unnecessary kldstat check before attempting to load modules.
  
  Since r233109, kldload has the -n option, which silently ignores options
  that are already loaded.
  
  https://lists.freebsd.org/pipermail/freebsd-rc/2018-December/003899.html
  
  Note that this script no longer reports if the module is already loaded,
  but it could be argued this wasn't particularly useful information.
  
  PR:   docs/234248
  Reviewed by:  bcr (docs), kib, rgrimes (visual)
  Approved by:  jilles
  Differential Revision:https://reviews.freebsd.org/D18670

Modified:
  head/libexec/rc/rc.d/abi
  head/libexec/rc/rc.d/bthidd
  head/libexec/rc/rc.d/cfumass
  head/libexec/rc/rc.d/kld
  head/libexec/rc/rc.d/mdconfig
  head/libexec/rc/rc.d/mdconfig2
  head/libexec/rc/rc.d/mountcritremote
  head/libexec/rc/rc.d/syscons
  head/libexec/rc/rc.subr
  head/share/man/man5/rc.conf.5

Modified: head/libexec/rc/rc.d/abi
==
--- head/libexec/rc/rc.d/abiSun Apr  7 18:24:26 2019(r346016)
+++ head/libexec/rc/rc.d/abiSun Apr  7 18:31:45 2019(r346017)
@@ -27,10 +27,10 @@ linux_start()
local _tmpdir
 
echo -n ' linux'
-   load_kld -e 'linux(aout|elf)' linux
+   load_kld linux
case `sysctl -n hw.machine_arch` in
amd64)
-   load_kld -e 'linux64elf' linux64
+   load_kld linux64
;;
esac
if [ -x /compat/linux/sbin/ldconfigDisabled ]; then

Modified: head/libexec/rc/rc.d/bthidd
==
--- head/libexec/rc/rc.d/bthidd Sun Apr  7 18:24:26 2019(r346016)
+++ head/libexec/rc/rc.d/bthidd Sun Apr  7 18:31:45 2019(r346017)
@@ -34,11 +34,11 @@ evdev_enabled()
 bthidd_prestart()
 {
if evdev_enabled; then
-   load_kld -m uinput uinput
+   load_kld uinput
fi
-   load_kld -m kbdmux kbdmux
-   load_kld -m vkbd vkbd
-   load_kld -m ng_btsocket ng_btsocket
+   load_kld kbdmux
+   load_kld vkbd
+   load_kld ng_btsocket
return 0
 }
 

Modified: head/libexec/rc/rc.d/cfumass
==
--- head/libexec/rc/rc.d/cfumassSun Apr  7 18:24:26 2019
(r346016)
+++ head/libexec/rc/rc.d/cfumassSun Apr  7 18:31:45 2019
(r346017)
@@ -75,7 +75,7 @@ cfumass_start()
return "${err}"
fi
 
-   load_kld -e cfumass cfumass
+   load_kld cfumass
 
# If the template is already switched to Mass Storage, then reset
# it to -1 to force the host to reenumerate it; otherwise it might

Modified: head/libexec/rc/rc.d/kld
==
--- head/libexec/rc/rc.d/kldSun Apr  7 18:24:26 2019(r346016)
+++ head/libexec/rc/rc.d/kldSun Apr  7 18:31:45 2019(r346017)
@@ -46,7 +46,7 @@ kld_start()
 
echo 'Loading kernel modules:'
for _kld in $kld_list ; do
-   load_kld -e ${_kld}.ko $_kld
+   load_kld $_kld
done
 }
 

Modified: head/libexec/rc/rc.d/mdconfig
==
--- head/libexec/rc/rc.d/mdconfig   Sun Apr  7 18:24:26 2019
(r346016)
+++ head/libexec/rc/rc.d/mdconfig   Sun Apr  7 18:31:45 2019
(r346017)
@@ -114,7 +114,7 @@ mdconfig_start()
continue
fi
if [ "${_file}" != "${_file%.uzip}" ]; then
-   load_kld -m g_uzip geom_uzip || return 3
+   load_kld geom_uzip || return 3
# sleep a bit to allow creation of 
/dev/mdX.uzip
sleep 2
fi

Modified: head/libexec/rc/rc.d/mdconfig2
==
--- head/libexec/rc/rc.d/mdconfig2  Sun Apr  7 18:24:26 2019
(r346016)
+++ head/libexec/rc/rc.d/mdconfig2  Sun Apr  7 18:31:45 2019
(r346017)
@@ -123,7 +123,7 @@ mdconfig2_start()
# been created.
if [ "${_type}" = "vnode" -a "${_fs}" != "/" ]; then
if [ "${_file}" != "${_file%.uzip}" ]; then
-   load_kld -m g_uzip geom_uzip || return 3
+   load_kld geom_uzip || return 3
fi
if is_readonly ${_fs}; then
warn "${_fs} is mounted read-only, skipping 

svn commit: r346072 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-04-10 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Wed Apr 10 07:51:13 2019
New Revision: 346072
URL: https://svnweb.freebsd.org/changeset/base/346072

Log:
  Revert r346017 pending compiled-in zfs fix
  
  PR:   237172
  Approved by:  jilles
  Differential Revision:https://reviews.freebsd.org/D18670

Modified:
  head/libexec/rc/rc.d/abi
  head/libexec/rc/rc.d/bthidd
  head/libexec/rc/rc.d/cfumass
  head/libexec/rc/rc.d/kld
  head/libexec/rc/rc.d/mdconfig
  head/libexec/rc/rc.d/mdconfig2
  head/libexec/rc/rc.d/mountcritremote
  head/libexec/rc/rc.d/syscons
  head/libexec/rc/rc.subr
  head/share/man/man5/rc.conf.5

Modified: head/libexec/rc/rc.d/abi
==
--- head/libexec/rc/rc.d/abiWed Apr 10 06:23:15 2019(r346071)
+++ head/libexec/rc/rc.d/abiWed Apr 10 07:51:13 2019(r346072)
@@ -27,10 +27,10 @@ linux_start()
local _tmpdir
 
echo -n ' linux'
-   load_kld linux
+   load_kld -e 'linux(aout|elf)' linux
case `sysctl -n hw.machine_arch` in
amd64)
-   load_kld linux64
+   load_kld -e 'linux64elf' linux64
;;
esac
if [ -x /compat/linux/sbin/ldconfigDisabled ]; then

Modified: head/libexec/rc/rc.d/bthidd
==
--- head/libexec/rc/rc.d/bthidd Wed Apr 10 06:23:15 2019(r346071)
+++ head/libexec/rc/rc.d/bthidd Wed Apr 10 07:51:13 2019(r346072)
@@ -34,11 +34,11 @@ evdev_enabled()
 bthidd_prestart()
 {
if evdev_enabled; then
-   load_kld uinput
+   load_kld -m uinput uinput
fi
-   load_kld kbdmux
-   load_kld vkbd
-   load_kld ng_btsocket
+   load_kld -m kbdmux kbdmux
+   load_kld -m vkbd vkbd
+   load_kld -m ng_btsocket ng_btsocket
return 0
 }
 

Modified: head/libexec/rc/rc.d/cfumass
==
--- head/libexec/rc/rc.d/cfumassWed Apr 10 06:23:15 2019
(r346071)
+++ head/libexec/rc/rc.d/cfumassWed Apr 10 07:51:13 2019
(r346072)
@@ -75,7 +75,7 @@ cfumass_start()
return "${err}"
fi
 
-   load_kld cfumass
+   load_kld -e cfumass cfumass
 
# If the template is already switched to Mass Storage, then reset
# it to -1 to force the host to reenumerate it; otherwise it might

Modified: head/libexec/rc/rc.d/kld
==
--- head/libexec/rc/rc.d/kldWed Apr 10 06:23:15 2019(r346071)
+++ head/libexec/rc/rc.d/kldWed Apr 10 07:51:13 2019(r346072)
@@ -46,7 +46,7 @@ kld_start()
 
echo 'Loading kernel modules:'
for _kld in $kld_list ; do
-   load_kld $_kld
+   load_kld -e ${_kld}.ko $_kld
done
 }
 

Modified: head/libexec/rc/rc.d/mdconfig
==
--- head/libexec/rc/rc.d/mdconfig   Wed Apr 10 06:23:15 2019
(r346071)
+++ head/libexec/rc/rc.d/mdconfig   Wed Apr 10 07:51:13 2019
(r346072)
@@ -114,7 +114,7 @@ mdconfig_start()
continue
fi
if [ "${_file}" != "${_file%.uzip}" ]; then
-   load_kld geom_uzip || return 3
+   load_kld -m g_uzip geom_uzip || return 3
# sleep a bit to allow creation of 
/dev/mdX.uzip
sleep 2
fi

Modified: head/libexec/rc/rc.d/mdconfig2
==
--- head/libexec/rc/rc.d/mdconfig2  Wed Apr 10 06:23:15 2019
(r346071)
+++ head/libexec/rc/rc.d/mdconfig2  Wed Apr 10 07:51:13 2019
(r346072)
@@ -123,7 +123,7 @@ mdconfig2_start()
# been created.
if [ "${_type}" = "vnode" -a "${_fs}" != "/" ]; then
if [ "${_file}" != "${_file%.uzip}" ]; then
-   load_kld geom_uzip || return 3
+   load_kld -m g_uzip geom_uzip || return 3
fi
if is_readonly ${_fs}; then
warn "${_fs} is mounted read-only, skipping 
${_md}."

Modified: head/libexec/rc/rc.d/mountcritremote
==
--- head/libexec/rc/rc.d/mountcritremoteWed Apr 10 06:23:15 2019
(r346071)
+++ head/libexec/rc/rc.d/mountcritremoteWed Apr 10 07:51:13 2019
(r346072)
@@ -27,7 +27,7 @@ mountcritremote_precmd()
case "`mount -d -a -t nfs 2> /dev/null`" in
*mount_nfs*)
 

Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-04-09 Thread Chris Rees
Hi again,

On 9 April 2019 22:13:29 BST, Chris Rees  wrote:
>
>
>On 9 April 2019 22:08:35 BST, "Rodney W. Grimes"
> wrote:
>>> On 09/04/2019 20:59, Chris Rees wrote:
>>> > On 9 April 2019 20:55:07 BST, "Rodney W. Grimes"
>> wrote:
>>> >>> On 09/04/2019 21:33, Rodney W. Grimes wrote:
>>> >>>> I think the trigger issue is:
>>> >>>> grep zfs /etc/rc.d/zvol
>>> >>>> rcvar="zfs_enable"
>>> >>>> required_modules="zfs"
>>> >>>>
>>> >>>> that module requires may be going south with the
>>> >>>> new code when the module is built into the kernel.
>>> >>> Maybe it's because the module's name is zfsctrl (for whatever
>>reason)
>>> >> while the
>>> >>> module file is named zfs.ko.
>>> >> I suspect that could also lead to issues with the new code.
>>> >> It seems to be failing to detect that zfs is infact functional in
>>the
>>> >> kernel,
>>> >> and blindly, or not so blindly, trying to load zfs,ko, which when
>>you
>>> >> build
>>> >> it into the kernel you usually do so without any modules built,
>so
>>> >> there is
>>> >> no /boot/kernel/zfs.ko, and even if you did build it any attempt
>>to
>>> >> load
>>> >> it would return an error.
>>> > Loading with it built in isn't a problem, as I showed earlier.
>>> >
>>> > Loading when it doesn't exist *is*.
>>> >
>>> > I'm torn.  Either we could revert this, or add a check to the
>>required_modules function instead, which I think is the better
>>solution.
>>> 
>>> Hang on,
>>> 
>>> [crees@pegasus]~% sudo kldload -n zfsctrl && echo yes
>>> yes
>>
>>I think your testing the return value of sudo here?
>
>Sudo returns the child's return value.
>

Turns out Oliver had also reported this to current@ with a log

https://lists.freebsd.org/pipermail/freebsd-current/2019-April/073148.html

Jilles@, mind if I revert this while I get some testing on this scenario done?

It seems to me that zfs may not be included in the kernel, just zfsctrl, or 
something like that.

Chris
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-04-09 Thread Chris Rees



On 9 April 2019 22:08:35 BST, "Rodney W. Grimes"  
wrote:
>> On 09/04/2019 20:59, Chris Rees wrote:
>> > On 9 April 2019 20:55:07 BST, "Rodney W. Grimes"
> wrote:
>> >>> On 09/04/2019 21:33, Rodney W. Grimes wrote:
>> >>>> I think the trigger issue is:
>> >>>> grep zfs /etc/rc.d/zvol
>> >>>> rcvar="zfs_enable"
>> >>>> required_modules="zfs"
>> >>>>
>> >>>> that module requires may be going south with the
>> >>>> new code when the module is built into the kernel.
>> >>> Maybe it's because the module's name is zfsctrl (for whatever
>reason)
>> >> while the
>> >>> module file is named zfs.ko.
>> >> I suspect that could also lead to issues with the new code.
>> >> It seems to be failing to detect that zfs is infact functional in
>the
>> >> kernel,
>> >> and blindly, or not so blindly, trying to load zfs,ko, which when
>you
>> >> build
>> >> it into the kernel you usually do so without any modules built, so
>> >> there is
>> >> no /boot/kernel/zfs.ko, and even if you did build it any attempt
>to
>> >> load
>> >> it would return an error.
>> > Loading with it built in isn't a problem, as I showed earlier.
>> >
>> > Loading when it doesn't exist *is*.
>> >
>> > I'm torn.  Either we could revert this, or add a check to the
>required_modules function instead, which I think is the better
>solution.
>> 
>> Hang on,
>> 
>> [crees@pegasus]~% sudo kldload -n zfsctrl && echo yes
>> yes
>
>I think your testing the return value of sudo here?

Sudo returns the child's return value.

Chris

>> [crees@pegasus]~% find /boot -name zfsctrl\*
>> [crees@pegasus]~%
>> 
>> I think that, rather than speculating, we should wait for Oliver to 
>> confirm that this is actually the problem, because I still don't
>think 
>> it is.
>> 
>> Chris
>> 
>> 
>> -- 
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>> 
>> 

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-04-09 Thread Chris Rees



On 09/04/2019 20:59, Chris Rees wrote:

On 9 April 2019 20:55:07 BST, "Rodney W. Grimes"  
wrote:

On 09/04/2019 21:33, Rodney W. Grimes wrote:

I think the trigger issue is:
grep zfs /etc/rc.d/zvol
rcvar="zfs_enable"
required_modules="zfs"

that module requires may be going south with the
new code when the module is built into the kernel.

Maybe it's because the module's name is zfsctrl (for whatever reason)

while the

module file is named zfs.ko.

I suspect that could also lead to issues with the new code.
It seems to be failing to detect that zfs is infact functional in the
kernel,
and blindly, or not so blindly, trying to load zfs,ko, which when you
build
it into the kernel you usually do so without any modules built, so
there is
no /boot/kernel/zfs.ko, and even if you did build it any attempt to
load
it would return an error.

Loading with it built in isn't a problem, as I showed earlier.

Loading when it doesn't exist *is*.

I'm torn.  Either we could revert this, or add a check to the required_modules 
function instead, which I think is the better solution.


Hang on,

[crees@pegasus]~% sudo kldload -n zfsctrl && echo yes
yes

[crees@pegasus]~% find /boot -name zfsctrl\*
[crees@pegasus]~%

I think that, rather than speculating, we should wait for Oliver to 
confirm that this is actually the problem, because I still don't think 
it is.


Chris


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-04-09 Thread Chris Rees



On 9 April 2019 20:55:07 BST, "Rodney W. Grimes"  
wrote:
>> On 09/04/2019 21:33, Rodney W. Grimes wrote:
>> > I think the trigger issue is:
>> > grep zfs /etc/rc.d/zvol 
>> > rcvar="zfs_enable"
>> > required_modules="zfs"
>> > 
>> > that module requires may be going south with the
>> > new code when the module is built into the kernel.
>> 
>> Maybe it's because the module's name is zfsctrl (for whatever reason)
>while the
>> module file is named zfs.ko.
>
>I suspect that could also lead to issues with the new code.
>It seems to be failing to detect that zfs is infact functional in the
>kernel,
>and blindly, or not so blindly, trying to load zfs,ko, which when you
>build
>it into the kernel you usually do so without any modules built, so
>there is
>no /boot/kernel/zfs.ko, and even if you did build it any attempt to
>load
>it would return an error.

Loading with it built in isn't a problem, as I showed earlier.

Loading when it doesn't exist *is*.

I'm torn.  Either we could revert this, or add a check to the required_modules 
function instead, which I think is the better solution.

Chris
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-04-09 Thread Chris Rees

Hi Rod,

On 09/04/2019 19:33, Rodney W. Grimes wrote:

Hey,

On 9 April 2019 14:13:54 BST, "O. Hartmann"  wrote:

On Sun, 7 Apr 2019 18:31:45 +0000 (UTC)
Chris Rees  wrote:


Author: crees (doc,ports committer)
Date: Sun Apr  7 18:31:45 2019
New Revision: 346017
URL: https://svnweb.freebsd.org/changeset/base/346017

Log:
   Remove now unnecessary kldstat check before attempting to load

modules.

   Since r233109, kldload has the -n option, which silently ignores

options

   that are already loaded.

  

https://lists.freebsd.org/pipermail/freebsd-rc/2018-December/003899.html

   Note that this script no longer reports if the module is already

loaded,

   but it could be argued this wasn't particularly useful information.

   PR:  docs/234248
   Reviewed by: bcr (docs), kib, rgrimes (visual)
   Approved by: jilles
   Differential Revision:   https://reviews.freebsd.org/D18670

Modified:
   head/libexec/rc/rc.d/abi
   head/libexec/rc/rc.d/bthidd
   head/libexec/rc/rc.d/cfumass
   head/libexec/rc/rc.d/kld
   head/libexec/rc/rc.d/mdconfig
   head/libexec/rc/rc.d/mdconfig2
   head/libexec/rc/rc.d/mountcritremote
   head/libexec/rc/rc.d/syscons
   head/libexec/rc/rc.subr
   head/share/man/man5/rc.conf.5

Modified: head/libexec/rc/rc.d/abi


==


{Snip}



It seems this patch breaks ZFS if ZFS is built-in kernel!

Having ZFS as kernel built-in leaves the system not mounting ANY(!) ZFS
volume
at boot time, rendering servers unusable.
Mounting ZFS filesystems with "zfs mount -a" bring back the ZFS
filesystems as
expected.


Are you sure it's this causing that?  Please try reverting it.

I think the trigger issue is:
grep zfs /etc/rc.d/zvol
rcvar="zfs_enable"
required_modules="zfs"

that module requires may be going south with the
new code when the module is built into the kernel.



I wondered that, but I don't think so.

[crees@pegasus]~% kldstat -v |head
Id Refs Address    Size Name
 1   30 0x8020 11df240  kernel (/boot/kernel.PEGASUS/kernel)
    Contains modules:
    Id Name
    227 newreno
    215 if_lo
    229 ipsec
    228 mld
    226 igmp
    201 elf32
[crees@pegasus]~% sudo kldload ipsec
kldload: can't load ipsec: module already loaded or in kernel
[crees@pegasus]~% sudo kldload -n ipsec
[crees@pegasus]~% echo $?
0
[crees@pegasus]~%

The required_modules code calls load_kld, which uses kldload -n. This 
always returns true... unless Oliver has removed the zfs module from 
/boot/kernel perhaps?


Chris


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-04-09 Thread Chris Rees
Hey,

On 9 April 2019 14:13:54 BST, "O. Hartmann"  wrote:
>On Sun, 7 Apr 2019 18:31:45 + (UTC)
>Chris Rees  wrote:
>
>> Author: crees (doc,ports committer)
>> Date: Sun Apr  7 18:31:45 2019
>> New Revision: 346017
>> URL: https://svnweb.freebsd.org/changeset/base/346017
>>
>> Log:
>>   Remove now unnecessary kldstat check before attempting to load
>modules.
>>
>>   Since r233109, kldload has the -n option, which silently ignores
>options
>>   that are already loaded.
>>
>>  
>https://lists.freebsd.org/pipermail/freebsd-rc/2018-December/003899.html
>>
>>   Note that this script no longer reports if the module is already
>loaded,
>>   but it could be argued this wasn't particularly useful information.
>>
>>   PR:docs/234248
>>   Reviewed by:   bcr (docs), kib, rgrimes (visual)
>>   Approved by:   jilles
>>   Differential Revision: https://reviews.freebsd.org/D18670
>>
>> Modified:
>>   head/libexec/rc/rc.d/abi
>>   head/libexec/rc/rc.d/bthidd
>>   head/libexec/rc/rc.d/cfumass
>>   head/libexec/rc/rc.d/kld
>>   head/libexec/rc/rc.d/mdconfig
>>   head/libexec/rc/rc.d/mdconfig2
>>   head/libexec/rc/rc.d/mountcritremote
>>   head/libexec/rc/rc.d/syscons
>>   head/libexec/rc/rc.subr
>>   head/share/man/man5/rc.conf.5
>>
>> Modified: head/libexec/rc/rc.d/abi
>>
>==


{Snip}


>It seems this patch breaks ZFS if ZFS is built-in kernel!
>
>Having ZFS as kernel built-in leaves the system not mounting ANY(!) ZFS
>volume
>at boot time, rendering servers unusable.
>Mounting ZFS filesystems with "zfs mount -a" bring back the ZFS
>filesystems as
>expected.
>

Are you sure it's this causing that?  Please try reverting it.

Chris 
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2019-04-08 Thread Chris Rees

On 2019-04-08 08:57, Oliver Pinter wrote:

On Monday, April 8, 2019, Warner Losh  wrote:




On Sun, Apr 7, 2019, 3:16 PM Oliver Pinter 


wrote:


Please revert this patch. If I'm not wrong, this will break the
freebsd-version command's generation or output.



You are going to need to be a lot more specific about this. It makes 
no
sense to me at all how any of this could break that. The code is 
identical

logically and produces the same result.



Now I double checked, it may work, but I remembered to this "black 
magic" :

https://github.com/freebsd/freebsd/blob/master/bin/freebsd-version/Makefile



Given it will evaluate to

BRANCH=${BRANCH_OVERRIDE:-CURRENT}

which unless you set BRANCH_OVERRIDE, then it will still work no 
problem.


Chris

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-04-07 Thread Chris Rees
Hey,

On 7 April 2019 22:14:56 BST, Oliver Pinter  
wrote:
>On Sunday, April 7, 2019, Chris Rees  wrote:
>
>> Author: crees (doc,ports committer)
>> Date: Sun Apr  7 18:31:45 2019
>> New Revision: 346017
>> URL: https://svnweb.freebsd.org/changeset/base/346017
>>
>> Log:
>>   Remove now unnecessary kldstat check before attempting to load
>modules.
>>
>>   Since r233109, kldload has the -n option, which silently ignores
>options
>>   that are already loaded.
>>
>>  
>https://lists.freebsd.org/pipermail/freebsd-rc/2018-December/003899.html
>>
>>   Note that this script no longer reports if the module is already
>loaded,
>>   but it could be argued this wasn't particularly useful information.
>>
>>   PR:   docs/234248
>
>
>This is why a docs PR?

Followup from that PR.

>>   Reviewed by:  bcr (docs), kib, rgrimes (visual)
>
>
>I haven't seen kib on the reviewers list.

Please refer to the conversation on freebsd-rc that I linked in the commit 
message.

Chris
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5

2019-04-07 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Sun Apr  7 18:31:45 2019
New Revision: 346017
URL: https://svnweb.freebsd.org/changeset/base/346017

Log:
  Remove now unnecessary kldstat check before attempting to load modules.
  
  Since r233109, kldload has the -n option, which silently ignores options
  that are already loaded.
  
  https://lists.freebsd.org/pipermail/freebsd-rc/2018-December/003899.html
  
  Note that this script no longer reports if the module is already loaded,
  but it could be argued this wasn't particularly useful information.
  
  PR:   docs/234248
  Reviewed by:  bcr (docs), kib, rgrimes (visual)
  Approved by:  jilles
  Differential Revision:https://reviews.freebsd.org/D18670

Modified:
  head/libexec/rc/rc.d/abi
  head/libexec/rc/rc.d/bthidd
  head/libexec/rc/rc.d/cfumass
  head/libexec/rc/rc.d/kld
  head/libexec/rc/rc.d/mdconfig
  head/libexec/rc/rc.d/mdconfig2
  head/libexec/rc/rc.d/mountcritremote
  head/libexec/rc/rc.d/syscons
  head/libexec/rc/rc.subr
  head/share/man/man5/rc.conf.5

Modified: head/libexec/rc/rc.d/abi
==
--- head/libexec/rc/rc.d/abiSun Apr  7 18:24:26 2019(r346016)
+++ head/libexec/rc/rc.d/abiSun Apr  7 18:31:45 2019(r346017)
@@ -27,10 +27,10 @@ linux_start()
local _tmpdir
 
echo -n ' linux'
-   load_kld -e 'linux(aout|elf)' linux
+   load_kld linux
case `sysctl -n hw.machine_arch` in
amd64)
-   load_kld -e 'linux64elf' linux64
+   load_kld linux64
;;
esac
if [ -x /compat/linux/sbin/ldconfigDisabled ]; then

Modified: head/libexec/rc/rc.d/bthidd
==
--- head/libexec/rc/rc.d/bthidd Sun Apr  7 18:24:26 2019(r346016)
+++ head/libexec/rc/rc.d/bthidd Sun Apr  7 18:31:45 2019(r346017)
@@ -34,11 +34,11 @@ evdev_enabled()
 bthidd_prestart()
 {
if evdev_enabled; then
-   load_kld -m uinput uinput
+   load_kld uinput
fi
-   load_kld -m kbdmux kbdmux
-   load_kld -m vkbd vkbd
-   load_kld -m ng_btsocket ng_btsocket
+   load_kld kbdmux
+   load_kld vkbd
+   load_kld ng_btsocket
return 0
 }
 

Modified: head/libexec/rc/rc.d/cfumass
==
--- head/libexec/rc/rc.d/cfumassSun Apr  7 18:24:26 2019
(r346016)
+++ head/libexec/rc/rc.d/cfumassSun Apr  7 18:31:45 2019
(r346017)
@@ -75,7 +75,7 @@ cfumass_start()
return "${err}"
fi
 
-   load_kld -e cfumass cfumass
+   load_kld cfumass
 
# If the template is already switched to Mass Storage, then reset
# it to -1 to force the host to reenumerate it; otherwise it might

Modified: head/libexec/rc/rc.d/kld
==
--- head/libexec/rc/rc.d/kldSun Apr  7 18:24:26 2019(r346016)
+++ head/libexec/rc/rc.d/kldSun Apr  7 18:31:45 2019(r346017)
@@ -46,7 +46,7 @@ kld_start()
 
echo 'Loading kernel modules:'
for _kld in $kld_list ; do
-   load_kld -e ${_kld}.ko $_kld
+   load_kld $_kld
done
 }
 

Modified: head/libexec/rc/rc.d/mdconfig
==
--- head/libexec/rc/rc.d/mdconfig   Sun Apr  7 18:24:26 2019
(r346016)
+++ head/libexec/rc/rc.d/mdconfig   Sun Apr  7 18:31:45 2019
(r346017)
@@ -114,7 +114,7 @@ mdconfig_start()
continue
fi
if [ "${_file}" != "${_file%.uzip}" ]; then
-   load_kld -m g_uzip geom_uzip || return 3
+   load_kld geom_uzip || return 3
# sleep a bit to allow creation of 
/dev/mdX.uzip
sleep 2
fi

Modified: head/libexec/rc/rc.d/mdconfig2
==
--- head/libexec/rc/rc.d/mdconfig2  Sun Apr  7 18:24:26 2019
(r346016)
+++ head/libexec/rc/rc.d/mdconfig2  Sun Apr  7 18:31:45 2019
(r346017)
@@ -123,7 +123,7 @@ mdconfig2_start()
# been created.
if [ "${_type}" = "vnode" -a "${_fs}" != "/" ]; then
if [ "${_file}" != "${_file%.uzip}" ]; then
-   load_kld -m g_uzip geom_uzip || return 3
+   load_kld geom_uzip || return 3
fi
if is_readonly ${_fs}; then
warn "${_fs} is mounted read-only, skipping 

svn commit: r342601 - head/bin/pax

2018-12-29 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Sat Dec 29 23:08:59 2018
New Revision: 342601
URL: https://svnweb.freebsd.org/changeset/base/342601

Log:
  Add a note that the use of -B option does not guarantee a size of fragment
  if -z option also used.
  
  Recommend the use of zip(1) if compressed files of predictable size needed.
  
  PR:   docs/41089
  Submitted by: Sevan Janiyan
  Reported by:  arei...@bigpond.net.au
  
  While here, pet igor
  
  Reviewed by:  bcr
  Differential Revision:https://reviews.freebsd.org/D18686

Modified:
  head/bin/pax/pax.1

Modified: head/bin/pax/pax.1
==
--- head/bin/pax/pax.1  Sat Dec 29 23:00:20 2018(r342600)
+++ head/bin/pax/pax.1  Sat Dec 29 23:08:59 2018(r342601)
@@ -33,7 +33,7 @@
 .\"@(#)pax.1   8.4 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd March 17, 2015
+.Dd December 29, 2018
 .Dt PAX 1
 .Os
 .Sh NAME
@@ -793,6 +793,16 @@ limits can be separated by
 .Li x
 to indicate a product.
 .Pp
+Note that the specified size is for the uncompressed pax image itself.
+If the
+.Fl z
+option is also used, the resulting file may contain fewer
+.Ar bytes ,
+according to the compressibility of the archive contents.
+See
+.Xr zip 1
+if compressed volumes of predictable size are required.
+.Pp
 .Em Warning :
 Only use this option when writing an archive to a device which supports
 an end of file read condition based on last (or largest) write offset
@@ -804,7 +814,7 @@ This option is the same as the
 option, except that the file inode change time is checked instead of the
 file modification time.
 The file inode change time can be used to select files whose inode information
-(e.g.\& uid, gid, etc.) is newer than a copy of the file in the destination
+(e.g., uid, gid, etc.) is newer than a copy of the file in the destination
 .Ar directory .
 .It Fl E Ar limit
 Limit the number of consecutive read faults while trying to read a flawed
@@ -903,7 +913,7 @@ the file was last written).
 The
 .Ar c
 specifies the comparison of inode change time (the time when the file
-inode was last changed; e.g.\& a change of owner, group, mode, etc).
+inode was last changed; e.g., a change of owner, group, mode, etc).
 When
 .Ar c
 and
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r342389 - head/share/man/man5

2018-12-28 Thread Chris Rees



On 28 December 2018 19:02:14 GMT+00:00, Niclas Zeising  
wrote:
>On 12/28/18 7:43 PM, Chris Rees wrote:
>> Hey,
>> 
>> On 28 December 2018 18:19:57 GMT+00:00, Niclas Zeising
> wrote:
>>> On 12/24/18 11:47 AM, Chris Rees wrote:
>>>> Author: crees (doc,ports committer)
>>>> Date: Mon Dec 24 10:47:48 2018
>>>> New Revision: 342389
>>>> URL: https://svnweb.freebsd.org/changeset/base/342389
>>>>
>>>> Log:
>>>> Clarify kld_list format
>>>> 
>>>> PR:docs/234248
>>>> Submitted by:  David Fiander
>>>> Submitted by:  Miroslav Lachman
>>>>
>>>> Modified:
>>>> head/share/man/man5/rc.conf.5
>>>>
>>>> Modified: head/share/man/man5/rc.conf.5
>>>>
>>>
>==
>>>> --- head/share/man/man5/rc.conf.5  Mon Dec 24 06:14:32
>2018   (r342388)
>>>> +++ head/share/man/man5/rc.conf.5  Mon Dec 24 10:47:48
>2018   (r342389)
>>>> @@ -248,12 +248,14 @@ Default
>>>>.Pa /etc/ddb.conf .
>>>>.It Va kld_list
>>>>.Pq Vt str
>>>> -A list of kernel modules to load right after the local
>>>> -disks are mounted.
>>>> +A whitespace-separated list of kernel modules to load right after
>>>> +the local disks are mounted, without any
>>>> +.Pa .ko
>>>> +extension or path.
>>>>Loading modules at this point in the boot process is
>>>>much faster than doing it via
>>>>.Pa /boot/loader.conf
>>>> -for those modules not necessary for mounting local disk.
>>>> +for those modules not necessary for mounting local disks.
>>>>.It Va kldxref_enable
>>>>.Pq Vt bool
>>>>Set to
>>>
>>>
>>> Hi!
>>> Sorry for jumping into this so late.
>>> Please please PLEASE don't break loading modules by path in
>kld_list.
>>> This is used by the drm-kmod files to distinguish them from the base
>>> modules, and this has been communicated in documentation all over
>the
>>> place, including numerous ports.
>>>
>>> Can this please be reverted, or amended to match reality.
>>>
>>> In practice, adding both the path and the extension (.ko) to a
>module
>>> in
>>> kld_list works and the module loads.
>> 
>> As the code itself stands, it works for loading, but throws an error
>if you try to load an already loaded module adding a .ko extension.  In
>other words, it works but is wrong.  The path actually still does work,
>which was my mistake.
>> 
>> I'm awaiting approval for this, which correctly handles all cases:
>> 
>> https://reviews.freebsd.org/D18670
>> 
>> Konstantin has reviewed, but doesn't feel comfortable giving approval
>as it's not his area, which is fair enough.
>> 
>> Chris
>> 
>
>Ok.
>Will this continue to work when loading /path/to/foo.ko rather than 
>path/to/foo? (I assume it will)
>Regards

Unlike now, it will work correctly, including if the module is already loaded.

Chris

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r342389 - head/share/man/man5

2018-12-28 Thread Chris Rees
Hey,

On 28 December 2018 18:19:57 GMT+00:00, Niclas Zeising  
wrote:
>On 12/24/18 11:47 AM, Chris Rees wrote:
>> Author: crees (doc,ports committer)
>> Date: Mon Dec 24 10:47:48 2018
>> New Revision: 342389
>> URL: https://svnweb.freebsd.org/changeset/base/342389
>> 
>> Log:
>>Clarify kld_list format
>>
>>PR:   docs/234248
>>Submitted by: David Fiander
>>Submitted by: Miroslav Lachman
>> 
>> Modified:
>>head/share/man/man5/rc.conf.5
>> 
>> Modified: head/share/man/man5/rc.conf.5
>>
>==
>> --- head/share/man/man5/rc.conf.5Mon Dec 24 06:14:32 2018
>> (r342388)
>> +++ head/share/man/man5/rc.conf.5Mon Dec 24 10:47:48 2018
>> (r342389)
>> @@ -248,12 +248,14 @@ Default
>>   .Pa /etc/ddb.conf .
>>   .It Va kld_list
>>   .Pq Vt str
>> -A list of kernel modules to load right after the local
>> -disks are mounted.
>> +A whitespace-separated list of kernel modules to load right after
>> +the local disks are mounted, without any
>> +.Pa .ko
>> +extension or path.
>>   Loading modules at this point in the boot process is
>>   much faster than doing it via
>>   .Pa /boot/loader.conf
>> -for those modules not necessary for mounting local disk.
>> +for those modules not necessary for mounting local disks.
>>   .It Va kldxref_enable
>>   .Pq Vt bool
>>   Set to
>
>
>Hi!
>Sorry for jumping into this so late.
>Please please PLEASE don't break loading modules by path in kld_list. 
>This is used by the drm-kmod files to distinguish them from the base 
>modules, and this has been communicated in documentation all over the 
>place, including numerous ports.
>
>Can this please be reverted, or amended to match reality.
>
>In practice, adding both the path and the extension (.ko) to a module
>in 
>kld_list works and the module loads.

As the code itself stands, it works for loading, but throws an error if you try 
to load an already loaded module adding a .ko extension.  In other words, it 
works but is wrong.  The path actually still does work, which was my mistake.

I'm awaiting approval for this, which correctly handles all cases:

https://reviews.freebsd.org/D18670

Konstantin has reviewed, but doesn't feel comfortable giving approval as it's 
not his area, which is fair enough.

Chris

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r342573 - head/usr.sbin/autofs

2018-12-28 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Fri Dec 28 15:11:22 2018
New Revision: 342573
URL: https://svnweb.freebsd.org/changeset/base/342573

Log:
  There is no way of escaping literal $ signs in auto_master(5), which
  makes for difficulty with hidden Samba shares; shares with $ at the end
  of their name.  This enables the use of ${DOLLAR} to work around this.
  
  Reviewed by:  bcr (man page)
  Approved by:  trasz
  Differential Revision:https://reviews.freebsd.org/D7048

Modified:
  head/usr.sbin/autofs/auto_master.5
  head/usr.sbin/autofs/defined.c

Modified: head/usr.sbin/autofs/auto_master.5
==
--- head/usr.sbin/autofs/auto_master.5  Fri Dec 28 13:32:14 2018
(r342572)
+++ head/usr.sbin/autofs/auto_master.5  Fri Dec 28 15:11:22 2018
(r342573)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 13, 2015
+.Dd December 28, 2018
 .Dt AUTO_MASTER 5
 .Os
 .Sh NAME
@@ -187,6 +187,8 @@ Expands to the output of
 .Li "uname -p" .
 .It Li CPU
 Same as ARCH.
+.It Li DOLLAR
+A literal $ sign.
 .It Li HOST
 Expands to the output of
 .Li "uname -n" .

Modified: head/usr.sbin/autofs/defined.c
==
--- head/usr.sbin/autofs/defined.c  Fri Dec 28 13:32:14 2018
(r342572)
+++ head/usr.sbin/autofs/defined.c  Fri Dec 28 15:11:22 2018
(r342573)
@@ -266,6 +266,7 @@ defined_init(void)
 
defined_add("ARCH", name.machine);
defined_add("CPU", name.machine);
+   defined_add("DOLLAR", "$");
defined_add("HOST", name.nodename);
defined_add("OSNAME", name.sysname);
defined_add("OSREL", name.release);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r342389 - head/share/man/man5

2018-12-24 Thread Chris Rees
On 24/12/2018 16:50, Konstantin Belousov wrote:
> On Mon, Dec 24, 2018 at 03:34:57PM +0000, Chris Rees wrote:
>> On 24/12/2018 13:37, Konstantin Belousov wrote:
>>> On Mon, Dec 24, 2018 at 01:07:54PM +, Chris Rees wrote:
>>>> On 24/12/2018 11:23, Chris Rees wrote:
>>>>> On 24 Dec 2018 11:17, Konstantin Belousov  wrote:
>>>>>
>>>>> On Mon, Dec 24, 2018 at 10:47:48AM +, Chris Rees wrote:
>>>>> > Author: crees (doc,ports committer)
>>>>> > Date: Mon Dec 24 10:47:48 2018
>>>>> > New Revision: 342389
>>>>> > URL: https://svnweb.freebsd.org/changeset/base/342389
>>>>> >
>>>>> > Log:
>>>>> >   Clarify kld_list format
>>>>> >  
>>>>> >   PR: docs/234248
>>>>> >   Submitted by: David Fiander
>>>>> >   Submitted by: Miroslav Lachman
>>>>> >
>>>>> > Modified:
>>>>> >   head/share/man/man5/rc.conf.5
>>>>> >
>>>>> > Modified: head/share/man/man5/rc.conf.5
>>>>> >
>>>>> 
>>>>> ==
>>>>> > --- head/share/man/man5/rc.conf.5 Mon Dec 24 06:14:32 2018
>>>>> (r342388)
>>>>> > +++ head/share/man/man5/rc.conf.5 Mon Dec 24 10:47:48 2018
>>>>> (r342389)
>>>>> > @@ -248,12 +248,14 @@ Default
>>>>> >  .Pa /etc/ddb.conf .
>>>>> >  .It Va kld_list
>>>>> >  .Pq Vt str
>>>>> > -A list of kernel modules to load right after the local
>>>>> > -disks are mounted.
>>>>> > +A whitespace-separated list of kernel modules to load right after
>>>>> > +the local disks are mounted, without any
>>>>> > +.Pa .ko
>>>>> > +extension or path.
>>>>> I think both extension and path are accepted if supplied.
>>>>> It is the behaviour described in kldload(8).
>>>>>
>>>>>
>>>>> That's true, but the kld rc script adds .ko, so providing the
>>>>> extension will probably break, and it checks for existing modules
>>>>> using the provided name as a regex, so that will also fail.
>>>>>
>>>>> I don't think that'd be hard to fix though, so I'll fix that and put a
>>>>> patch up for review later.
>>>> Having looked again, rc.subr uses kldstat -v, so the path is indeed not
>>>> a problem, but the extension is-- removing any extension from _kld will
>>>> ensure that it will always match correctly.  At the moment it is
>>>> fragile, because it will load correctly the first time but hit an error
>>>> if the user has put the extension in and the module is already loaded.
>>>>
>>>> @RC people, does this look acceptable (I'll need approval please)?
>>>>
>>>> https://www.bayofrum.net/~crees/patches/rc-kld_list-extension.diff
>>> I do not quite see a point in the check for the module presence.
>>> Kernel already rejects already loaded modules (by module name).
>> True; this code predates the -n option to kldload.  Using that makes the
>> whole checking unnecessary.
>>
>> How about this one?
>>
>> https://www.bayofrum.net/~crees/patches/rc-kld_list-extension-2.diff
> It looks reasonable to me.  I am not sure if we want to keep the options
> for load_kld for benefit of the third-party scripts, or not.  E.g. we can
> silently ignore them.

Yeah, my patch ignores them silently.  It has the added bonus of not
needing to sweep the ports tree, with all the version issues that
entails as the behaviour has slightly changed if the options are
necessary at that point.

> How was this tested ?
[crees@pegasus]~/workspace/src/head% sudo sh
# . libexec/rc/rc.subr
# kldstat |grep cuse
# load_kld cuse4bsd
# kldstat |grep cuse
15    1 0x818c3000 40a0 cuse.ko
# load_kld cuse4bsd
# load_kld doesntexist
kldload: can't load doesntexist: No such file or directory
sh: WARNING: Unable to load kernel module doesntexist
# kldunload cuse
# load_kld -m nothing -e noop /boot/modules/cuse4bsd.ko
# kldstat |grep cuse
15    1 0x818c3000 4c80 cuse4bsd.ko
# load_kld -m nothing -e noop /boot/modules/cuse4bsd.ko
# load_kld -m nothing -e noop /boot/modules/cuse4bsd.ko
# load_kld -m nothing -e noop /boot/modules/cuse4bsd.ko
# kldstat |grep cuse
15    1 0x818c3000 4c80 cuse4bsd.ko
#

It's rather a curiosity for me that cuse4bsd only loads as itself if
called by path, but it doesn't happen with any other modules-- this was
just to prove that full paths and extensions work correctly as
intended.  My machine also boots fine.

Can you think of any other behaviour I'd need to check?

Chris

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r342389 - head/share/man/man5

2018-12-24 Thread Chris Rees
On 24/12/2018 13:37, Konstantin Belousov wrote:
> On Mon, Dec 24, 2018 at 01:07:54PM +0000, Chris Rees wrote:
>> On 24/12/2018 11:23, Chris Rees wrote:
>>> On 24 Dec 2018 11:17, Konstantin Belousov  wrote:
>>>
>>> On Mon, Dec 24, 2018 at 10:47:48AM +, Chris Rees wrote:
>>> > Author: crees (doc,ports committer)
>>> > Date: Mon Dec 24 10:47:48 2018
>>> > New Revision: 342389
>>> > URL: https://svnweb.freebsd.org/changeset/base/342389
>>> >
>>> > Log:
>>> >   Clarify kld_list format
>>> >  
>>> >   PR: docs/234248
>>> >   Submitted by: David Fiander
>>> >   Submitted by: Miroslav Lachman
>>> >
>>> > Modified:
>>> >   head/share/man/man5/rc.conf.5
>>> >
>>> > Modified: head/share/man/man5/rc.conf.5
>>> >
>>> 
>>> ==
>>> > --- head/share/man/man5/rc.conf.5 Mon Dec 24 06:14:32 2018
>>> (r342388)
>>> > +++ head/share/man/man5/rc.conf.5 Mon Dec 24 10:47:48 2018
>>> (r342389)
>>> > @@ -248,12 +248,14 @@ Default
>>> >  .Pa /etc/ddb.conf .
>>> >  .It Va kld_list
>>> >  .Pq Vt str
>>> > -A list of kernel modules to load right after the local
>>> > -disks are mounted.
>>> > +A whitespace-separated list of kernel modules to load right after
>>> > +the local disks are mounted, without any
>>> > +.Pa .ko
>>> > +extension or path.
>>> I think both extension and path are accepted if supplied.
>>> It is the behaviour described in kldload(8).
>>>
>>>
>>> That's true, but the kld rc script adds .ko, so providing the
>>> extension will probably break, and it checks for existing modules
>>> using the provided name as a regex, so that will also fail.
>>>
>>> I don't think that'd be hard to fix though, so I'll fix that and put a
>>> patch up for review later.
>> Having looked again, rc.subr uses kldstat -v, so the path is indeed not
>> a problem, but the extension is-- removing any extension from _kld will
>> ensure that it will always match correctly.  At the moment it is
>> fragile, because it will load correctly the first time but hit an error
>> if the user has put the extension in and the module is already loaded.
>>
>> @RC people, does this look acceptable (I'll need approval please)?
>>
>> https://www.bayofrum.net/~crees/patches/rc-kld_list-extension.diff
> I do not quite see a point in the check for the module presence.
> Kernel already rejects already loaded modules (by module name).

True; this code predates the -n option to kldload.  Using that makes the
whole checking unnecessary.

How about this one?

https://www.bayofrum.net/~crees/patches/rc-kld_list-extension-2.diff

Chris


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r342389 - head/share/man/man5

2018-12-24 Thread Chris Rees
Hi again,

On 24/12/2018 11:23, Chris Rees wrote:
> Hi Konstantin,
>
> On 24 Dec 2018 11:17, Konstantin Belousov  wrote:
>
> On Mon, Dec 24, 2018 at 10:47:48AM +0000, Chris Rees wrote:
> > Author: crees (doc,ports committer)
> > Date: Mon Dec 24 10:47:48 2018
> > New Revision: 342389
> > URL: https://svnweb.freebsd.org/changeset/base/342389
> >
> > Log:
> >   Clarify kld_list format
> >  
> >   PR: docs/234248
> >   Submitted by: David Fiander
> >   Submitted by: Miroslav Lachman
> >
> > Modified:
> >   head/share/man/man5/rc.conf.5
> >
> > Modified: head/share/man/man5/rc.conf.5
> >
> 
> ==
> > --- head/share/man/man5/rc.conf.5 Mon Dec 24 06:14:32 2018
> (r342388)
> > +++ head/share/man/man5/rc.conf.5 Mon Dec 24 10:47:48 2018
> (r342389)
> > @@ -248,12 +248,14 @@ Default
> >  .Pa /etc/ddb.conf .
> >  .It Va kld_list
> >  .Pq Vt str
> > -A list of kernel modules to load right after the local
> > -disks are mounted.
> > +A whitespace-separated list of kernel modules to load right after
> > +the local disks are mounted, without any
> > +.Pa .ko
> > +extension or path.
> I think both extension and path are accepted if supplied.
> It is the behaviour described in kldload(8).
>
>
> That's true, but the kld rc script adds .ko, so providing the
> extension will probably break, and it checks for existing modules
> using the provided name as a regex, so that will also fail.
>
> I don't think that'd be hard to fix though, so I'll fix that and put a
> patch up for review later.

Having looked again, rc.subr uses kldstat -v, so the path is indeed not
a problem, but the extension is-- removing any extension from _kld will
ensure that it will always match correctly.  At the moment it is
fragile, because it will load correctly the first time but hit an error
if the user has put the extension in and the module is already loaded.

@RC people, does this look acceptable (I'll need approval please)?

https://www.bayofrum.net/~crees/patches/rc-kld_list-extension.diff

Chris


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r342389 - head/share/man/man5

2018-12-24 Thread Chris Rees


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r342389 - head/share/man/man5

2018-12-24 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Mon Dec 24 10:47:48 2018
New Revision: 342389
URL: https://svnweb.freebsd.org/changeset/base/342389

Log:
  Clarify kld_list format
  
  PR:   docs/234248
  Submitted by: David Fiander
  Submitted by: Miroslav Lachman

Modified:
  head/share/man/man5/rc.conf.5

Modified: head/share/man/man5/rc.conf.5
==
--- head/share/man/man5/rc.conf.5   Mon Dec 24 06:14:32 2018
(r342388)
+++ head/share/man/man5/rc.conf.5   Mon Dec 24 10:47:48 2018
(r342389)
@@ -248,12 +248,14 @@ Default
 .Pa /etc/ddb.conf .
 .It Va kld_list
 .Pq Vt str
-A list of kernel modules to load right after the local
-disks are mounted.
+A whitespace-separated list of kernel modules to load right after
+the local disks are mounted, without any
+.Pa .ko
+extension or path.
 Loading modules at this point in the boot process is
 much faster than doing it via
 .Pa /boot/loader.conf
-for those modules not necessary for mounting local disk.
+for those modules not necessary for mounting local disks.
 .It Va kldxref_enable
 .Pq Vt bool
 Set to
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259695 - head/bin/pax

2013-12-21 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Sat Dec 21 19:29:08 2013
New Revision: 259695
URL: http://svnweb.freebsd.org/changeset/base/259695

Log:
  Document the lack of chflags support in pax(1)
  
  PR:   docs/135516
  Submitted by: arundel (based on)
  Approved by:  gjb (mentor)

Modified:
  head/bin/pax/pax.1

Modified: head/bin/pax/pax.1
==
--- head/bin/pax/pax.1  Sat Dec 21 18:47:00 2013(r259694)
+++ head/bin/pax/pax.1  Sat Dec 21 19:29:08 2013(r259695)
@@ -33,7 +33,7 @@
 .\@(#)pax.1   8.4 (Berkeley) 4/18/94
 .\ $FreeBSD$
 .\
-.Dd August 29, 2010
+.Dd December 21, 2013
 .Dt PAX 1
 .Os
 .Sh NAME
@@ -587,6 +587,16 @@ precedence.
 For example, if
 .Dl Fl p Ar eme
 is specified, file modification times are still preserved.
+.Pp
+File flags set by
+.Xr chflags 1
+are not understood by
+.Nm ,
+however
+.Xr tar 1
+and
+.Xr dump 1
+will preserve these.
 .It Fl s Ar replstr
 Modify the file or archive member names specified by the
 .Ar pattern
@@ -1195,3 +1205,11 @@ at the University of California, San Die
 The
 .Nm
 utility does not recognize multibyte characters.
+.Pp
+File flags set by
+.Xr chflags 1
+are not preserved by
+.Nm .
+The BUGS section of
+.Xr chflags 1
+has a list of utilities that are unaware of flags.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259697 - head/sbin/ipfw

2013-12-21 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Sat Dec 21 21:56:12 2013
New Revision: 259697
URL: http://svnweb.freebsd.org/changeset/base/259697

Log:
  Minor grammar fix
  
  PR:   docs/185057
  Submitted by: Yuri (y...@rawbw.com)
  Approved by:  gjb (mentor)

Modified:
  head/sbin/ipfw/ipfw.8

Modified: head/sbin/ipfw/ipfw.8
==
--- head/sbin/ipfw/ipfw.8   Sat Dec 21 19:53:51 2013(r259696)
+++ head/sbin/ipfw/ipfw.8   Sat Dec 21 21:56:12 2013(r259697)
@@ -335,8 +335,7 @@ Section below for details.
 If the world and the kernel get out of sync the
 .Nm
 ABI may break, preventing you from being able to add any rules.
-This can
-adversely effect the booting process.
+This can adversely affect the booting process.
 You can use
 .Nm
 .Cm disable
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r251648 - head/usr.bin/calendar

2013-06-12 Thread Chris Rees
This looks backwards unless we did actually change style(9).

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r251660 - in head/etc: defaults rc.d

2013-06-12 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Wed Jun 12 16:44:17 2013
New Revision: 251660
URL: http://svnweb.freebsd.org/changeset/base/251660

Log:
  Clean up swapfile memory disk on shutdown
  
  Make the md unit number configurable so that it can be predicted
  
  PR:   bin/168544
  Submitted by: wblock (based on)
  Approved by:  kevlo

Modified:
  head/etc/defaults/rc.conf
  head/etc/rc.d/addswap

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Wed Jun 12 16:13:05 2013(r251659)
+++ head/etc/defaults/rc.conf   Wed Jun 12 16:44:17 2013(r251660)
@@ -33,6 +33,7 @@ always_force_depends=NO # Set to check
# running during boot (can increase boot time).
 
 swapfile=NO  # Set to name of swapfile if aux swapfile desired.
+swapfile_mdunit=99   # Swapfile md(4) unit number created by mdconfig(8).
 apm_enable=NO# Set to YES to enable APM BIOS functions (or 
NO).
 apmd_enable=NO   # Run apmd to handle APM event from userland.
 apmd_flags=  # Flags to apmd (if enabled).

Modified: head/etc/rc.d/addswap
==
--- head/etc/rc.d/addswap   Wed Jun 12 16:13:05 2013(r251659)
+++ head/etc/rc.d/addswap   Wed Jun 12 16:44:17 2013(r251660)
@@ -8,13 +8,13 @@
 # PROVIDE: addswap
 # REQUIRE: FILESYSTEMS kld
 # BEFORE:  netif
-# KEYWORD: nojail
+# KEYWORD: nojail shutdown
 
 . /etc/rc.subr
 
 name=addswap
 start_cmd=addswap_start
-stop_cmd=:
+stop_cmd=addswap_stop
 
 addswap_start()
 {
@@ -23,8 +23,43 @@ addswap_start()
;;
*)
if [ -w ${swapfile} ]; then
-   echo Adding ${swapfile} as additional swap
-   mdev=`mdconfig -a -t vnode -f ${swapfile}`  swapon 
/dev/${mdev}
+   check_startmsgs  echo Adding ${swapfile} as 
additional swap
+
+   if [ -n ${swapfile_mdunit} ]; then
+   mdev=/dev/md${swapfile_mdunit#md}
+   mdconfig -a -t vnode -f ${swapfile} -u 
${swapfile_mdunit}
+   else
+   mdev=/dev/`mdconfig -a -t vnode -f 
${swapfile}`
+   fi
+
+   if [ $? -eq 0 ]; then
+   swapon ${mdev}
+   else
+   echo error creating swapfile device
+   fi
+   fi
+   ;;
+   esac
+}
+
+addswap_stop()
+{
+   case ${swapfile} in
+   [Nn][Oo] | '')
+   ;;
+   *)
+   if [ -n ${swapfile_mdunit} ]; then
+   mdev=/dev/md${swapfile_mdunit#md}
+   else
+   mdev=/dev/`mdconfig -lv | grep ${swapfile} | cut 
-f1`
+   swapfile_mdunit=${mdev#md}
+   fi
+   if [ -n ${swapfile_mdunit} ]; then
+   swapctl -l | grep -q ${mdev}
+   if [ $? -eq 0 ]; then
+   echo Dismounting swapfile ${swapfile}
+   swapoff ${mdev}  mdconfig -d -u 
${swapfile_mdunit}
+   fi
fi
;;
esac
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r251404 - in head/lib/msun: . src

2013-06-05 Thread Chris Rees
On 5 Jun 2013 06:33, David Schultz d...@freebsd.org wrote:

 Author: das
 Date: Wed Jun  5 05:33:01 2013
 New Revision: 251404
 URL: http://svnweb.freebsd.org/changeset/base/251404

 Log:
   Style fixes.

   Submitted by: bde

 Modified:
   head/lib/msun/Makefile
   head/lib/msun/src/catrig.c
   head/lib/msun/src/catrigf.c
   head/lib/msun/src/e_log2.c

 Modified: head/lib/msun/Makefile

==
 --- head/lib/msun/Makefile  Wed Jun  5 01:22:59 2013(r251403)
 +++ head/lib/msun/Makefile  Wed Jun  5 05:33:01 2013(r251404)
 @@ -21,6 +21,10 @@ ARCH_SUBDIR= ${MACHINE_CPUARCH}
  .include ${ARCH_SUBDIR}/Makefile.inc

  .PATH: ${.CURDIR}/${ARCH_SUBDIR}
 +.if ${MACHINE_CPUARCH} == i386 || ${MACHINE_CPUARCH} == amd64
 +.PATH: ${.CURDIR}/x86
 +CFLAGS+=   -I${.CURDIR}/x86
 +.endif

Since you're doing style fixes, it is worth noting that quoting strings in
Makefiles is nearly always incorrect, and only works in our make because of
an extension.

Chris

  # long double format
  .if ${LDBL_PREC} == 64
 @@ -35,10 +39,6 @@ CFLAGS+= -I${.CURDIR}/ld128
  .PATH: ${.CURDIR}/src
  .PATH: ${.CURDIR}/man

 -.if ${MACHINE_CPUARCH} == i386 || ${MACHINE_CPUARCH} == amd64
 -.PATH: ${.CURDIR}/x86
 -.endif
 -
  LIB=   m
  SHLIBDIR?= /lib
  SHLIB_MAJOR= 5
 @@ -187,8 +187,9 @@ MLINKS+=j0.3 j1.3 j0.3 jn.3 j0.3 y0.3 j0
  MLINKS+=j0.3 j0f.3 j0.3 j1f.3 j0.3 jnf.3 j0.3 y0f.3 j0.3 ynf.3
  MLINKS+=lgamma.3 gamma.3 lgamma.3 gammaf.3 lgamma.3 lgammaf.3 \
 lgamma.3 tgamma.3 lgamma.3 tgammaf.3
 -MLINKS+=log.3 log10.3 log.3 log10f.3 log.3 log10l.3 log.3 \
 -   log1p.3 log.3 log1pf.3 log.3 log1pl.3 log.3 logf.3 log.3 logl.3 \
 +MLINKS+=log.3 log10.3 log.3 log10f.3 log.3 log10l.3 \
 +   log.3 log1p.3 log.3 log1pf.3 log.3 log1pl.3 \
 +   log.3 logf.3 log.3 logl.3 \
 log.3 log2.3 log.3 log2f.3 log.3 log2l.3
  MLINKS+=lrint.3 llrint.3 lrint.3 llrintf.3 lrint.3 llrintl.3 \
 lrint.3 lrintf.3 lrint.3 lrintl.3

 Modified: head/lib/msun/src/catrig.c

==
 --- head/lib/msun/src/catrig.c  Wed Jun  5 01:22:59 2013(r251403)
 +++ head/lib/msun/src/catrig.c  Wed Jun  5 05:33:01 2013(r251404)
 @@ -151,13 +151,13 @@ f(double a, double b, double hypot_a_b)
   */
  static inline void
  do_hard_work(double x, double y, double *rx, int *B_is_usable, double *B,
 -double *sqrt_A2my2, double *new_y)
 +double *sqrt_A2my2, double *new_y)
  {
 double R, S, A; /* A, B, R, and S are as in Hull et al. */
 double Am1, Amy; /* A-1, A-y. */

 -   R = hypot(x, y + 1); /* |z+I| */
 -   S = hypot(x, y - 1); /* |z-I| */
 +   R = hypot(x, y + 1);/* |z+I| */
 +   S = hypot(x, y - 1);/* |z-I| */

 /* A = (|z+I| + |z-I|) / 2 */
 A = (R + S) / 2;
 @@ -174,7 +174,7 @@ do_hard_work(double x, double y, double
  * Am1 = fp + fm, where fp = f(x, 1+y), and fm = f(x,
1-y).
  * rx = log1p(Am1 + sqrt(Am1*(A+1)))
  */
 -   if (y == 1  x  DBL_EPSILON*DBL_EPSILON / 128) {
 +   if (y == 1  x  DBL_EPSILON * DBL_EPSILON / 128) {
 /*
  * fp is of order x^2, and fm = x/2.
  * A = 1 (inexactly).
 @@ -193,7 +193,7 @@ do_hard_work(double x, double y, double
  * A = 1 (inexactly).
  */
 *rx = x / sqrt((1 - y) * (1 + y));
 -   } else /* if (y  1) */ {
 +   } else {/* if (y  1) */
 /*
  * A-1 = y-1 (inexactly).
  */
 @@ -251,9 +251,9 @@ do_hard_work(double x, double y, double
  * scaling should avoid any underflow problems.
  */
 *sqrt_A2my2 = x * (4 / DBL_EPSILON / DBL_EPSILON)
* y /
 -   sqrt((y + 1) * (y - 1));
 +   sqrt((y + 1) * (y - 1));
 *new_y = y * (4 / DBL_EPSILON / DBL_EPSILON);
 -   } else /* if (y  1) */ {
 +   } else {/* if (y  1) */
 /*
  * fm = 1-y = DBL_EPSILON, fp is of order x^2,
and
  * A = 1 (inexactly).
 @@ -298,7 +298,6 @@ casinh(double complex z)
  * C99 leaves it optional whether to raise invalid if one
of
  * the arguments is not NaN, so we opt not to raise it.
  */
 -   /* Bruce Evans tells me this is the way to do this: */
 return (cpack(x + 0.0L + (y + 0), x + 0.0L + (y + 0)));
 }

 @@ -337,6 +336,7 @@ double complex
  casin(double complex z)
  {
 double complex w = casinh(cpack(cimag(z), creal(z)));
 +

Re: svn commit: r251404 - in head/lib/msun: . src

2013-06-05 Thread Chris Rees
On 5 Jun 2013 09:13, David Schultz d...@freebsd.org wrote:

 On Wed, Jun 05, 2013, Chris Rees wrote:
  On 5 Jun 2013 06:33, David Schultz d...@freebsd.org wrote:
  
   Author: das
   Date: Wed Jun  5 05:33:01 2013
   New Revision: 251404
   URL: http://svnweb.freebsd.org/changeset/base/251404
  
   Log:
 Style fixes.
  
 Submitted by: bde
  
   Modified:
 head/lib/msun/Makefile
 head/lib/msun/src/catrig.c
 head/lib/msun/src/catrigf.c
 head/lib/msun/src/e_log2.c
  
   Modified: head/lib/msun/Makefile
  
 
==
   --- head/lib/msun/Makefile  Wed Jun  5 01:22:59 2013
 (r251403)
   +++ head/lib/msun/Makefile  Wed Jun  5 05:33:01 2013
 (r251404)
   @@ -21,6 +21,10 @@ ARCH_SUBDIR= ${MACHINE_CPUARCH}
.include ${ARCH_SUBDIR}/Makefile.inc
  
.PATH: ${.CURDIR}/${ARCH_SUBDIR}
   +.if ${MACHINE_CPUARCH} == i386 || ${MACHINE_CPUARCH} == amd64
   +.PATH: ${.CURDIR}/x86
   +CFLAGS+=   -I${.CURDIR}/x86
   +.endif
 
  Since you're doing style fixes, it is worth noting that quoting strings
in
  Makefiles is nearly always incorrect, and only works in our make
because of
  an extension.

 Thanks -- I didn't know that, and apparently neither did whoever
 wrote that line originally.  But quoted strings are pervasive in
 our makefiles; if there's a good reason to fix it, perhaps you
 could go through and clean them up. :)

I've thought about this, but really that kind of fix is repo churn.

I'll see if I can find somewhere appropriate to document it; the only real
harm is that people using other makes are constantly surprised when things
like

ifeq($(ARCH),amd64)

never match.  Obviously this isn't directly our problem, but it's a nice
portability concern.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r251404 - in head/lib/msun: . src

2013-06-05 Thread Chris Rees
On 5 Jun 2013 10:46, Bruce Evans b...@optusnet.com.au wrote:

 On Wed, 5 Jun 2013, Chris Rees wrote:

 On 5 Jun 2013 06:33, David Schultz d...@freebsd.org wrote:

 ...

 Log:
   Style fixes.

   Submitted by: bde
 ...


==

 --- head/lib/msun/Makefile  Wed Jun  5 01:22:59 2013
 (r251403)
 +++ head/lib/msun/Makefile  Wed Jun  5 05:33:01 2013
 (r251404)
 @@ -21,6 +21,10 @@ ARCH_SUBDIR= ${MACHINE_CPUARCH}
  .include ${ARCH_SUBDIR}/Makefile.inc

  .PATH: ${.CURDIR}/${ARCH_SUBDIR}
 +.if ${MACHINE_CPUARCH} == i386 || ${MACHINE_CPUARCH} == amd64
 +.PATH: ${.CURDIR}/x86
 +CFLAGS+=   -I${.CURDIR}/x86
 +.endif


 Since you're doing style fixes, it is worth noting that quoting strings
in
 Makefiles is nearly always incorrect, and only works in our make because
of
 an extension.


 Ugh.  make's tutorial even says that strings are required in both of the
 above contexts (for .include file and for strings in comparison
 operations).  From /usr/share/doc/psd/12.make:

 @added ability to use variables in the filenames.  An include
 @directive in a makefile looks either like this:
 @ @ #include file
 @ @or this
 @ @ #include file
 @ @The  difference  between the two is where PMake searches for
 @the file: the first way, PMake will look for the  file  only
 @ ...
 @The arithmetic and string operators may only be used to test
 @the  value of a variable. The lefthand side must contain the
 @variable expansion, while the righthand side contains either
 @a  string, enclosed in double-quotes, or a number. The stan-
 @dard C numeric conventions (except for specifying  an  octal
 @number) apply to both sides. E.g.
 @ @ #if $(OS) == 4.3
 @ @ #if $(MACHINE) == sun3
 @ @ #if $(LOAD_ADDR)  0xc000
 @ @are  all  valid conditionals. In addition, the numeric value
 @of a variable can be tested as a boolean as follows:

 The tutorial doesn't seem to have been updated for the new make (or
 the old make).  bmake duplicates the ~20-year old source file except
 for about 20 lines of trivial changes, but doesn't seem to build or
 install its version.

 I tried building a target named foo bar.  It failed completely.

Very little in that guide is at all relevant or correct.  Perhaps when it
was first written It shows some interesting historical notes on the
difference between ${} and $(), which is also now wrong.

Following quoting rules because of an out of date tutorial and thus
diverging from the rest of the world seems a little odd.

I can't work out whether you agree or disagree with me from your comment :)

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r251102 - head/share/misc

2013-05-29 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Wed May 29 13:36:33 2013
New Revision: 251102
URL: http://svnweb.freebsd.org/changeset/base/251102

Log:
  Add my entry.
  
  Approved by:  bcr, gjb (mentors)

Modified:
  head/share/misc/committers-doc.dot

Modified: head/share/misc/committers-doc.dot
==
--- head/share/misc/committers-doc.dot  Wed May 29 12:40:28 2013
(r251101)
+++ head/share/misc/committers-doc.dot  Wed May 29 13:36:33 2013
(r251102)
@@ -56,6 +56,7 @@ blackend [label=Marc Fonvieille\nblacke
 brd [label=Brad Davis\n...@freebsd.org\n2005/06/01]
 brueffer [label=Christian Brueffer\nbruef...@freebsd.org\n2003/01/13]
 chinsan [label=Chinsan Huang\nchin...@freebsd.org\n2006/09/20]
+crees [label=Chris Rees\ncr...@freebsd.org\n2013/05/27]
 danger [label=Daniel Gerzo\ndan...@freebsd.org\n2006/08/20]
 delphij [label=Xin Li\ndelp...@freebsd.org\n2004/09/14]
 dru [label=Dru Lavigne\n...@freebsd.org\n2013/01/22]
@@ -95,6 +96,7 @@ bcr - gavin
 bcr - wblock
 bcr - eadler
 bcr - dru
+bcr - crees
 
 blackend - ale
 
@@ -120,6 +122,7 @@ gabor - ebrandi
 gjb - wblock
 gjb - rene
 gjb - dru
+gjb - crees
 
 hrs - ryusuke
 hrs - dru
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r251107 - head

2013-05-29 Thread Chris Rees
Author: crees (doc,ports committer)
Date: Wed May 29 19:16:59 2013
New Revision: 251107
URL: http://svnweb.freebsd.org/changeset/base/251107

Log:
  Make the instruction order for buildworld agree with UPDATING and the
  Handbook.
  
  Reviewed by:  imp, bdrewery, netchild
  Approved by:  gjb (mentor)

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Wed May 29 17:31:34 2013(r251106)
+++ head/Makefile   Wed May 29 19:16:59 2013(r251107)
@@ -65,8 +65,8 @@
 #  5.  `reboot'(in single user mode: boot -s from the loader prompt).
 #  6.  `mergemaster -p'
 #  7.  `make installworld'
-#  8.  `make delete-old'
-#  9.  `mergemaster'   (you may wish to use -i, along with -U or -F).
+#  8.  `mergemaster'   (you may wish to use -i, along with -U or -F).
+#  9.  `make delete-old'
 # 10.  `reboot'
 # 11.  `make delete-old-libs' (in case no 3rd party program uses them anymore)
 #
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r250235 - in head: etc/rc.d sbin/mount

2013-05-06 Thread Chris Rees
On 6 May 2013 20:47, Jeremie Le Hen j...@freebsd.org wrote:

 Hi Chris,

 On Sat, May 04, 2013 at 02:00:16PM +, Chris Rees wrote:
 
  Log:
Introduce and use new flag -L to mount for mounting only late
filesystems.
 
Previously, rc.d/mountlate mounted *all* filesystems, causing
problems with
background NFS mounts being mounted twice.

 Does that mean that mount -l is now completely useless?  In that case,
 can we start deprecating it in 10.x and remove it entirely in 11.x?

Hm, that's probably true.  I suppose there's no use for it, except that it
is equivalent to;

mount -a
mount -aL

I think it may be useful on rare occasions, perhaps in single user when you
want to *really* mount *everything*.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r250235 - in head: etc/rc.d sbin/mount

2013-05-04 Thread Chris Rees
Author: crees (ports committer)
Date: Sat May  4 14:00:16 2013
New Revision: 250235
URL: http://svnweb.freebsd.org/changeset/base/250235

Log:
  Introduce and use new flag -L to mount for mounting only late filesystems.
  
  Previously, rc.d/mountlate mounted *all* filesystems, causing problems with
  background NFS mounts being mounted twice.
  
  PR:   conf/137629
  Submitted by: eadler (original concept)
  Reviewed by:  mjg
  Approved by:  hrs

Modified:
  head/etc/rc.d/mountlate
  head/sbin/mount/mount.8
  head/sbin/mount/mount.c

Modified: head/etc/rc.d/mountlate
==
--- head/etc/rc.d/mountlate Sat May  4 12:57:21 2013(r250234)
+++ head/etc/rc.d/mountlate Sat May  4 14:00:16 2013(r250235)
@@ -21,19 +21,10 @@ mountlate_start()
# Mount late filesystems.
#
err=0
-   latefs=
-   # / (root) fs is always remounted, so remove from list
-   latefs=`/sbin/mount -d -a -l | grep -v ' /$'`
-   case ${latefs} in
-   '')
-   ;;
-   *)
-   echo -n 'Mounting late file systems:'
-   mount -a -l
-   err=$?
-   echo '.'
-   ;;
-   esac
+   echo -n 'Mounting late file systems:'
+   mount -a -L
+   err=$?
+   echo '.'
 
case ${err} in
0)

Modified: head/sbin/mount/mount.8
==
--- head/sbin/mount/mount.8 Sat May  4 12:57:21 2013(r250234)
+++ head/sbin/mount/mount.8 Sat May  4 14:00:16 2013(r250235)
@@ -106,6 +106,13 @@ a file system mount status from read-wri
 Also
 forces the R/W mount of an unclean file system (dangerous; use with
 caution).
+.It Fl L
+When used in conjunction with the
+.Fl a
+option, mount
+.Em only
+those file systems which are marked as
+.Dq Li late .
 .It Fl l
 When used in conjunction with the
 .Fl a

Modified: head/sbin/mount/mount.c
==
--- head/sbin/mount/mount.c Sat May  4 12:57:21 2013(r250234)
+++ head/sbin/mount/mount.c Sat May  4 14:00:16 2013(r250235)
@@ -245,14 +245,15 @@ main(int argc, char *argv[])
struct fstab *fs;
struct statfs *mntbuf;
int all, ch, i, init_flags, late, failok, mntsize, rval, have_fstab, ro;
+   int onlylate;
char *cp, *ep, *options;
 
-   all = init_flags = late = 0;
+   all = init_flags = late = onlylate = 0;
ro = 0;
options = NULL;
vfslist = NULL;
vfstype = ufs;
-   while ((ch = getopt(argc, argv, adF:flo:prt:uvw)) != -1)
+   while ((ch = getopt(argc, argv, adF:fLlo:prt:uvw)) != -1)
switch (ch) {
case 'a':
all = 1;
@@ -266,6 +267,10 @@ main(int argc, char *argv[])
case 'f':
init_flags |= MNT_FORCE;
break;
+   case 'L':
+   onlylate = 1;
+   late = 1;
+   break;
case 'l':
late = 1;
break;
@@ -327,6 +332,8 @@ main(int argc, char *argv[])
continue;
if (hasopt(fs-fs_mntops, noauto))
continue;
+   if (!hasopt(fs-fs_mntops, late)  onlylate)
+   continue;
if (hasopt(fs-fs_mntops, late)  !late)
continue;
if (hasopt(fs-fs_mntops, failok))
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r248751 - head/share/mk

2013-04-01 Thread Chris Rees
On 1 April 2013 17:17, John Baldwin j...@freebsd.org wrote:
 On Tuesday, March 26, 2013 4:11:10 pm Ed Maste wrote:
 Author: emaste
 Date: Tue Mar 26 20:11:09 2013
 New Revision: 248751
 URL: http://svnweb.freebsd.org/changeset/base/248751

 Log:
   Unconditionally include ${SRCCONF} if overridden

   This avoids silently failing to include ${SRCCONF} specified by a make(1)
   invocation.

 Modified:
   head/share/mk/bsd.own.mk

 Modified: head/share/mk/bsd.own.mk

 ==
 --- head/share/mk/bsd.own.mk  Tue Mar 26 20:04:45 2013(r248750)
 +++ head/share/mk/bsd.own.mk  Tue Mar 26 20:11:09 2013(r248751)
 @@ -117,7 +117,7 @@ __bsd.own.mk__:

  .if !defined(_WITHOUT_SRCCONF)
  SRCCONF?=/etc/src.conf
 -.if exists(${SRCCONF})
 +.if exists(${SRCCONF}) || ${SRCCONF} != /etc/src.conf
  .include ${SRCCONF}
  .endif
  .endif

 Hmm, I'm confused why this matters?  Was exists() failing for a file that did
 exist?  Can you give a more specific use case?

I think it's useful that if you've set SRCCONF in make.conf, the build
should complain about a lack of its existence.

A single character spelling error in the name of SRCCONF will have the
build silently failing to include it, thus resulting in enormous
frustration when your settings aren't applied for some non-obvious
reason...

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r247274 - in head: bin/test tools/regression/bin/test

2013-03-01 Thread Chris Rees
On 1 Mar 2013 14:27, Jilles Tjoelker jil...@stack.nl wrote:

 On Wed, Feb 27, 2013 at 07:25:48PM +1100, Peter Jeremy wrote:
  On 2013-Feb-26 01:02:27 +0100, Jilles Tjoelker jil...@stack.nl wrote:
 Enhance test(1) by adding provision to compare any combination of
the
 access, birth, change and modify times of two files, instead of
only
 being able to compare modify times.  The builtin test in sh(1) will
 automagically acquire the same expansion.

  What do you need this for? If it is not needed very often, this test
can
  be done more portably (older FreeBSD and GNU) as
[ -n $(find -L FILE1 -prune -newerXY FILE2 2/dev/null) ]

  In my case I needed to compare the ctime on one set of files with the
  mtime in another set.  I had a think about using find(1) and gave it
  away as too ugly.  That expression needs serious thought to understand
  and about ½ the tokens in the find(1) are to handle special cases -
  which is a further indication that it isn't ideal.

 Making everything ideal out of the box is not possible; it would bloat
 up things too much and make scripts harder to read. There are many
 possible extensions to avoid problems with special cases that would be
 useful more frequently, such as arrays, ${PARAM/WORD/REPLACEMENT},
 ${PARAM:START:LENGTH} and optional more useful signal handling.

 And I don't think this case is particularly bad. By defining the below
 function

 file_newer() {
 test -n $(find -L -- $2 -prune -newer$1$3 $4 2/dev/null)
 }

 you can do things like  file_newer m file1 c file2  to compare file1's
 mtime to file2's ctime. The ugliness is isolated to the function
 definition.

 The birth time is designated by B instead of b. This is because find(1)
 wants B, and so does stat(1).

 Furthermore, it also allows  file_newer m file1 t '2 days ago'  to
 compare to a specified time; however, only the second time can be 't'.

 It is also possible to query file times using stat(1). This allows
 intuitive constructions like
   [ $(stat -f %m FILE1) -gt $(stat -f %c FILE2) ]
 lets you compare to things like  $(($(date +%s) - 86400))  and allows
 control whether symlinks should be followed. However, this may fork more
 often than the find(1)-based approach and hard-codes the limitation to
 seconds into the script unless you do something more complicated like
   [ $(stat -f %040.9Fm FILE1) \ $(stat -f %040.9Fc FILE2) ]
 The test(1) syntax will also be incorrect if the files do not exist.

 The find(1) and stat(1) approaches also work in other shells such as
 bash, ksh and zsh. An extension to test(1) can only be used by writing
 ugly things like /bin/test. Whatever you may think of it, people write
 scripts for those other shells and it is somewhat unfortunate that they
 cannot use all FreeBSD-specific features.

+1

While I'm aware that we have many very useful extensions to sh, we should
not sacrifice portability.

We (porters) are on thin ground when complaining at upstream for assuming
/bin/sh is bash when we have extensions such as these.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r246362 - head/games/fortune/datfiles

2013-02-05 Thread Chris Rees
On 5 Feb 2013 17:01, John Baldwin j...@freebsd.org wrote:

 On Tuesday, February 05, 2013 11:51:00 am Benjamin Kaduk wrote:
  On Tue, Feb 5, 2013 at 11:45 AM, John Baldwin j...@freebsd.org wrote:
 
   On Tuesday, February 05, 2013 9:39:38 am Dag-Erling SmXXrgrav wrote:
Author: des
Date: Tue Feb  5 14:39:37 2013
New Revision: 246362
URL: http://svnweb.freebsd.org/changeset/base/246362
   
Log:
  Remove political propaganda
   
Modified:
  head/games/fortune/datfiles/fortunes-o.real
  
   *sigh*
  
   I'm sure there are other quotes that people who do not share your
political
   persuasion might find propaganda or offensive, etc.  Censorship and
freedom
   of speech is quite a sticky widget, and I think the only truly sane
policy
   is that fortune files are append-only (unless we outright remove them
and
   that seems excessive).  And new things should have a very high bar to
be
   added to fortune.  Perhaps we should move fortunes-o to ports
entirely?
  
 
  I am more concerned about the insta-MFC than the removal per se.
  Only security or legal issues are cause to go under 3 days, was my
  impression.

 Yes, the insta-MFC is also not appropriate, esp. for something that you
know
 is going to raise eyebrows when it is committed.  Having to debate this
sort
 of thing in public on mailing lists is also distinctly unhelpful and very
 distracting from productive work.  Also, I'd like to preemptively ask
 developers to refrain from any further commits to the fortunes datfiles
for
 the time being as the last thing we need is a commit war over this sort of
 thing.

Moving the -o file to ports as you suggested is probably the best idea.  Or
simply allowing people to fetch their own  I don't see why we should
have trash installed by default on a professional operating system; we have
higher standards in other areas.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r245752 - in head: etc share/mk

2013-01-22 Thread Chris Rees
On 21 January 2013 22:40, Brooks Davis bro...@freebsd.org wrote:
 Author: brooks
 Date: Mon Jan 21 22:40:39 2013
 New Revision: 245752
 URL: http://svnweb.freebsd.org/changeset/base/245752

 Log:
   Replace all known uses of ln in the build process with appropriate
   install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
   variables.

   Sponsored by: DARPA, AFRL
   Reviewed by:  ian, ray, rpaulo

 Modified:
   head/etc/Makefile
   head/share/mk/bsd.incs.mk
   head/share/mk/bsd.info.mk
   head/share/mk/bsd.lib.mk
   head/share/mk/bsd.links.mk
   head/share/mk/bsd.man.mk
   head/share/mk/bsd.own.mk

 Modified: head/etc/Makefile
 ==
 --- head/etc/Makefile   Mon Jan 21 22:32:00 2013(r245751)
 +++ head/etc/Makefile   Mon Jan 21 22:40:39 2013(r245752)
 @@ -324,26 +324,29 @@ distrib-dirs:
 -f $$m -p $$d; \
 ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
 done; true
 -   ln -sfh usr/src/sys ${DESTDIR}/sys
 +   ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys

This broke installworld for me, because of the different behaviour.

ln -sf overwrites existing symlinks, whereas install -l a b puts a
symlink to a inside itself... which fails on a read-only src (NFS
mounted).

Perhaps it's install misbehaving?  I can't work out if it's
bootstrapped properly; we should be using new install(1), are we?

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r245752 - in head: etc share/mk

2013-01-22 Thread Chris Rees
On 22 January 2013 18:13, Brooks Davis bro...@freebsd.org wrote:
 On Tue, Jan 22, 2013 at 05:55:31PM +, Chris Rees wrote:
 On 21 January 2013 22:40, Brooks Davis bro...@freebsd.org wrote:
  Author: brooks
  Date: Mon Jan 21 22:40:39 2013
  New Revision: 245752
  URL: http://svnweb.freebsd.org/changeset/base/245752
 
  Log:
Replace all known uses of ln in the build process with appropriate
install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
variables.
 
Sponsored by: DARPA, AFRL
Reviewed by:  ian, ray, rpaulo
 
  Modified:
head/etc/Makefile
head/share/mk/bsd.incs.mk
head/share/mk/bsd.info.mk
head/share/mk/bsd.lib.mk
head/share/mk/bsd.links.mk
head/share/mk/bsd.man.mk
head/share/mk/bsd.own.mk
 
  Modified: head/etc/Makefile
  ==
  --- head/etc/Makefile   Mon Jan 21 22:32:00 2013(r245751)
  +++ head/etc/Makefile   Mon Jan 21 22:40:39 2013(r245752)
  @@ -324,26 +324,29 @@ distrib-dirs:
  -f $$m -p $$d; \
  ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; 
  \
  done; true
  -   ln -sfh usr/src/sys ${DESTDIR}/sys
  +   ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys

 This broke installworld for me, because of the different behaviour.

 ln -sf overwrites existing symlinks, whereas install -l a b puts a
 symlink to a inside itself... which fails on a read-only src (NFS
 mounted).

 Perhaps it's install misbehaving?  I can't work out if it's
 bootstrapped properly; we should be using new install(1), are we?

 Sorry about that.  It's fixed.


I presume r245793, thank you :)

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Chris Rees
On 19 Dec 2012 19:37, Garrett Cooper yaneg...@gmail.com wrote:

 On Wed, Dec 19, 2012 at 7:37 AM, Ian Lepore
 free...@damnhippie.dyndns.org wrote:

 ...

  Instead of running sysctl a bunch of times, how about something
  conceptually similar to
 
 cat /etc/sysctl.d/* /etc/sysctl.conf | sysctl -f -
 
  Along with this (untested) patch to make sysctl understand -f -.
 
  Hmmm, is /dev/stdin available as early as sysctl.conf runs?  If not, the
  attached patch isn't going to work.

 Why not just make sysctl understand multiple -f options? You're
 probably going to run into more problems parsing from /dev/stdin and
 it's going to obfuscate things a lot dealing with which file came
 last, feeding back diagnostic info, etc.
 Please don't linuxise this tool.

I seem to recall cpio being around a lot before Linux... Our sh also
accepts piped scripts.  It's useful.

ssh host cat file | sysctl -f -

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r243754 - stable/9/etc

2012-12-01 Thread Chris Rees
Author: crees (ports committer)
Date: Sat Dec  1 15:46:27 2012
New Revision: 243754
URL: http://svnweb.freebsd.org/changeset/base/243754

Log:
  MFC r242183:
  
  Allow spaces in _chroot
  
  Approved by:  hrs

Modified:
  stable/9/etc/rc.subr
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/etc/rc.subr
==
--- stable/9/etc/rc.subrSat Dec  1 15:25:41 2012(r243753)
+++ stable/9/etc/rc.subrSat Dec  1 15:46:27 2012(r243754)
@@ -302,8 +302,8 @@ _find_processes()
 
_pref=
if [ $_interpreter != . ]; then   # an interpreted script
-   _script=${_chroot}${_chroot:+/}$_procname
-   if [ -r $_script ]; then
+   _script=${_chroot}${_chroot:+/}$_procname
+   if [ -r $_script ]; then
read _interp  $_script # read interpreter name
case $_interp in
\#!*)
@@ -746,7 +746,7 @@ run_rc_command()
return 1
fi
 
-   if [ ! -x ${_chroot}${_chroot:+/}${command} ]; then
+   if [ ! -x ${_chroot}${_chroot:+/}${command} ]; then
warn run_rc_command: cannot run $command
return 1
fi
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r243755 - stable/8/etc

2012-12-01 Thread Chris Rees
Author: crees (ports committer)
Date: Sat Dec  1 15:53:19 2012
New Revision: 243755
URL: http://svnweb.freebsd.org/changeset/base/243755

Log:
  MFC r242183:
  
  Allow spaces in _chroot
  
  Approved by:  hrs

Modified:
  stable/8/etc/rc.subr
Directory Properties:
  stable/8/etc/   (props changed)

Modified: stable/8/etc/rc.subr
==
--- stable/8/etc/rc.subrSat Dec  1 15:46:27 2012(r243754)
+++ stable/8/etc/rc.subrSat Dec  1 15:53:19 2012(r243755)
@@ -302,8 +302,8 @@ _find_processes()
 
_pref=
if [ $_interpreter != . ]; then   # an interpreted script
-   _script=${_chroot}${_chroot:+/}$_procname
-   if [ -r $_script ]; then
+   _script=${_chroot}${_chroot:+/}$_procname
+   if [ -r $_script ]; then
read _interp  $_script # read interpreter name
case $_interp in
\#!*)
@@ -746,7 +746,7 @@ run_rc_command()
return 1
fi
 
-   if [ ! -x ${_chroot}${_chroot:+/}${command} ]; then
+   if [ ! -x ${_chroot}${_chroot:+/}${command} ]; then
warn run_rc_command: cannot run $command
return 1
fi
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r243756 - stable/7/etc

2012-12-01 Thread Chris Rees
Author: crees (ports committer)
Date: Sat Dec  1 15:54:54 2012
New Revision: 243756
URL: http://svnweb.freebsd.org/changeset/base/243756

Log:
  MFC r242183:
  
  Allow spaces in _chroot
  
  Approved by:  hrs

Modified:
  stable/7/etc/rc.subr
Directory Properties:
  stable/7/etc/   (props changed)

Modified: stable/7/etc/rc.subr
==
--- stable/7/etc/rc.subrSat Dec  1 15:53:19 2012(r243755)
+++ stable/7/etc/rc.subrSat Dec  1 15:54:54 2012(r243756)
@@ -286,8 +286,8 @@ _find_processes()
 
_pref=
if [ $_interpreter != . ]; then   # an interpreted script
-   _script=${_chroot}${_chroot:+/}$_procname
-   if [ -r $_script ]; then
+   _script=${_chroot}${_chroot:+/}$_procname
+   if [ -r $_script ]; then
read _interp  $_script # read interpreter name
case $_interp in
\#!*)
@@ -710,7 +710,7 @@ run_rc_command()
return 1
fi
 
-   if [ ! -x ${_chroot}${_chroot:+/}${command} ]; then
+   if [ ! -x ${_chroot}${_chroot:+/}${command} ]; then
warn run_rc_command: cannot run $command
return 1
fi
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r243228 - head/etc

2012-11-21 Thread Chris Rees
On 20 Nov 2012 13:53, Bruce Evans b...@optusnet.com.au wrote:

 On Tue, 20 Nov 2012, John Hay wrote:

 On Sun, Nov 18, 2012 at 02:21:05PM +, Chris Rees wrote:

 Log:
   cp -R misses out dotfiles; use pax instead to copy file hierarchies

   PR:   conf/99721 (based on)
   Submitted by: Florian Zavatzki f_zavat...@blue-network.org
   Approved by:  hrs
   MFC after:1 month

 Modified:
   head/etc/rc.initdiskless

 Modified: head/etc/rc.initdiskless

==
 --- head/etc/rc.initdisklessSun Nov 18 14:05:28 2012
 (r243227)
 +++ head/etc/rc.initdisklessSun Nov 18 14:21:05 2012
 (r243228)
 @@ -354,7 +354,7 @@ for i in ${templates} ; do
 subdir=${j##*/}
 if [ -d $j -a ! -f $j.cpio.gz  ]; then
 create_md $subdir
 -   cp -Rp $j/ /$subdir
 +   (cd $j  pax -rw . /$subdir)
 fi
  done
  for j in /conf/$i/*.cpio.gz ; do


 Have you tested this on a diskless and readonly system? It looks like pax
 need to write something in /tmp and it might not be writeable yet. I got
 an error, after the first of /bin/pax not found and having to add that to
 the list of files needed.


 It uses mkstemp(3), normally in /tmp but it honors $TMPDIR.  It seems to
 always create 1 temporary file (even for copying a single regular file),
 and sometimes 2 temporary files.  Both of the temporary files seem to be
 to hold metadata for file times and hashes, in case it is too large for
 memory.  cp -Rp probably needs to do the same (except it is imperfect to
 unnecessarily assume that /tmp is writable), to fix its link and timestamp
 handling.

 BTW, I think it is a large bug that ed and vi create temporary files even
 before you change anything.  Even view(1) (vi -R) wants to scribble on
 /var/tmp/vi.recover.  At least it doesn't refuse to start if this is not
 writeable.  ed(1) is considerably more broken.  It
 - hard codes /tmp and doesn't use _PATH_TMP or honor $TMPDIR
 - always scribbles in /tmp
 - refuses to start if /tmp is not writeable.
 This makes ed(1) wlays broken in single user shells until '/' is mounted
 rw, although ed is the only editor that is sure to be there and the
 reason for using a single user shell is often that there is a problem
 with mounting '/' rw.

*sigh*

Hiroki Sato tested it, but i don't know if he had ro /.  This appears to
have caused a few problems, possibly more than the benefit of the change
(hard links).

I'm inclined to be a coward and just revert this later; anyone who can get
there before me, feel free.

When I'm done with the other rc PRs (haha) I'll look at fixing our cp.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r243374 - head/etc

2012-11-21 Thread Chris Rees
Author: crees (ports committer)
Date: Wed Nov 21 18:12:28 2012
New Revision: 243374
URL: http://svnweb.freebsd.org/changeset/base/243374

Log:
  Revert r243228.  This commit appears to cause more trouble than
  it was designed to avoid; the issue described in the PR was no
  longer an issue anyway.

Modified:
  head/etc/rc.initdiskless

Modified: head/etc/rc.initdiskless
==
--- head/etc/rc.initdisklessWed Nov 21 17:05:57 2012(r243373)
+++ head/etc/rc.initdisklessWed Nov 21 18:12:28 2012(r243374)
@@ -354,7 +354,7 @@ for i in ${templates} ; do
subdir=${j##*/}
if [ -d $j -a ! -f $j.cpio.gz  ]; then
create_md $subdir
-   (cd $j  pax -rw . /$subdir)
+   cp -Rp $j/ /$subdir
fi
 done
 for j in /conf/$i/*.cpio.gz ; do
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r243228 - head/etc

2012-11-19 Thread Chris Rees
On 19 November 2012 08:03, Bruce Evans b...@optusnet.com.au wrote:
 On Sun, 18 Nov 2012, Chris Rees wrote:

 On 18 Nov 2012 20:39, Ed Schouten e...@80386.nl wrote:


 Hi Chris,

 2012/11/18 Chris Rees cr...@freebsd.org:

 Modified: head/etc/rc.initdiskless


 ==

 --- head/etc/rc.initdisklessSun Nov 18 14:05:28 2012

 (r243227)

 +++ head/etc/rc.initdisklessSun Nov 18 14:21:05 2012

 (r243228)

 @@ -354,7 +354,7 @@ for i in ${templates} ; do
 subdir=${j##*/}
 if [ -d $j -a ! -f $j.cpio.gz  ]; then
 create_md $subdir
 -   cp -Rp $j/ /$subdir
 +   (cd $j  pax -rw . /$subdir)
 fi
  done
  for j in /conf/$i/*.cpio.gz ; do


 Are you sure that this bug wasn't already fixed? The original version
 of the code in the bug report used the following line:

 -   cp -Rp $j/* /$subdir

 The old version of the code you changed didn't have this asterisk,
 meaning dotfiles would already be copied. Still, you could argue that
 your version is nicer, as our behaviour of cp with the trailing slash
 contradicts POSIX.


 I don't think POSIX is that broken.


 You are correct, and the second to point it out :)

 As you say however, pax is technically how it should be done anyway, and
 has the nice effect of also preserving hard links.  If no-one objects I
 think it should stay in.


 Not perserving hard links is a bug in cp -R.

pax/tar/cpio have always been recommended over cp -R for this very
reason-- I would imagine that the fix is non-trivial if this is a bug
at all (which I don't think it is).

 Another bug in cp -Rp is that
 it doesn't preserve mtimes for directories.  But a non-broken cp -Rp would
 be nicer than non-broken use of pax, and even a broken cp -Rp is better than
 a broken use of pax.  The above use of pax is semantically very different
 from cp -Rp, and introduces the following bugs:

 - no error checking for cd.  We have just checked that $j is a directory.
   If it should somehow go away, then the errors from cp -Rp of it are more
   fail-safe than the errors from not checking for cd failure.

$ cp -Rp spam /eggs
cp: spam: No such file or directory
$ cd spam  pax -rw . /eggs
cd: spam: No such file or directory
$

I'm not seeing a huge difference. How is cp more fail safe?

 - cp -R creates the target directory /$subdir if it doesn't already exist
   (and its path prefix does exist and is a directory or a symlink to a
   directory), but pax doesn't   If /$subdir does already exist, then there
   are races similar to the ones for the source directory if the target
   directory goes away, and pax handles them differently.

In that case the cp -R has the wrong behaviour-- /$subdir must exist,
or it should fail with an error.

 - -p was used in 'cp -Rp' to preserve all attributes.  The corresponding
   flags are not used in 'pax -rw'.  They are '-p e'.  By default,
   pax preserves file times (so '-p am' is part of the default).  pax's
   man page seems to say that the file mode is not preserved by default
   and that '-p p' (or '-p e')  must be used to preserve it, but in my
   tests under FreeBSD-~5.2 it was preserved.  The uid and gid can only
   be preserved by root, and it is the default to not preserve them even
   for root.  Root should use '-p e' or '-p o' to preseve them, just like
   -p was used with cp -Rp.

This I'll concede.

   pax is little used and poorly maintained.  It has no support for acls,
   while cp has some.  Pax hasn't caught up with the creation of utimes(2)
   in 4.2BSD, so it still clobbers the tv_nsec part of file times when it
   preserves them (though it uses lutimes(2)), while cp only clobbers
   the last 3 decimal digits in the tv_nsec part of file times when it
   preserves them.  So even with '-p e', pax often clobbers file times
   and never preserves acls even.  Maybe this doesn't matter here.  But
   pax is unusable in general.  I normally use cp -pR when I don't care
   about links or file times (which is rarely), else gnu tar if I care
   about links but not file times, else bsd tar occasionally for its
   better handling of file times (tar format just can't handle all the
   times well, and bsd tar handles them slightly less badly), else
   gnu tar following by a fixup program to duplicate all the times.
   gnu cp -a should work best, but I haven't used it lately.

How are any of these alternatives good in an rc script?  Using tar
requires two threads (tar c | tar x), which is why I replaced it with
pax in the first place.

Diskless init means that we use RAM as disks-- for your own
entertainment, I suggest making a copy of /rescue with pax, and then
with cp -R.  Which would you prefer in your ramdisk?  For those
concerned about size, this also applies to you-- 96k of pax vs any
hardlink duplication.

Additional flags to pax are in the patch at [1].  With approval from
someone, I'll commit it.

Chris

[1] http

svn commit: r243228 - head/etc

2012-11-18 Thread Chris Rees
Author: crees (ports committer)
Date: Sun Nov 18 14:21:05 2012
New Revision: 243228
URL: http://svnweb.freebsd.org/changeset/base/243228

Log:
  cp -R misses out dotfiles; use pax instead to copy file hierarchies
  
  PR:   conf/99721 (based on)
  Submitted by: Florian Zavatzki f_zavat...@blue-network.org
  Approved by:  hrs
  MFC after:1 month

Modified:
  head/etc/rc.initdiskless

Modified: head/etc/rc.initdiskless
==
--- head/etc/rc.initdisklessSun Nov 18 14:05:28 2012(r243227)
+++ head/etc/rc.initdisklessSun Nov 18 14:21:05 2012(r243228)
@@ -354,7 +354,7 @@ for i in ${templates} ; do
subdir=${j##*/}
if [ -d $j -a ! -f $j.cpio.gz  ]; then
create_md $subdir
-   cp -Rp $j/ /$subdir
+   (cd $j  pax -rw . /$subdir)
fi
 done
 for j in /conf/$i/*.cpio.gz ; do
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r243228 - head/etc

2012-11-18 Thread Chris Rees
On 18 Nov 2012 20:39, Ed Schouten e...@80386.nl wrote:

 Hi Chris,

 2012/11/18 Chris Rees cr...@freebsd.org:
  Modified: head/etc/rc.initdiskless
 
==
  --- head/etc/rc.initdisklessSun Nov 18 14:05:28 2012
 (r243227)
  +++ head/etc/rc.initdisklessSun Nov 18 14:21:05 2012
 (r243228)
  @@ -354,7 +354,7 @@ for i in ${templates} ; do
  subdir=${j##*/}
  if [ -d $j -a ! -f $j.cpio.gz  ]; then
  create_md $subdir
  -   cp -Rp $j/ /$subdir
  +   (cd $j  pax -rw . /$subdir)
  fi
   done
   for j in /conf/$i/*.cpio.gz ; do

 Are you sure that this bug wasn't already fixed? The original version
 of the code in the bug report used the following line:

 -   cp -Rp $j/* /$subdir

 The old version of the code you changed didn't have this asterisk,
 meaning dotfiles would already be copied. Still, you could argue that
 your version is nicer, as our behaviour of cp with the trailing slash
 contradicts POSIX.


You are correct, and the second to point it out :)

As you say however, pax is technically how it should be done anyway, and
has the nice effect of also preserving hard links.  If no-one objects I
think it should stay in.

This is unfortunately another example of many in rc of where something was
fixed ages ago and no-one checked GNATS :(  Of course, this is still my
fault.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r242184 - in head: etc share/man/man5

2012-11-17 Thread Chris Rees
This is because the squid rc script processes fib itself; that needs
wrapping in a test for the function.  I can fix it tomorrow.

As a workaround, remove the line start_precmd=squid_setfib from the squid
rc script.

Chris
On 17 Nov 2012 14:19, Gennady Proskurin gpr...@mail.ru wrote:

 Now squid startup script is unable to start squid

 # pkg info -x ^squid
 squid-3.2.3_1  HTTP Caching Proxy

 # sysctl net.fibs
 net.fibs: 1

 # grep squid /etc/rc.conf
 squid_enable=YES
 squid_pidfile=/var/squid/squid.pid
 squid_chdir=/var/squid

 # /usr/local/etc/rc.d/squid start
 Starting squid.
 setfib: NONE: invalid FIB (max 0)
 Exit 1
 /usr/local/etc/rc.d/squid: WARNING: failed to start squid
 Exit 1

 # sh -x /usr/local/etc/rc.d/squid start
 ... [skip] ...
 + debug 'run_rc_command: start_precmd: squid_setfib '
 + eval 'squid_setfib '
 + squid_setfib
 + sysctl net.fibs
 + [ xNONE != xNONE ]
 + return 0
 + _return=0
 + [ 0 -ne 0 ]
 + check_required_after start
 + local _f _args
 + return 0
 + return 0
 + check_startmsgs
 + [ -n '' ]
 + return 0
 + echo 'Starting squid.'
 Starting squid.
 + [ -n '' ]
 + _doit='cd /var/squid  setfib -F NONE /usr/local/sbin/squid  -f
 /usr/local/etc/squid/squid.conf'
 + [ -n squid ]
 + _doit='su -m squid -c '\''sh -c cd /var/squid  setfib -F NONE
 /usr/local/sbin/squid  -f /usr/local/etc/squid/squid.conf'\'
 + [ -n '' ]
 + _run_rc_doit 'su -m squid -c '\''sh -c cd /var/squid  setfib -F NONE
 /usr/local/sbin/squid  -f /usr/local/etc/squid/squid.conf'\'
 + debug 'run_rc_command: doit: su -m squid -c '\''sh -c cd /var/squid 
 setfib -F NONE /usr/local/sbin/squid  -f /usr/local/etc/squid/squid.conf'\'
 + eval 'su -m squid -c '\''sh -c cd /var/squid  setfib -F NONE
 /usr/local/sbin/squid  -f /usr/local/etc/squid/squid.conf'\'
 + su -m squid -c 'sh -c cd /var/squid  setfib -F NONE
 /usr/local/sbin/squid  -f /usr/local/etc/squid/squid.conf'
 setfib: NONE: invalid FIB (max 0)
 Exit 1
 + _return=1
 + [ 1 -ne 0 ]
 + [ -z '' ]
 + return 1
 + warn 'failed to start squid'
 + [ -x /usr/bin/logger ]
 + logger '/usr/local/etc/rc.d/squid: WARNING: failed to start squid'
 + echo '/usr/local/etc/rc.d/squid: WARNING: failed to start squid'
 /usr/local/etc/rc.d/squid: WARNING: failed to start squid
 + return 1
 Exit 1


 On Sat, Oct 27, 2012 at 07:09:09PM +, Hiroki Sato wrote:
  Author: hrs
  Date: Sat Oct 27 19:09:09 2012
  New Revision: 242184
  URL: http://svn.freebsd.org/changeset/base/242184
 
  Log:
Add setfib(1) support for services as name_fib in rc.conf.
 
  Modified:
head/etc/rc.subr
head/share/man/man5/rc.conf.5
 
  Modified: head/etc/rc.subr
 
 ==
  --- head/etc/rc.subr  Sat Oct 27 17:43:30 2012(r242183)
  +++ head/etc/rc.subr  Sat Oct 27 19:09:09 2012(r242184)
  @@ -462,6 +462,8 @@ check_startmsgs()
   #NOTE:   $flags from the parent environment
   #can be used to override this.
   #
  +#${name}_fib n   Routing table number to run ${command}
 with.
  +#
   #${name}_nicen   Nice level to run ${command} at.
   #
   #${name}_usern   User to run ${command} as, using su(1) if
 not
  @@ -640,7 +642,8 @@ run_rc_command()
fi
eval _chdir=\$${name}_chdir _chroot=\$${name}_chroot \
_nice=\$${name}_nice_user=\$${name}_user \
  - _group=\$${name}_group  _groups=\$${name}_groups
  + _group=\$${name}_group  _groups=\$${name}_groups \
  + _fib=\$${name}_fib
 
if [ -n $_user ]; then# unset $_user if running as that
 user
if [ $_user = $(eval $IDCMD) ]; then
  @@ -721,11 +724,13 @@ run_rc_command()
if [ -n $_chroot ]; then
_doit=\
   ${_nice:+nice -n $_nice }\
  +${_fib:+setfib -F $_fib }\
   chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups
 }\
   $_chroot $command $rc_flags $command_args
else
_doit=\
   ${_chdir:+cd $_chdir  }\
  +${_fib:+setfib -F $_fib }\
   $command $rc_flags $command_args
if [ -n $_user ]; then
_doit=su -m $_user -c 'sh -c
 \$_doit\'
 
  Modified: head/share/man/man5/rc.conf.5
 
 ==
  --- head/share/man/man5/rc.conf.5 Sat Oct 27 17:43:30 2012
  (r242183)
  +++ head/share/man/man5/rc.conf.5 Sat Oct 27 19:09:09 2012
  (r242184)
  @@ -24,7 +24,7 @@
   .\
   .\ $FreeBSD$
   .\
  -.Dd July 22, 2012
  +.Dd October 27, 2012
   .Dt RC.CONF 5
   .Os
   .Sh NAME
  @@ -179,6 +179,11 @@ Run the service under this user account.
   .Pq Vt str
   Run the chrooted service under this system group. Unlike the _user
   setting, this setting has no effect if the service is not chrooted.
  +.It Ao Ar name Ac 

Re: svn commit: r242102 - in head: contrib/bmake usr.bin/bmake

2012-11-14 Thread Chris Rees
On 14 Nov 2012 18:49, Konstantin Belousov kostik...@gmail.com wrote:

 On Wed, Nov 14, 2012 at 09:28:23AM -0800, David O'Brien wrote:
  On Thu, Oct 25, 2012 at 11:18:06PM +, Simon J. Gerraty wrote:
   Log:
 Merge bmake-20121010
 
  Hi Simon,
  I was kicking the tires on this and noticed bmake is dynamically linked.
 
  Can you change it to being statically linked?
 
 
  This issue most recently came up in freebsd-current.  See thread pieces
 
http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033460.html
 
http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033472.html
 
http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033473.html

 As you see, I prefer to not introduce new statically linked binaries into
base.
 If, for unfortunate turns of events, bmake is changed to be statically
linked,
 please obey WITH_SHARED_TOOLCHAIN.

Or a /rescue/bmake for when speed is a concern would also be acceptable.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r242181 - in head/etc: . rc.d

2012-10-27 Thread Chris Rees
On 27 October 2012 18:06, Hiroki Sato h...@freebsd.org wrote:
 Author: hrs
 Date: Sat Oct 27 17:06:26 2012
 New Revision: 242181
 URL: http://svn.freebsd.org/changeset/base/242181

 Log:
   Fix an issue when ipv6_enable=YES  ipv6_gateway_enable=YES which could
   prevent rtadvd(8) from working as intended.

   Spotted by:   brian
   Discussed with:   brian

 Modified:
   head/etc/network.subr
   head/etc/rc.d/rtadvd

 Modified: head/etc/network.subr
 ==
 --- head/etc/network.subr   Sat Oct 27 16:44:41 2012(r242180)
 +++ head/etc/network.subr   Sat Oct 27 17:06:26 2012(r242181)
 @@ -504,7 +504,11 @@ ipv6_autoconfif()
 # backward compatibility: $ipv6_enable
 case $ipv6_enable in
 [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
 -   return 0
 +   if checkyesno ipv6_gateway_enable; then
 +   return 1
 +   else
 +   return 0
 +   fi

While there, any chance to use checkyesno ipv6_enable too?

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r242181 - in head/etc: . rc.d

2012-10-27 Thread Chris Rees
On 27 October 2012 18:20, Hiroki Sato h...@freebsd.org wrote:
 Chris Rees cr...@freebsd.org wrote
   in CADLo83-psYE3T9+aZhEfQWpm6Ht3snC8OrQ=1qarhnv124o...@mail.gmail.com:

 cr On 27 October 2012 18:06, Hiroki Sato h...@freebsd.org wrote:
 cr  Author: hrs
 cr  Date: Sat Oct 27 17:06:26 2012
 cr  New Revision: 242181
 cr  URL: http://svn.freebsd.org/changeset/base/242181
 cr 
 cr  Log:
 crFix an issue when ipv6_enable=YES  ipv6_gateway_enable=YES which 
 could
 crprevent rtadvd(8) from working as intended.
 cr 
 crSpotted by:   brian
 crDiscussed with:   brian
 cr 
 cr  Modified:
 crhead/etc/network.subr
 crhead/etc/rc.d/rtadvd
 cr 
 cr  Modified: head/etc/network.subr
 cr  
 ==
 cr  --- head/etc/network.subr   Sat Oct 27 16:44:41 2012
 (r242180)
 cr  +++ head/etc/network.subr   Sat Oct 27 17:06:26 2012
 (r242181)
 cr  @@ -504,7 +504,11 @@ ipv6_autoconfif()
 cr  # backward compatibility: $ipv6_enable
 cr  case $ipv6_enable in
 cr  [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
 cr  -   return 0
 cr  +   if checkyesno ipv6_gateway_enable; then
 cr  +   return 1
 cr  +   else
 cr  +   return 0
 cr  +   fi
 cr
 cr While there, any chance to use checkyesno ipv6_enable too?

  No, this is intentional because ipv6_enable is a deprecated variable
  and a not set properly warning should not be displayed even if it
  is not defined.

Thanks for clarifying.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242183 - head/etc

2012-10-27 Thread Chris Rees
Author: crees (ports committer)
Date: Sat Oct 27 17:43:30 2012
New Revision: 242183
URL: http://svn.freebsd.org/changeset/base/242183

Log:
  Allow spaces in _chroot
  
  Noticed by:   adj (IRC/#bsdports)
  Approved by:  hrs
  MFC after:1 month

Modified:
  head/etc/rc.subr

Modified: head/etc/rc.subr
==
--- head/etc/rc.subrSat Oct 27 17:39:36 2012(r242182)
+++ head/etc/rc.subrSat Oct 27 17:43:30 2012(r242183)
@@ -261,8 +261,8 @@ _find_processes()
 
_pref=
if [ $_interpreter != . ]; then   # an interpreted script
-   _script=${_chroot}${_chroot:+/}$_procname
-   if [ -r $_script ]; then
+   _script=${_chroot}${_chroot:+/}$_procname
+   if [ -r $_script ]; then
read _interp  $_script # read interpreter name
case $_interp in
\#!*)
@@ -705,7 +705,7 @@ run_rc_command()
return 1
fi
 
-   if [ ! -x ${_chroot}${_chroot:+/}${command} ]; then
+   if [ ! -x ${_chroot}${_chroot:+/}${command} ]; then
warn run_rc_command: cannot run $command
return 1
fi
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r240549 - head/sys/arm/tegra

2012-09-16 Thread Chris Rees
On 16 September 2012 10:28, Alexey Dokuchaev da...@freebsd.org wrote:
 On Sun, Sep 16, 2012 at 07:55:49AM +, Andrew Turner wrote:
 New Revision: 240549
 URL: http://svn.freebsd.org/changeset/base/240549

 Log:
   The cpu_reset function is noreturn, make sure this is true on Tegra 2.
   While here fix a typo.

 +
 + while(1);

 I thought preferred and more style(9) compliant way to code this is:

 for (;;)
 continue;

Actually:

for (;;)
;

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r240549 - head/sys/arm/tegra

2012-09-16 Thread Chris Rees
On 16 Sep 2012 10:53, Alexey Dokuchaev da...@freebsd.org wrote:

 On Sun, Sep 16, 2012 at 10:37:56AM +0100, Chris Rees wrote:
  On 16 September 2012 10:28, Alexey Dokuchaev da...@freebsd.org wrote:
   I thought preferred and more style(9) compliant way to code [empty
   endless loop] is:
  
   for (;;)
   continue;
 
  Actually:
 
  for (;;)
  ;

 Explicit continue is supposed to tell reviewer that original author did
 not make a typo, but indeed knew what he was doing.  Lonely semicolon is
too
 ambiguous in this case.

 ./danfe


That's not what man style says...

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r240549 - head/sys/arm/tegra

2012-09-16 Thread Chris Rees
On 16 Sep 2012 16:19, David Chisnall thera...@freebsd.org wrote:

 On 16 Sep 2012, at 10:37, Chris Rees wrote:

  Actually:
 
  for (;;)
 ;

 This form will generate a compiler warning, because it looks like a
missing loop body.  You can silence the warning by this form:

 for (;;) {}

 This makes it clear that you have an explicit body containing no
statements.

Please fix the style man page then, and make sure bde approves!

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r240549 - head/sys/arm/tegra

2012-09-16 Thread Chris Rees
On 16 September 2012 18:41, Ian Lepore free...@damnhippie.dyndns.org wrote:
 On Sun, 2012-09-16 at 18:30 +0100, Chris Rees wrote:
 On 16 Sep 2012 16:19, David Chisnall thera...@freebsd.org wrote:
 
  On 16 Sep 2012, at 10:37, Chris Rees wrote:
 
   Actually:
  
   for (;;)
  ;
 
  This form will generate a compiler warning, because it looks like a
 missing loop body.  You can silence the warning by this form:
 
  for (;;) {}
 
  This makes it clear that you have an explicit body containing no
 statements.

 Please fix the style man page then, and make sure bde approves!

 One of the examples allows

 for (;;)
 stmt;

 Using continue; as the statement is consistant with that.

Ok, so with approval from a docs/src guy I'd like to commit [1] to
update the style page to use continue; instead of a lone ;

Anyone like to approve/commit?

Chris

[1] http://www.bayofrum.net/~crees/patches/style-empty-loop.diff
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r239593 - head/etc/rc.d

2012-08-22 Thread Chris Rees
On 22 Aug 2012 21:57, David E. O'Brien obr...@freebsd.org wrote:

 Author: obrien
 Date: Wed Aug 22 20:56:53 2012
 New Revision: 239593
 URL: http://svn.freebsd.org/changeset/base/239593

 Log:
   Fix comment misspelling.

   Submitted by: kargl

 Modified:
   head/etc/rc.d/postrandom

 Modified: head/etc/rc.d/postrandom

==
 --- head/etc/rc.d/postrandomWed Aug 22 20:34:23 2012(r239592)
 +++ head/etc/rc.d/postrandomWed Aug 22 20:56:53 2012(r239593)
 @@ -15,7 +15,7 @@ start_cmd=${name}_start
  stop_cmd=:

  # This will remove old ${entropy_file} and generate a new one.
 -# According to Bruce Schneier, this is stronly recomended in order
 +# According to Bruce Schneier, this is strongly recomended in order
  # to avoid using same ${entropy_file} across reboots.
  # Reference: Chapter 10.6, Practical Cryptograpy, ISBN: 0-471-22357-3

Nitpicking... but recommended is also incorrect!

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r239364 - head/libexec/revnetgroup

2012-08-18 Thread Chris Rees
On 18 August 2012 10:26, Niclas Zeising zeis...@freebsd.org wrote:
 Author: zeising (ports committer)

There's something wrong here-- shouldn't it say (ports, doc
committer)?  Looks like it's not checking doc/svnadmin/conf/access...

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r239364 - head/libexec/revnetgroup

2012-08-18 Thread Chris Rees
On 18 August 2012 12:58, Chris Rees cr...@freebsd.org wrote:
 On 18 August 2012 10:26, Niclas Zeising zeis...@freebsd.org wrote:
 Author: zeising (ports committer)

 There's something wrong here-- shouldn't it say (ports, doc
 committer)?  Looks like it's not checking doc/svnadmin/conf/access...

(replying to own message)

For example, Glen Barber appears correctly (and demonstrates that it
should be doc,ports committer):

http://lists.freebsd.org/pipermail/svn-src-head/2012-August/039471.html

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r238602 - head/usr.bin/du

2012-07-20 Thread Chris Rees
On 19 July 2012 14:36, Dimitry Andric d...@freebsd.org wrote:
 On 2012-07-18 21:28, Dag-Erling Smorgrav wrote:
 Author: des
 Date: Wed Jul 18 19:28:22 2012
 New Revision: 238602
 URL: http://svn.freebsd.org/changeset/base/238602

 Log:
   Add -g (gigabyte) flag to complement -k (kilobyte) and -m (megabyte).

 Too bad -t is already taken. :)

-T is not however-- POLA issue or no big deal?

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r237860 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize

2012-07-02 Thread Chris Rees
On Jul 2, 2012 5:05 AM, Doug Barton do...@freebsd.org wrote:

 On 07/01/2012 03:05, Simon L. B. Nielsen wrote:
  Don't replace files, and even worse directories, and it breaks svn2cvs.

 Isn't it possible to write a pre-commit hook to avoid this issue?

I'm sure beat wrote one for ports

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r236688 - head/share/man/man4

2012-07-01 Thread Chris Rees
On 6 June 2012 18:07, Chris Rees cr...@freebsd.org wrote:
 On 6 June 2012 17:51, David E. O'Brien obr...@freebsd.org wrote:
 Author: obrien
 Date: Wed Jun  6 16:51:33 2012
 New Revision: 236688
 URL: http://svn.freebsd.org/changeset/base/236688

 Log:
  Add to the description and spell check.

 Modified:
  head/share/man/man4/filemon.4

 Modified: head/share/man/man4/filemon.4
 ==
 --- head/share/man/man4/filemon.4   Wed Jun  6 16:30:16 2012
 (r236687)
 +++ head/share/man/man4/filemon.4   Wed Jun  6 16:51:33 2012
 (r236688)
 @@ -10,7 +10,7 @@
  .\notice, this list of conditions and the following disclaimer in the
  .\documentation and/or other materials provided with the distribution.
  .\ 3. All advertising materials mentioning features or use of this software
 -.\must display the following acknowledgement:
 +.\must display the following acknowledgment:
  .\This product includes software developed by David E. O'Brien and
  .\contributors.

 Aren't we phasing that clause out?

Any chance of removing the Clause 3 from that license?

http://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/pref-license.html

I had a look around the tree and there are several mentions of this
clause-- I'll see if I can get a list of other files with it in too.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r237269 - in head: etc lib/libutil

2012-06-19 Thread Chris Rees
On Jun 19, 2012 5:15 PM, Alexey Dokuchaev da...@freebsd.org wrote:

 On Tue, Jun 19, 2012 at 02:46:19PM +, Dag-Erling Smorgrav wrote:
  Author: des
  Date: Tue Jun 19 14:46:18 2012
  New Revision: 237269
  URL: http://svn.freebsd.org/changeset/base/237269
 
  Log:
Switch the default password hash from md5 to sha512.

 Pardon my possible unawareness, but was this change discussed anywhere?

http://lists.freebsd.org/pipermail/freebsd-security/2012-June/006271.html

 I understand the rationale to move away from MD5, but reasons for SHA512
 seem moot.  I've personally had been using Blowfish for password hashes
 since OpenBSD switched to it, for example, as fast and apparently reliable
 hash.  Is there anything wrong with it?  Why SHA512 is clear winner here?
 FWIW, ports use SHA256 for now.  Could it be that switch to SHA512 will
 impose perfomance problems?

Why would you want password matching to be fast?  That makes brute-forcing
easier.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r236688 - head/share/man/man4

2012-06-06 Thread Chris Rees
On 6 June 2012 17:51, David E. O'Brien obr...@freebsd.org wrote:
 Author: obrien
 Date: Wed Jun  6 16:51:33 2012
 New Revision: 236688
 URL: http://svn.freebsd.org/changeset/base/236688

 Log:
  Add to the description and spell check.

 Modified:
  head/share/man/man4/filemon.4

 Modified: head/share/man/man4/filemon.4
 ==
 --- head/share/man/man4/filemon.4       Wed Jun  6 16:30:16 2012        
 (r236687)
 +++ head/share/man/man4/filemon.4       Wed Jun  6 16:51:33 2012        
 (r236688)
 @@ -10,7 +10,7 @@
  .\    notice, this list of conditions and the following disclaimer in the
  .\    documentation and/or other materials provided with the distribution.
  .\ 3. All advertising materials mentioning features or use of this software
 -.\    must display the following acknowledgement:
 +.\    must display the following acknowledgment:
  .\    This product includes software developed by David E. O'Brien and
  .\    contributors.

Aren't we phasing that clause out?

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r233429 - in head: etc/root share/examples share/examples/csh

2012-03-24 Thread Chris Rees
On 24 Mar 2012 18:43, Eitan Adler ead...@freebsd.org wrote:

 Author: eadler
 Date: Sat Mar 24 18:43:18 2012
 New Revision: 233429
 URL: http://svn.freebsd.org/changeset/base/233429

 Log:
  - Make the default values for tcsh more user friendly
  - Add an examples file with many of the not accepted suggestions from
the discussion

  PR:   conf/160689
  Reviewed by:  many
  Discussed on: current
  Approved by:  cperciva

 Added:
  head/share/examples/csh/
  head/share/examples/csh/dot.cshrc   (contents, props changed)
 Modified:
  head/etc/root/dot.cshrc
  head/share/examples/Makefile

 Modified: head/etc/root/dot.cshrc


Fantastic, thanks for getting this in.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r233052 - head/share/mk

2012-03-20 Thread Chris Rees
On 20 March 2012 14:19, John Baldwin j...@freebsd.org wrote:
 On Monday, March 19, 2012 5:39:53 pm Doug Barton wrote:
 On 3/19/2012 12:37 PM, Dimitry Andric wrote:
  It would be much nicer to be able to write:
 
  .if defined(FOO)
    .if defined(BAR)
      CFLAGS+=        -DFOO_BAR
    .endif
  .endif

 Take a look at /usr/ports/Mk/bsd.port.mk for how this can be done.

 Hmm, do yoo have a specific example?  The bits in I see in bsd.port.mk suffer
 from the limitation Dimitry raises, e.g.:

 .if defined(OPTIONS)
 # include OPTIONSFILE first if exists
 .       if exists(${OPTIONSFILE})  !make(rmconfig)
 .       include ${OPTIONSFILE}
 .       endif
 .       if exists(${OPTIONSFILE}.local)
 .       include ${OPTIONSFILE}.local
 .       endif
 WITHOUT:=
 WITH:=
 .       if defined(OPTIONS)
 REALOPTIONS=${OPTIONS:C/.*//g}
 .       for O in ${REALOPTIONS}
 RO:=${O}
 .       if ${RO:L} == off
 WITHOUT:=       ${WITHOUT} ${OPT}
 .       endif
 .       if ${RO:L} == on
 WITH:=          ${WITH} ${OPT}
 .       endif
 OPT:=${RO}
 .       endfor
 .       endif

 That is, all the lines that don't start with a . are not indented, and
 even this indentation is rather horrible (it doesn't nest, and it
 has the odd structure of 'if defined(OPTIONS) { if defined(OPTIONS) {} }'.

I don't see how it's any more horrible than the kernel style's rules
on indented #ifs (though I can see the reasoning for that)

It's an unfortunate consequence of the fact that any line starting
with whitespace must be a shell command-- from before Makefiles were
allowed conditionals etc.

It's got to be an improvement on:

.if defined(ONE)
.if !defined(TWO)
.for one in two three four
.if ${VAR} == ${one}
.if defined(VERBOSE)
.warning VAR = one
.endif
.endif
.endfor
.elif ${VAR} == four
.if defined(VERBOSE)
.warning VAR = four
.endif
.else
.warning VAR is not four, and VERBOSE is ignored
.endif#  Which one is this for??
.endif

which is what a lot of the Makefiles look like... debugging if-less
endifs etc is infinitely easier if we indent, however horrible it
looks.

We shouldn't be *trying* to make Makefiles hard to read ;)

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r233052 - head/share/mk

2012-03-20 Thread Chris Rees
On 20 March 2012 21:28, John Baldwin j...@freebsd.org wrote:
 On Tuesday, March 20, 2012 5:20:04 pm Chris Rees wrote:
 On 20 March 2012 14:19, John Baldwin j...@freebsd.org wrote:
  On Monday, March 19, 2012 5:39:53 pm Doug Barton wrote:
  On 3/19/2012 12:37 PM, Dimitry Andric wrote:
   It would be much nicer to be able to write:
  
   .if defined(FOO)
     .if defined(BAR)
       CFLAGS+=        -DFOO_BAR
     .endif
   .endif
 
  Take a look at /usr/ports/Mk/bsd.port.mk for how this can be done.
 
  Hmm, do yoo have a specific example?  The bits in I see in bsd.port.mk
 suffer
  from the limitation Dimitry raises, e.g.:
 
  .if defined(OPTIONS)
  # include OPTIONSFILE first if exists
  .       if exists(${OPTIONSFILE})  !make(rmconfig)
  .       include ${OPTIONSFILE}
  .       endif
  .       if exists(${OPTIONSFILE}.local)
  .       include ${OPTIONSFILE}.local
  .       endif
  WITHOUT:=
  WITH:=
  .       if defined(OPTIONS)
  REALOPTIONS=${OPTIONS:C/.*//g}
  .       for O in ${REALOPTIONS}
  RO:=${O}
  .       if ${RO:L} == off
  WITHOUT:=       ${WITHOUT} ${OPT}
  .       endif
  .       if ${RO:L} == on
  WITH:=          ${WITH} ${OPT}
  .       endif
  OPT:=${RO}
  .       endfor
  .       endif
 
  That is, all the lines that don't start with a . are not indented, and
  even this indentation is rather horrible (it doesn't nest, and it
  has the odd structure of 'if defined(OPTIONS) { if defined(OPTIONS) {} }'.

 I don't see how it's any more horrible than the kernel style's rules
 on indented #ifs (though I can see the reasoning for that)

 It's an unfortunate consequence of the fact that any line starting
 with whitespace must be a shell command-- from before Makefiles were
 allowed conditionals etc.

 It's got to be an improvement on:

 .if defined(ONE)
 .if !defined(TWO)
 .for one in two three four
 .if ${VAR} == ${one}
 .if defined(VERBOSE)
 .warning VAR = one
 .endif
 .endif
 .endfor
 .elif ${VAR} == four
 .if defined(VERBOSE)
 .warning VAR = four
 .endif
 .else
 .warning VAR is not four, and VERBOSE is ignored
 .endif    #  Which one is this for??
 .endif

 which is what a lot of the Makefiles look like... debugging if-less
 endifs etc is infinitely easier if we indent, however horrible it
 looks.

 We shouldn't be *trying* to make Makefiles hard to read ;)

 Oh, it may be that I was reading it in less or some such and that bsd.port.mk
 requires 4 space tabs, so when viewed in things like less the indentation
 doesn't actually look like indentation.  In that respect, this is no better
 than the above (and is what bsd.ports.mk looks like to me at least):

 .      if defined(ONE)
 .      if !defined(TWO)
 .      for one in two three four

 etc.  To be worthwhile the spacing has to actually look like indentation:

 .if defined(ONE)
 .  if !defined(TWO)
 .    for one in two three four

 etc.

Yes-- it'd be nice if less could read the ex:ts=4 bit.

That can go on my todo list.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r233052 - head/share/mk

2012-03-19 Thread Chris Rees
On 17 Mar 2012 05:40, Bruce Evans b...@optusnet.com.au wrote:

 On Fri, 16 Mar 2012, Dimitry Andric wrote:

 Log:
  Change the style of share/mk/bsd.sys.mk to that of the other bsd.*.mk
  files, and style.Makefile(5), where applicable.  While here, update the
  link to the gcc warning documentation.


 Thanks.  I rather liked the ^.* foo style for making ifdefs less
 unreadable, but it didn't look like it was written here, and it is
 a sign of other problems that so many nested ifdefs are used.  It
 only used a single space of each level of indentation, so the
 indentation was still hard too see.

 The other bsd.*.mk files don't include bsd.cpu.mk.  This still uses
 the ^. *foo style (and is now the only *.mk file one that does this).
 For assignments, it mostly uses a different unusual style -- just the
 normal C style of a single space before and after '=' (or '+=').  Weird
 formattings of assignments are harder to grep for than weird formattings
 of .foo, so I didn't try looking for them all.


Indented .ifs etc are used (inconsistently) in bsd.port.mk et al, and can
make a huge difference to readability; make is such a messy language that
multiple levels are often needed.

Perhaps we should try to agree a standard on them, perhaps two spaces?
It's a shame to be stripping them out.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r233052 - head/share/mk

2012-03-19 Thread Chris Rees
On 19 March 2012 19:37, Dimitry Andric d...@freebsd.org wrote:
 On 2012-03-19 08:21, Chris Rees wrote:
 On 17 Mar 2012 05:40, Bruce Evans b...@optusnet.com.au 
 mailto:b...@optusnet.com.au wrote:

 On Fri, 16 Mar 2012, Dimitry Andric wrote:

 Log:
  Change the style of share/mk/bsd.sys.mk http://bsd.sys.mk to that of 
 the other bsd.*.mk
  files, and style.Makefile(5), where applicable.  While here, update the
  link to the gcc warning documentation.


 Thanks.  I rather liked the ^.* foo style for making ifdefs less
 unreadable, but it didn't look like it was written here, and it is
 a sign of other problems that so many nested ifdefs are used.  It
 only used a single space of each level of indentation, so the
 indentation was still hard too see.

 The other bsd.*.mk files don't include bsd.cpu.mk http://bsd.cpu.mk.  
 This still uses
 the ^. *foo style (and is now the only *.mk file one that does this).
 For assignments, it mostly uses a different unusual style -- just the
 normal C style of a single space before and after '=' (or '+=').  Weird
 formattings of assignments are harder to grep for than weird formattings
 of .foo, so I didn't try looking for them all.

 Indented .ifs etc are used (inconsistently) in bsd.port.mk 
 http://bsd.port.mk et al, and can make a huge difference to readability; 
 make is such a messy language that multiple levels are often needed.

 Well, the issue with Makefiles is that you cannot indent the actual
 statements.  So even if you sort-of-indent the directives, by adding
 spaces between the initial dot and the directive name, you still have a
 very messy left margin. :)

 It would be much nicer to be able to write:

 .if defined(FOO)
  .if defined(BAR)
    CFLAGS+=    -DFOO_BAR
  .endif
 .endif

 But I guess that would require some overhaul in make.  It doesn't grok
 such indentations now.

That's right, lines starting with whitespace *must* be shell
commands-- it'll be some overhaul that changes that...


 Perhaps we should try to agree a standard on them, perhaps two spaces?  It's 
 a shame to be stripping them out.

 Two spaces sounds reasonable enough.  Though indent size is probably the
 ultimate bikeshed... ;)

True-- also whitespace-only changes are probably a bad idea for
merges.  I'm not suggesting changing anything existing, but I'd sure
like to keep the whitespace while it's already there ;)

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r232977 - in head: etc sbin/init

2012-03-18 Thread Chris Rees
On 15 Mar 2012 22:57, Ian Lepore free...@damnhippie.dyndns.org wrote:

 On Wed, 2012-03-14 at 16:22 +, Ed Schouten wrote:
  Author: ed
  Date: Wed Mar 14 16:22:09 2012
  New Revision: 232977
  URL: http://svn.freebsd.org/changeset/base/232977
 
  Log:
Make init(8) slightly more robust when /dev/console is missing.
 
If the environment doesn't offer a working /dev/console, the existing
version of init(8) will simply refuse running rc(8) scripts. This
means
you'll only have a system running init(8) and nothing else.
 
Change the code to do the following:
 
- Open /dev/console like we used to do, but make it more robust to use
  O_NONBLOCK to prevent blocking on a carrier.
- If this fails, use /dev/null as stdin and /var/log/init.log as
stdout
  and stderr.

 Given that the /var filesystem is mounted (and with readonly root,
 actually created) by an rc script run by init, does this make sense?
 Maybe it makes sense only within a jail, but not when running as pid 1?

- If even this fails, use /dev/null as stdin, stdout and stderr.
 
So why us this useful? Well, if you remove the `getpid() == 1' check
in
main(), you can now use init(8) inside jails to properly execute
rc(8).
It still requires some polishing, as existing tools assume init(8) has
PID 1.

 Not just existing tools, but 3rd party software is likely to contain
 this assumption (I know some of ours does).  The manpage for init
 contains examples of using a hard-coded 1.  Would it be practical for
 any reference to pid 1 to get somehow magically redirected inside a jail
 to the pid of an init process running within that jail?  That's just a
 pure blue-sky idea that popped into my head; I know almost nothing about
 jails (their implementation or how to use them).


Not really.  Processes are given a 'jailed' property, but apart from that
are just regular processes.  Also, faking PIDs like that will also hide the
host (real) init though whether that is a problem or not is an exercise
for the reader.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r232473 - in head: share/mk sys/conf

2012-03-03 Thread Chris Rees
On 3 March 2012 20:03, Doug Barton do...@freebsd.org wrote:
 On 03/03/2012 10:58, Dimitry Andric wrote:
 However, since it is apparently an expected use case to build using old
   .mk files,

 Expected how? It shouldn't happen if you're building in /usr/src.
 Wouldn't it be better to track down the real bug?

What?  /usr/share/mk is used for everything-- no matter what tree you're in.

If you're going down that road, might as well use ${PORTSDIR}/Mk for
the ports tree too

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r226162 - head/share/mk

2011-10-08 Thread Chris Rees
Author: crees (ports committer)
Date: Sat Oct  8 18:25:01 2011
New Revision: 226162
URL: http://svn.freebsd.org/changeset/base/226162

Log:
  Revert unapproved commit to bsd.port.mk.
  
  This would have had more discussion, but it was explicitly rejected at 
submission by portmgr:
  
  http://lists.freebsd.org/pipermail/freebsd-ports/2011-September/070591.html

Modified:
  head/share/mk/bsd.port.mk

Modified: head/share/mk/bsd.port.mk
==
--- head/share/mk/bsd.port.mk   Sat Oct  8 16:45:03 2011(r226161)
+++ head/share/mk/bsd.port.mk   Sat Oct  8 18:25:01 2011(r226162)
@@ -14,19 +14,3 @@ _WITHOUT_SRCCONF=
 
 .include bsd.own.mk
 .include ${BSDPORTMK}
-
-.if !defined(BEFOREPORTMK)  !defined(INOPTIONSMK)
-# Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x.
-run-autotools-fixup:
-   test -d ${WRKSRC}  find ${WRKSRC} -type f \( -name config.libpath -o \
-   -name config.rpath -o -name configure -o -name libtool.m4 \) \
-   -exec sed -i '' -e 's|freebsd1\*)|freebsd1.\*)|g' \
-   -e 's|freebsd\[12\]\*)|freebsd[12].*)|g' \
-   -e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \
-   -e 's|freebsd\[\[12\]\]\*)|freebsd[[12]].*)|g' \
-   -e 's|freebsd\[\[123\]\]\*)|freebsd[[123]].*)|g' \
-   {} + || /usr/bin/true
-
-.ORDER: run-autotools run-autotools-fixup do-configure
-do-configure: run-autotools-fixup
-.endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r226162 - head/share/mk

2011-10-08 Thread Chris Rees
On 8 Oct 2011 20:35, Doug Barton do...@freebsd.org wrote:

 On 10/08/2011 11:25, Chris Rees wrote:
  Author: crees (ports committer)
  Date: Sat Oct  8 18:25:01 2011
  New Revision: 226162
  URL: http://svn.freebsd.org/changeset/base/226162
 
  Log:
Revert unapproved commit to bsd.port.mk.

 This is completely unacceptable. We don't do commit wars in FreeBSD.
 IF it's accurate that portmgr has custody on this file (as opposed to
 ports/Mk/bsd.port.mk where they unquestionably do), and IF portmgr had a
 problem with this commit, it's up to them to deal with it. The fact that
 you don't think it's a good idea (for whatever reason) frankly isn't
 relevant.

This would have had more discussion, but it was explicitly rejected at
submission by portmgr:
 
 
http://lists.freebsd.org/pipermail/freebsd-ports/2011-September/070591.html

 I read that message as rejecting the idea of applying it to
 ports/Mk/bsd.port.mk, and I think Jilles and Ed applied a very creative
 solution to keeping things moving on HEAD without impacting the ports
 tree itself.


This was subverting maintainer approval, whether inadvertent or not. It has
nothing to do with whether I think it's a good idea or not, but please
remember that this took place behind the back of the majority of the
developers it affected, including me.

Wherever the file is, and however creative the solution is, and however you
read Erwin's message, the answer is clear; portmgr disapproves, please don't
do it, because ports@ is where the fallout will happen.

When I installed CURRENT I was surprised to find the problems impossible to
reproduce, and that was because this fragment was put in an obscure place.

We may not do revert wars, but I have to go through the proper process of
getting stuff into bsd.port.mk, and so does everyone else.

Please don't let's hold multiple conversations, feel free to bring my other
email before developers@.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r225844 - head/usr.bin/csup

2011-09-28 Thread Chris Rees
Author: crees (ports committer)
Date: Wed Sep 28 17:03:49 2011
New Revision: 225844
URL: http://svn.freebsd.org/changeset/base/225844

Log:
  Include limits.h instead of sys/limits.h to improve portability.
  
  PR:   bin/150772
  Submitted by: Derrick Brashear sha...@gmail.com
  Reviewed by:  Garrett Cooper yaneg...@gmail.com
  Approved by:  cognet

Modified:
  head/usr.bin/csup/diff.c

Modified: head/usr.bin/csup/diff.c
==
--- head/usr.bin/csup/diff.cWed Sep 28 16:12:15 2011(r225843)
+++ head/usr.bin/csup/diff.cWed Sep 28 17:03:49 2011(r225844)
@@ -26,11 +26,10 @@
  * $FreeBSD$
  */
 
-#include sys/limits.h
-
 #include assert.h
 #include err.h
 #include errno.h
+#include limits.h
 #include stdio.h
 #include stdlib.h
 #include string.h
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r222994 - head/usr.bin/calendar/calendars

2011-06-11 Thread Chris Rees
Author: crees (ports committer)
Date: Sat Jun 11 21:26:12 2011
New Revision: 222994
URL: http://svn.freebsd.org/changeset/base/222994

Log:
  Add self to calendar
  
  Approved by:  rene (mentor)

Modified:
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==
--- head/usr.bin/calendar/calendars/calendar.freebsdSat Jun 11 21:14:22 
2011(r222993)
+++ head/usr.bin/calendar/calendars/calendar.freebsdSat Jun 11 21:26:12 
2011(r222994)
@@ -260,6 +260,7 @@
 09/05  Mark Robert Vaughan Murray ma...@freebsd.org born in Harare, 
Mashonaland, Zimbabwe, 1961
 09/05  Adrian Harold Chadd adr...@freebsd.org born in Perth, Western 
Australia, Australia, 1979
 09/07  Tim Bishop t...@freebsd.org born in Cornwall, United Kingdom, 1978
+09/07  Chris Rees cr...@freebsd.org born in Kettering, United Kingdom, 1987
 09/08  Boris Samorodov b...@freebsd.org born in Krasnodar, Russian 
Federation, 1963
 09/09  Yoshio Mita m...@freebsd.org born in Hiroshima, Japan, 1972
 09/10  Wesley R. Peters w...@freebsd.org born in Hartford, Alabama, United 
States, 1961
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r222995 - head/share/misc

2011-06-11 Thread Chris Rees
Author: crees (ports committer)
Date: Sat Jun 11 21:27:14 2011
New Revision: 222995
URL: http://svn.freebsd.org/changeset/base/222995

Log:
  Add self
  
  Approved by:  rene (mentor)

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotSat Jun 11 21:26:12 2011
(r222994)
+++ head/share/misc/committers-ports.dotSat Jun 11 21:27:14 2011
(r222995)
@@ -67,6 +67,7 @@ chinsan [label=Chinsan Huang\nchinsan@F
 clement [label=Clement Laforet\nclem...@freebsd.org\n2003/12/17]
 clsung [label=Cheng-Lung Sung\ncls...@freebsd.org\n2004/8/18]
 cperciva [label=Colin Percival\ncperc...@freebsd.org\n2006/01/31]
+crees [label=Chris Rees\ncr...@freebsd.org\n2011/06/11]
 culot [label=Frederic Culot\ncu...@freebsd.org\n2010/10/16]
 daichi [label=Daichi Goto\ndai...@freebsd.org\n2002/10/17]
 danfe [label=Alexey Dokuchaev\nda...@freebsd.org\n2004/08/20]
@@ -375,6 +376,8 @@ philip - koitsu
 
 rafan - chinsan
 
+rene - crees
+
 sahil - culot
 
 sat - beech
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org