Re: Good practices with bectl

2022-09-20 Thread Graham Perrin

On 21/09/2022 01:47, Graham Perrin wrote:


On 20/09/2022 23:14, Nuno Teixeira wrote:


Hello to all,

I will use becl for the first time for current upgrades.
Just to check that I'm thinking correctly:

Create a test environment for upgrade:
> bectl create -r test (should I use '-r'?)
Activate test:
> bectl activate test
> reboot
...
> upgrade OS on test
…
If using freebsd-update(8) to perform the upgrade: please be aware 
that, with recent releases of the OS, there's automated creation of a 
snapshot of a boot environment.


, 
CreateBootEnv


Omitted from release notes; sorry.

True: no freebsd-update for CURRENT, however I'm raising awareness of 
the automation. (My own experience: a habit adopted with CURRENT might 
be accidentally repeated with RELEASE.)


For updates/upgrades to CURRENT: I do prefer to create, activate then 
boot an environment before installing.




With the alternative (a snapshot that's not active), and a Default boot 
environment, things can become confusing when the preferred environment 
is no longer Default, especially if (in rare situations) Default becomes 
no longer bootable. Need to think _very_ carefully about names and the 
appropriateness of renaming.




OpenPGP_signature
Description: OpenPGP digital signature


Re: Good practices with bectl

2022-09-20 Thread Graham Perrin

On 20/09/2022 23:14, Nuno Teixeira wrote:


Hello to all,

I will use becl for the first time for current upgrades.
Just to check that I'm thinking correctly:

Create a test environment for upgrade:
> bectl create -r test (should I use '-r'?)
Activate test:
> bectl activate test
> reboot
...
> upgrade OS on test
…
If using freebsd-update(8) to perform the upgrade: please be aware that, 
with recent releases of the OS, there's automated creation of a snapshot 
of a boot environment.


, 
CreateBootEnv


Omitted from release notes; sorry.



OpenPGP_signature
Description: OpenPGP digital signature


beinstall(8) (was: Good practices with bectl)

2022-09-20 Thread Graham Perrin

On 21/09/2022 00:17, Paul Mather wrote:

… a handy tool in /usr/src/tools/build that can be used as a wrapper 
to install a SRC build into a new boot environment. It's 
/usr/src/tools/build/beinstall.sh (see man beinstall(8) for details). …


Thanks. FYI:

beinstall.sh(8) should be in the FreeBSD Handbook


beinstall.sh with a port: installkernel failed, chrooted make in 
/tmp/beinstall.⋯/mnt failed





OpenPGP_signature
Description: OpenPGP digital signature


Re: Good practices with bectl

2022-09-20 Thread Nuno Teixeira
Hi Paul,

Really nice! I will test it soon.

Cheers

Paul Mather  escreveu no dia quarta, 21/09/2022
à(s) 00:17:

> On Sep 20, 2022, at 6:19 PM, Alan Somers  wrote:
>
> > On Tue, Sep 20, 2022 at 4:14 PM Nuno Teixeira 
> wrote:
> >>
> >> Hello to all,
> >>
> >> I will use becl for the first time for current upgrades.
> >> Just to check that I'm thinking correctly:
> >>
> >> Create a test environment for upgrade:
> >>> bectl create -r test (should I use '-r'?)
> >> Activate test:
> >>> bectl activate test
> >>> reboot
> >> ...
> >>> upgrade OS on test
> >>> reboot
> >> ...
> >> if a problem happens, reboot default from BE loader
> >> ---
> >> if everything fine destroy default and rename test to default
> >>> bectl destroy -o default
> >>> bectl rename test default
> >> repeat on next upgrade
> >>
> >> Don't know if a faster way exists with chroot or bectl jail...
> >>
> >> Any hints appreciated.
> >>
> >> Thanks,
> >> --
> >> Nuno Teixeira
> >> FreeBSD Committer (ports)
> >
> > I don't think you need to use "-r".  Also, you're forgetting one of
> > the best things about boot environments: you can upgrade them even
> > when not booted into them.  That's faster than upgrading the running
> > BE.  Here is the procedure I use:
> >
> > RELEASE=Whatever
> > sudo bectl create ${RELEASE}
> > sudo bectl mount ${RELEASE}
> > BASEDIR=/tmp/be_mount.# Use mount point returned by bectl mount
> > sudo freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update
> > upgrade -r ${RELEASE}
> > sudo freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update
> install
> > # Ignore admonitions to reboot, since we're using a boot environment
> > sudo freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update
> install
> > sudo bectl activate ${RELEASE}
> > sudo reboot
> >
> > This general procedure works just as well if you're upgrading from
> source, too.
> >
> > sudo make DESTDIR=${BASEDIR} installworld
> > sudo mergemaster -m $PWD -D $BASEDIR -U
>
>
> There's even a handy tool in /usr/src/tools/build that can be used as a
> wrapper to install a SRC build into a new boot environment.  It's
> /usr/src/tools/build/beinstall.sh (see man beinstall(8) for details).  It
> will create a new boot environment from a source build, run etcupdate and
> so forth, and even mark the new boot environment as the one to be active on
> reboot.  All you need to do is reboot.  I've been using it for source
> upgrades for a while now without problems.  The best thing, for me, is it
> cuts out all that time doing "make installworld" and etcupdate in single
> user mode, thus minimising downtime.
>
> Cheers,
>
> Paul.
>
>
>

-- 
Nuno Teixeira
FreeBSD Committer (ports)


Re: Good practices with bectl

2022-09-20 Thread Paul Mather
On Sep 20, 2022, at 6:19 PM, Alan Somers  wrote:

> On Tue, Sep 20, 2022 at 4:14 PM Nuno Teixeira  wrote:
>> 
>> Hello to all,
>> 
>> I will use becl for the first time for current upgrades.
>> Just to check that I'm thinking correctly:
>> 
>> Create a test environment for upgrade:
>>> bectl create -r test (should I use '-r'?)
>> Activate test:
>>> bectl activate test
>>> reboot
>> ...
>>> upgrade OS on test
>>> reboot
>> ...
>> if a problem happens, reboot default from BE loader
>> ---
>> if everything fine destroy default and rename test to default
>>> bectl destroy -o default
>>> bectl rename test default
>> repeat on next upgrade
>> 
>> Don't know if a faster way exists with chroot or bectl jail...
>> 
>> Any hints appreciated.
>> 
>> Thanks,
>> --
>> Nuno Teixeira
>> FreeBSD Committer (ports)
> 
> I don't think you need to use "-r".  Also, you're forgetting one of
> the best things about boot environments: you can upgrade them even
> when not booted into them.  That's faster than upgrading the running
> BE.  Here is the procedure I use:
> 
> RELEASE=Whatever
> sudo bectl create ${RELEASE}
> sudo bectl mount ${RELEASE}
> BASEDIR=/tmp/be_mount.# Use mount point returned by bectl mount
> sudo freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update
> upgrade -r ${RELEASE}
> sudo freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update install
> # Ignore admonitions to reboot, since we're using a boot environment
> sudo freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update install
> sudo bectl activate ${RELEASE}
> sudo reboot
> 
> This general procedure works just as well if you're upgrading from source, 
> too.
> 
> sudo make DESTDIR=${BASEDIR} installworld
> sudo mergemaster -m $PWD -D $BASEDIR -U


There's even a handy tool in /usr/src/tools/build that can be used as a wrapper 
to install a SRC build into a new boot environment.  It's 
/usr/src/tools/build/beinstall.sh (see man beinstall(8) for details).  It will 
create a new boot environment from a source build, run etcupdate and so forth, 
and even mark the new boot environment as the one to be active on reboot.  All 
you need to do is reboot.  I've been using it for source upgrades for a while 
now without problems.  The best thing, for me, is it cuts out all that time 
doing "make installworld" and etcupdate in single user mode, thus minimising 
downtime.

Cheers,

Paul.




Re: Good practices with bectl

2022-09-20 Thread Nuno Teixeira
(...)
maybe:
> yes | make DESTDIR=${BASEDIR} delete-old delete-old-libs

Nuno Teixeira  escreveu no dia quarta, 21/09/2022 à(s)
00:09:

> Hi Alan,
>
> This general procedure works just as well if you're upgrading from source,
>> too.
>>
>> sudo make DESTDIR=${BASEDIR} installworld
>> sudo mergemaster -m $PWD -D $BASEDIR -U
>>
>
> (mergemaster -m  -D )
>
> using etcupdate:
> (etcupdate -s  -D ), source defaults to /usr/src
>
> > etcupdate -D $BASEDIR
>
> Need to find how to execute:
> `make delete-old delete-old-libs` since $BASEDIR don't have /usr/src
>
> Thanks
> --
> Nuno Teixeira
> FreeBSD Committer (ports)
>


-- 
Nuno Teixeira
FreeBSD Committer (ports)


Re: Good practices with bectl

2022-09-20 Thread Nuno Teixeira
Hi Alan,

This general procedure works just as well if you're upgrading from source,
> too.
>
> sudo make DESTDIR=${BASEDIR} installworld
> sudo mergemaster -m $PWD -D $BASEDIR -U
>

(mergemaster -m  -D )

using etcupdate:
(etcupdate -s  -D ), source defaults to /usr/src

> etcupdate -D $BASEDIR

Need to find how to execute:
`make delete-old delete-old-libs` since $BASEDIR don't have /usr/src

Thanks
-- 
Nuno Teixeira
FreeBSD Committer (ports)


Re: Good practices with bectl

2022-09-20 Thread Alan Somers
On Tue, Sep 20, 2022 at 4:14 PM Nuno Teixeira  wrote:
>
> Hello to all,
>
> I will use becl for the first time for current upgrades.
> Just to check that I'm thinking correctly:
>
> Create a test environment for upgrade:
> > bectl create -r test (should I use '-r'?)
> Activate test:
> > bectl activate test
> > reboot
> ...
> > upgrade OS on test
> > reboot
> ...
> if a problem happens, reboot default from BE loader
> ---
> if everything fine destroy default and rename test to default
> > bectl destroy -o default
> > bectl rename test default
> repeat on next upgrade
>
> Don't know if a faster way exists with chroot or bectl jail...
>
> Any hints appreciated.
>
> Thanks,
> --
> Nuno Teixeira
> FreeBSD Committer (ports)

I don't think you need to use "-r".  Also, you're forgetting one of
the best things about boot environments: you can upgrade them even
when not booted into them.  That's faster than upgrading the running
BE.  Here is the procedure I use:

RELEASE=Whatever
sudo bectl create ${RELEASE}
sudo bectl mount ${RELEASE}
BASEDIR=/tmp/be_mount.# Use mount point returned by bectl mount
sudo freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update
upgrade -r ${RELEASE}
sudo freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update install
# Ignore admonitions to reboot, since we're using a boot environment
sudo freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update install
sudo bectl activate ${RELEASE}
sudo reboot

This general procedure works just as well if you're upgrading from source, too.

sudo make DESTDIR=${BASEDIR} installworld
sudo mergemaster -m $PWD -D $BASEDIR -U

-Alan



Good practices with bectl

2022-09-20 Thread Nuno Teixeira
Hello to all,

I will use becl for the first time for current upgrades.
Just to check that I'm thinking correctly:

Create a test environment for upgrade:
> bectl create -r test (should I use '-r'?)
Activate test:
> bectl activate test
> reboot
...
> upgrade OS on test
> reboot
...
if a problem happens, reboot default from BE loader
---
if everything fine destroy default and rename test to default
> bectl destroy -o default
> bectl rename test default
repeat on next upgrade

Don't know if a faster way exists with chroot or bectl jail...

Any hints appreciated.

Thanks,
-- 
Nuno Teixeira
FreeBSD Committer (ports)


Re: RES: TP-LINK USB no carrier after speed test

2022-09-20 Thread Ivan Quitschal




On Mon, 19 Sep 2022, Ivan Quitschal wrote:




On Mon, 19 Sep 2022, Hans Petter Selasky wrote:


Hi Ivan,

Can you also test this USB kernel patch? And revert your if_ure.c patch?

--HPS



hi Hans,

it *almost* worked ... everything was perfect , full speed 600/300 on the 
first 5 tests (on sppedtest.net), on the 6th test, the same problem happened 
unfortunately


thanks

--tzk




hi Hans

today i tested again and the problem ocurred right away at the first attempt :(
but the problem is definitely related to that constant and upload.
I got it back to 2048 and the problem never happened again. but of course , the 
upload speed also dropped back to 90mbps (instead of 300)


thanks

--tzk



Re: domain names and internationalization?

2022-09-20 Thread Stefan Esser

Am 19.09.22 um 22:27 schrieb Rick Macklem:

Hi,

Recently there has been discussion on the NFSv4 IETF working
group email list w.r.t. internationalization for the domain name
it uses for users/groups.


Hi Rick,

I do assume that you know about RFC 3492 (Punycode):

https://datatracker.ietf.org/doc/html/rfc3492


Right now, I am pretty sure the FreeBSD nfsuserd(8) only works
for ascii domain names, but...


You can manually translate domain names into their Punycode
representation. The NFS code could work with them and only
translate them back to UTF-8 (or whatever) for display purposes.

For pure ASCII this is an identity transformation, for names
that actually represent UTF-8 strings, the value to send to
DNS servers (and to locally store in the daemon) could be the
internally stored Punycode representation.


I am hoping someone knows what DNS does in this area (the
working group list uses terms like umlaut, which I have never
even heard of;-).


That's the contraction of "ae", "oe", "ue" that has long ago
been introduced into the German writing system, with the "e"
abbreviated to two dots above the vocal, e.g. "ae" --> "ä".
Just a convenience rule to speed up manually copying the bible
in monasteries in medieval times ;-)

But there are many other accented letters in other languages,
that can be used in internationalized domain names, and the
whole set of Unicode characters can be represented using
Punycode.


I know essentially nothing about internationalization, so any hints
will be appreciated.


For a start:

https://en.wikipedia.org/wiki/Internationalized_domain_name
https://en.wikipedia.org/wiki/Punycode

There are C implementations of the transformations, e.g. in the
dns/libidn2 port.

We do not seem to have equivalent library functions in the
FreeBSD base system yet, but probably should provide them.

Best regards, STefan