-
occ
why can freebsd get ipv6 address with wire network card, but can not get address with wireless device ?
-
occ
both ways use dhcp to get address.
-
occ
where might it be wrong ?
-
occ
using freebsd 13.x
-
RhodiumToad
iirc, dhcpv6 is not supported in the base system
-
RhodiumToad
this is because ipv6 is not supposed to use it, it has its own address discovery mechanisms, and dhcpv6 is a hack
-
RhodiumToad
what makes you think it's using dhcp when on wire?
-
occ
sorry, I don't know that.
-
occ
how to setup ipv6 connect with wireless connection?
-
RhodiumToad
I don't know, sorry
-
occ
I searched some web pages on how to configure dhcpv6 on wireless network but I can't duplicate that.
-
CrtxReavr
ifconfig_vtnet0_ipv6="accept_rtadv"
-
CrtxReavr
Add that to your rc.conf, only switch vtnet0 for your wifi interface.
-
RhodiumToad
occ: did you see CrtxReavr's response?
-
rwp
I have yet to find a public use (coffee shop) WiFi Access Point that passes IPv6 through. Here they are all IPv4 only.
-
occ
RhodiumToad: I was finding more information on accept_rtadv ...
-
occ
rwp: in my case, I happened seeing the phenomenon that freebsd could get ipv6 address with wire connection but only ipv4 address with wireless connection at the same time. freebsd can visit public network with above both connections.
-
occ
s/both/two
-
occ
two default routes work fine, one is ipv6 ,the other is ipv4.
-
rwp
The more I learn about IPv6 the more I think DHCPv6 is the better option over SLAAC/RA
-
occ
I didn't use ifconfig_vtnet0_ipv6 in /etc/rc.conf.
-
occ
just ifconfig_(device)="DHCP"
-
occ
I didn't use ifconfig_vtnet0_ipv6 like options in /etc/rc.conf.
-
RhodiumToad
dammit, what's a good way to compare a constant like SIZE_MAX against a value without triggering -Wtautological-constant-out-of-range-compare
-
epony
they make compilers out of warnings now
-
rwp
RhodiumToad, Hmm... SIZE_MAX is the largest size possible, right? So won't by definition all values either be equal to it or less than it? Can't ever be larger.
-
rwp
In other words... Does it make much useful sense to ever compare against it?
-
RhodiumToad
yes
-
RhodiumToad
assume you have a variable foo which is of an (assumed unsigned) type defined by some library header
-
RhodiumToad
you want to know if you can safely cast (size_t)foo preserving the value
-
RhodiumToad
now, size_t isn't guaranteed to be the largest unsigned type, in particular on 32-bit sustems it's not
-
RhodiumToad
so you might try if (foo <= SIZE_MAX) on the assumption that whichever of the two sides is a smaller type should be promoted to the larger one
-
RhodiumToad
on 32 bit where foo is a uint64_t, this works without error
-
RhodiumToad
but on 64 bit, you get the warning
-
rwp
I'll play Devil's Advocate here and say then that sizeof target needs to be >= sizeof source.
-
RhodiumToad
sizeof isn't really the right tool to compare type ranges
-
rwp
Well... Neither is foo <= SIZE_MAX either.
-
rwp
Since that must always be true.
-
RhodiumToad
and it's explicitly OK for foo to be of a larger _size_ than size_t, as long as the actual value fits in a size_t
-
RhodiumToad
no, foo <= SIZE_MAX is not always true since foo can be of a larger sized type than size_t
-
RhodiumToad
the other method is if ((size_t)foo == foo)
-
RhodiumToad
(assuming foo's type is unsigned, this is well-defined)
-
RhodiumToad
if foo's type is no larger than size_t then the cast preserves the value and the result is true,
-
RhodiumToad
whereas if foo's type is larger and the value fits in size_t, the result is still true,
-
RhodiumToad
but if foo's type is larger and the value doesn't fit, then the cast reduces the value mod 2^N for some N, and the comparison is now false
-
RhodiumToad
but annoyingly, that version generates much worse code
-
nmz-
how do you run du -b on fbsd?
-
nmz-
welp, installed busybox I guess
-
yuripv
nmz-: if it comes from gnu du, install sysutils/coreutils
-
_xor
I have to admit, I had a "Eureka!" moment earlier today that I think is pretty cool.
-
» _xor is working on an implementation for orchestrating jails across a cluster using pkg as the image repository
-
trev
how do i install a man page for my port?
-
trev
do i have to do it myself in the source Makefile or can i set something in the port Makefile?
-
yuripv
-
VimDiesel
Title: Chapter 5. Configuring the Makefile | FreeBSD Documentation Portal
-
trev
thanks. i only read the quick ports part :[
-
yuripv
it should be installed by source Makefile, yes, ports are not really a build system, rather a wrapper around original one and patching as needed
-
trev
is there a freebsd way to do that?
-
trev
i don't see something like `install-man`
-
yuripv
if you use the system mk files, it's MANx= something.x, where x is the section
-
yuripv
(ugh, or is it only MAN= something.x now, correctly parsing the .x for section)
-
yuripv
both should work anyway :)
-
espen_
Hi, I'm struggling with a devd rule where my action can't resolve a variable:
bsd.to/LkHX
-
VimDiesel
Title: dpaste/LkHX (Plain Text)
-
espen_
sorry, better formatting:
bsd.to/nWev
-
VimDiesel
Title: dpaste/nWev (Bash)
-
espen_
I guess it's more a problem with su shell and my bad shell scripting skills in general than devd :)
-
yuripv
espen_: devd.conf(5) has a "Notes on Variable Expansion" subsection
-
yuripv
(and i think the bottom line there is "don't use single quotes" :)
-
espen_
yuripv, thanks! and yes you're right.. now I need to figure out how to replace those o_O
-
espen_
-
VimDiesel
Title: 240411 – devd behaves odd when action uses single quotes
-
espen_
I think I'll have to get rid of the variable and have one rule per device :/
-
yuripv
espen_: you need single quotes for -c argument to su?
-
yuripv
espen_: may be try using escaped double quotes in place of single ones? i.e. -c \"...\"
-
espen_
Not necessarily I think, but I'm failing to escape it and devd accept it.
-
espen_
Yeah that doesn't work..
-
trev
for install(1), is it true that you can't actually do -d to create parent dirs and install files at the same time?
-
rustyaxe
fwiw on (other) systems man install shows for -d: treat all arguments as directory names; create all components of the specified directories
-
rustyaxe
Which vaguely goes back to my distant memories of POSIX
-
yuripv
istr there was a pr for it
-
yuripv
-
VimDiesel
Title: 230620 – "install -d" issue
-
yuripv
rustyaxe: the problem seems to be creating directories *and* installing files at the same time
-
rustyaxe
yea i think posix says -d treats all args s directories
-
rustyaxe
thus GNU's behavior and what i remember from 30 years ago :)
-
» rustyaxe pops into openbsd box and looks
-
rustyaxe
-d Create directories. Missing parent directories are created as required. This option cannot be used with the -B, -b, -C, -c, -f, -p, or -s options.
-
rustyaxe
im thinking htats expected behaviour
-
rustyaxe
Deal with directories first, then deal with files
-
trev
yuripv: yep that's it. thanks
-
trev
i just used mkdir -p instead
-
trev
extra step but whatever
-
rustyaxe
if not expected, at least the most common behavior -- ie if you care of portability, dont do it
-
trev
why would you need to have `make package` succeed as non-root if the ports dir is /usr/ports?
-
trev
(following quick port steps)
-
gzar
hey folks, where do i find the libc-devel package/sources? im building the linux kernel from scratch and its complaining that it cant find bytewswap.h header
-
yuripv
gzar: wrong channel?
-
gzar
no
-
gzar
im on freebsd
-
gzar
basically just looking for the libc devel files
-
rustyaxe
i'm curious as huge as linux kernel has grown if cross compiling has even been tested in decades :P
-
gzar
oh, well i guess i am testing it now
-
gzar
i've been thinking of an experiment for a while with the linux kernel
-
gzar
but will probably ask in some linux channel
-
hubertm
if my printer (samsung M2026) has no drivers for FreeBSD, is there chance to get any support beyond ascii printing?
-
mcrane
hubertm: cups has some generic drivers when I tried that on my printer it worked fine
-
mcrane
so thought it didn't show my specific model it still worked when I looked around for something more generic