Re: systemd-resolved resolving fails sometimes on Debian12

2024-03-03 Thread Victor Sudakov
jeremy ardley wrote:
> 
> On 3/3/24 12:43, Victor Sudakov wrote:
> > Not that I would use bind9 as a caching resolver but still, how
> > do you pass the dynamically obtained AWS DNS server address from
> > systemd-networkd to bind9 ?
> 
> 
> The AWS DNS resolver IPs are static and are widely published.

Do you mean 169.254.169.253?
> 
> It is permissible to not use AWS resolvers for upstream.
> 
> If you want to use AWS resolvers you may run into the problem that some RBL
> services reject queries from 'well known' free DNS servers; that may include
> AWS resolver addresses.
> 
> systemd-networkd without systemd-resolved maintains a list of DNS servers in
> /etc/resolv.conf that can be used by local services.

Do you just disable the systemd-resolved service or do you remove the
systemd-resolved package completely?

If you disable it, you are also supposed to remove the "resolve"
service from nsswitch.conf, right?

> You can override dynamic setting of the dns resolvers in the
> systemd-networkd configuration to use a local caching resolver such as
> bind9, usually listening at 127.0.0.1:53

What would this be for? Sorry, I did not understand this step.
> 
> You can then configure bind 9 as a caching only DNS resolver and set
> appropriate upstream (forwarder) sites, or none at all defaulting to the
> root servers.
> 

Thank you for the ideas, I may use them but first I would like to do
something about the obvious bug in systemd-resolved.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: systemd-resolved resolving fails sometimes on Debian12

2024-03-02 Thread Victor Sudakov
jeremy ardley wrote:
> 
> On 2/3/24 23:06, Victor Sudakov wrote:
> > You know, the official Debian 12 AMI for AWS is built on
> > systemd-resolved and systemd-networkd. I'd prefer not to have to
> > modify the official AMI if I can help it, because this would probably
> > mean also replacing the systemd-networkd with some other network
> > manager.
> 
> systemd-networkd does not rely on systemd-resolved for name resolution.
> 
> There is a relationship where systemd-networkd can feed dns information to
> system-resolved that could be helpful in dynamic IP configurations like
> laptops. However this is not usual case in AWS deployments.

How is it not usual when the Debian12 AMI for AWS works exactly this way?
The system-resolved config is empty (contains only comments) this means that it
obtains the upstream DNS address from systemd-networkd.

> 
> The Debian AWS AMI does not use the usual NetworkManager configuration
> because the usual AWS deployment does not required dynamic  DNS.

How does it not require dynamic DNS when an EC2 instance obtains the
upstream DNS server address from DHCP?

> 
> In my AWS deployments I remove systemd-resolved and use bind9 instead.
> 

Not that I would use bind9 as a caching resolver but still, how
do you pass the dynamically obtained AWS DNS server address from
systemd-networkd to bind9 ?

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: systemd-resolved resolving fails sometimes on Debian12

2024-03-02 Thread Victor Sudakov
jeremy ardley wrote:
> 
> On 1/3/24 17:47, Victor Sudakov wrote:
> > Has anybody encountered this problem using systemd-resolved as a
> > resolver on Debian12? A DNS request via systemd-resolved fails, but
> > fails only occasionally. A failure can happen once per a hundred
> > successful requests or so. If I run:
> 
> 
> I recall a similar problem with systemd-resolved. I think it was related to
> DNSSEC.

In my case the problem seems related to IPv6. That is, when I disable
IPv6 via "sysctl net.ipv6.conf.all.disable_ipv6=1" the problem
disappears.

I did not enable DNSSEC in systemd-networkd.

> 
> I ended up not using systemd-resolved
> 
> Alternatives to systemd-resolved include dnsmasq  - which doesn't support
> DNSSEC - and bind9 which does.

You know, the official Debian 12 AMI for AWS is built on
systemd-resolved and systemd-networkd. I'd prefer not to have to
modify the official AMI if I can help it, because this would probably
mean also replacing the systemd-networkd with some other network
manager.

Anyway, if there is a bug in systemd-resolved it should be reported, right? 

I have been able to google up similar (though not exactly the same)
issues with systemd-resolved and the caching of CNAME records which
give similar random resolution errors, but they are reported as fixed.

I tried enabling the debug messages in systemd-resolved and probably
(just probably) the random error happens when systemd-resolved's cache
for the particular entry expires, but I'm not sure. In fact the debug
was not very informative, or I lack the qualification to interpret it.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


systemd-resolved resolving fails sometimes on Debian12

2024-03-01 Thread Victor Sudakov
Dear Colleagues,

Has anybody encountered this problem using systemd-resolved as a
resolver on Debian12? A DNS request via systemd-resolved fails, but
fails only occasionally. A failure can happen once per a hundred
successful requests or so. If I run:

while resolvectl query myredis.my.domain ; do sleep 1; done

This will eventually happen:

-- Information acquired via protocol DNS in 960us.
-- Data is authenticated: no; Data was acquired via local or encrypted 
transport: no
-- Data from: cache network
myredis.my.domain: x.x.44.189-- link: ens5
  (redis-cache2-002.tqma2d.0001.usw2.cache.amazonaws.com)

-- Information acquired via protocol DNS in 1.1ms.
-- Data is authenticated: no; Data was acquired via local or encrypted 
transport: no
-- Data from: cache network
myredis.my.domain: x.x.44.189-- link: ens5
  (redis-cache2-002.tqma2d.0001.usw2.cache.amazonaws.com)

-- Information acquired via protocol DNS in 2.2ms.
-- Data is authenticated: no; Data was acquired via local or encrypted 
transport: no
-- Data from: network
myredis.my.domain: resolve call failed: Lookup failed due to system error: 
Invalid argument

Then it works again for a hundred or so queries. Query monitoring
shows that systemd-resolved occasionally returns "EINVAL", but mostly
"success".

Any ideas please? It is very unpleasant because the AWS Debian AMI has
systemd-resolved as the default caching resolver and it will take some
effort to eradicate it and replace with unbound or something else.

I don't blame the parent DNS server (from AWS) because if I query it
directly, it always answers.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: A hypervisor for a headless server?

2023-06-02 Thread Victor Sudakov
Andy Smith wrote:
> Hi Victor,

Hi Andy!

[dd]
> > Now I see that a supported minimal headless configuration probably
> > does not exist at all.
> 
> I don't think that is correct at all, depending on what you mean by
> "supported". You absolutely will find a guide out there to do what
> you want, with relative ease I should think.

Yes, I guess the https://wiki.debian.org/KVM seems a good guide and
even covers the case of a minimal :-) installation.

[dd]
> 
> I would say that documentation from Ubuntu is likely to be more
> "enterprisey". The other thing is, if you're coming from a BSD
> background (you mentioned Bhyve) you probably are a lot more used to
> there being one way of doing things and that way being thoroughly
> documented. 

That's correct. Though I must admit the FreeBSD Handbook can be
outdated in places as the project is clearly lacking resources. It is
still a very good source of knowledge.

> Whereas on Linux there tends to be multiple ways and
> even the same one can be slightly different on different Linux
> distributions.

Some Debian documentation is very good too. 
> 
> I am using Xen more at the moment, but I generally wouldn't
> recommend that to newcomers. I tend to recommend KVM just because
> there's so many guides for it out there.

I'm currently going to migrate some FreeBSD VMs from bhyve to a linux
host. I hope KVM will have no problem with their raw disk images. 

[dd]
> 
> I would probably just install qemu-kvm and accept the bloat of a lot
> of packages that I would never use, use virsh to manage the VMs from
> command line, and perhaps over time worm out which packages can be
> safely removed.

OK, thank you, maybe I'll go this route.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: A hypervisor for a headless server?

2023-06-02 Thread Victor Sudakov
Nicolas George wrote:
> Victor Sudakov (12023-06-02):
> > Oh, I'm a rare kind of newbie. I have 25 years of FreeBSD
> > experience and about 10 years of Solaris experience.
> 
> Newbies who think they have a lot of experience are, sadly, not a rare
> breed.

I agree. But once you start measuring experience by the actual years a
person has actively worked with this or that system, you can judge
more or less objectively.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: A hypervisor for a headless server?

2023-06-02 Thread Victor Sudakov
Mario Marietto wrote:
> Hello to everyone. I follow every day the development of bhyve for FreeBSD
> and I have even collaborated with some of its developers to add the
> functionality of the passing through of one nvidia gpu to a linux guest.
> What to say ? that bhyve is a programming gem. Qemu and kvm have more
> functionalities but they are even old. Bhyve is a fresh product that is
> evolving fast. Qemu + kvm for example don't work on my old PC that has an
> Intel I5 cpu,because it does not have all the virtualization requirements.
> For the sake of my curiosity I tried bhyve and...it worked. I don't know
> why,but I know that it requires less virtualization directives. Some
> developers talked about the idea to rewrite it to make it a standalone tool
> and I think that's a nice idea. As I think that a cool idea could be to
> rewrite its code to port it to Linux. It could be used as a light
> hypervisor,for those old machines like mine,that don't have all the
> hardware prerogatives needed to run qemu and kvm.

Still, from my experience, if you disable hardware virtualization in
BIOS Setup, bhyve does not work.

I agree with you that bhyve is a masterpiece. The way it works with
ZFS is brilliant too. I usually use the vm-bhyve shell with it, but it
seems to be supported by some hypervisor management tools like
libvirt.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: A hypervisor for a headless server?

2023-06-02 Thread Victor Sudakov
to...@tuxteam.de wrote:
> On Fri, Jun 02, 2023 at 08:05:18AM +, Andy Smith wrote:
> > Hello,
> 
> [...]
> 
> > Most of the time with most packages it's obvious, but I have seen
> > some weird things from time to time! KVM is such a big package that
> > I shy away from just advising --no-install-recommends to those
> > inexperienced with it.
> 
> 100% agreed. Whoever deviates from the "recommended" way should be
> prepared (and willing) to learn a few things on the way. Which may
> be a good thing or not :)


Still the idea to have a base hypervisor package: fully tested,
functional and not missing any important files, and a set of optional
GUI tools/shells is very appealing to me. Much like you can install,
for example, Git (CLI tested and ready) and a bunch of optional GUI
tools or editors around it.


-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: A hypervisor for a headless server?

2023-06-02 Thread Victor Sudakov
Andy Smith wrote:

[dd]

> 
> Most of the time with most packages it's obvious, but I have seen
> some weird things from time to time! KVM is such a big package that
> I shy away from just advising --no-install-recommends to those
> inexperienced with it.

Thanks for your opinion. I've made a mental note to myself to treat
KVM differently from bhyve. The latter is really small and has a very
small footprint on the system. 

Interestingly, libvirt claims to support bhyve, I just never felt a
need for such sophisticated tools to run just several VMs.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: A hypervisor for a headless server?

2023-06-02 Thread Victor Sudakov
to...@tuxteam.de wrote:
> > 
> > But Andy Smith wrote recently that "installing without recommends is not a 
> > supported use
> > case" and I believe him.
> 
> FWIW, I do install with no-recommends in general:
> 
>   tomas@trotzki:~$ cat /etc/apt/apt.conf.d/95no-recommends 
>   APT::Install-Recommends no;
> 
> "Not supported" seemed a bit strong to me: what does mean "not
> supported" in a non-commercial distro, anyway?
> 
> I'd prefer to say: not recommended for newbies. The problem with
> you is that you want to be a newbie and not a newbie at the same
> time.
> 
> This doesn't work :)

Oh, I'm a rare kind of newbie. I have 25 years of FreeBSD
experience and about 10 years of Solaris experience. However I still
consider myself a newbie in Linux as I work with it only since 2020
and in rather limited ways.

> 
> In the concrete case: some newbie would expect to have the GUI
> tools installed when (s)he installs KVM. Some other not. Since
> APT doesn't (yet) support mind reading (alas, the proprietary
> drivers and that), the GUI tools are recommended.

That's what documentation is for! If a newbie wants an installation
without GUI, they look for a how-to about headless installation.

It's a pity I came across https://wiki.debian.org/KVM only after I had
already posted to the list. I think this page covers my case. I really
with that the first reply to my question had been a link to this page, it
could have saved a lot of electrons and carbon.

> 
> That's what "recommends" is for. You can switch it off, even
> in general (see above), but then you'll have to be prepared to
> look into package descriptions and come up yourself with "oh,
> perhaps I want to install that, too".

Yes, sure.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: A hypervisor for a headless server?

2023-06-02 Thread Victor Sudakov
Stanislav Vlasov wrote:
> пт, 2 июн. 2023 г. в 12:18, Victor Sudakov :
> 
> > Running "apt install qemu-kvm" on a Debian 11 AWS EC2 instance which has
> > never had any X-Window or desktop environment in its entire life,
> > tries to install qemu-system-gui, adwaita-icon-theme, libgtk-3-common
> > and a lot of similar stuff.
> 
> Even with `--no-install-recommends`?
> qemu-system-x86 package _recommends_ qemu-system-gui, but you may
> install without.

But Andy Smith wrote recently that "installing without recommends is not a 
supported use
case" and I believe him.

On the other hand, https://wiki.debian.org/KVM#Installation advises it:

"When installing on a server, you can add the --no-install-recommends
apt option, to prevent the installation of extraneous graphical
packages"

The truth is definitly out there somewhere.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: A hypervisor for a headless server?

2023-06-02 Thread Victor Sudakov
Miles Fidelman wrote:
> >
> >
> > On Thu, Jun 1, 2023, 9:58 PM Victor Sudakov  > <mailto:v...@sibptus.ru>> wrote:
> >
> > Dear Colleagues,
> >
> > There is a hypervisor called bhyve for FreeBSD. It's completely
> > headless, no graphics, runs as a daemon and provides serial and VNC
> > consoles.
> >
> > Can you please advise a similar headless and minimal hypervisor for
> > Debian or Ubuntu?
> >
> >
> The classic would be Xen (which I've been running for years). There's 
> also Virtual Box, and VMware ESXi.  You might check out the list at 
> https://www.hitechnectar.com/blogs/open-source-hypervisor/

Thanks for reminding about Xen, it looks minimalist enough, I am
going to have a look at it.

VMware ESXi is a bare-metal hypervisor, not exactly what I was looking
for now (though when I had some experience with it, it had some kind
of Linux inside).


-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: A hypervisor for a headless server?

2023-06-02 Thread Victor Sudakov
Nicholas Geovanis wrote:
> On Thu, Jun 1, 2023, 9:58 PM Victor Sudakov  wrote:
> 
> > Dear Colleagues,
> >
> > There is a hypervisor called bhyve for FreeBSD. It's completely
> > headless, no graphics, runs as a daemon and provides serial and VNC
> > consoles.
> >
> > Can you please advise a similar headless and minimal hypervisor for
> > Debian or Ubuntu?
> >
> 
> Just don't install x-windows or anything that depends on it, like a desktop
> environment. Servers in datacenters run headless more than 95% of cases.
> Debian and its derivatives too.

Running "apt install qemu-kvm" on a Debian 11 AWS EC2 instance which has
never had any X-Window or desktop environment in its entire life,
tries to install qemu-system-gui, adwaita-icon-theme, libgtk-3-common
and a lot of similar stuff.

That's the pain :-)


-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: A hypervisor for a headless server?

2023-06-02 Thread Victor Sudakov
Andy Smith wrote:
> 
> On Fri, Jun 02, 2023 at 03:33:09AM +, Victor Sudakov wrote:
> > So what's the package name for just "kvm" without the GUI tools? Because
> 
> For someone that wants to run a hypervisor in a non-newbie manner

I don't think running a single daemon with a couple of configuration
files and a simple CLI interface could be considered "running in a
non-newbie manner".

> I'm afraid you don't seem to be that willing to do any of your own
> research.

That's correct, I was not willing to do much of my own research
of what I think should be a trivial documented best practice. 

Now I see that a supported minimal headless configuration probably
does not exist at all.

Most articles like this https://ubuntu.com/blog/kvm-hyphervisor or
this https://help.ubuntu.com/community/KVM/Installation if followed
bring about lots of GUI packages. Interestingly, the five or six
articles I've read seem to suggest a slightly different set of packages
to set up a hypervisor.

> 
> The package is still qemu-kvm (a virtual package that probably
> depends on qemu-system-x86 for you).
> 
> By default that will install a ton of recommended packages that
> include all the GUI tools you probably object to, but that is just
> how Debian works [and necessarily how a general purpose binary Linux
> distribution has to work].
> 
> If you want the minimum amount of packages to be installed you can
> try installing without recommends, i.e.
> 
> # apt --no-install-recommends install qemu-kvm
> 
> which will dramatically reduce the number of packages, BUT:
> 
> - you may miss some package that's really useful in most cases -
>   installing without recommends is not a supported use case.
> 
> - you'll probably still get some packages you will never use.

I tried installing with --no-install-recommends and had the same
impression as you (that I would miss some required packages and still
get some extraneous ones). That is why I really did not want to go
that way.

> 
> This is all very basic Debian systems administration and so if you
> weren't aware of these things I question whether you would have an
> easy time trying to strip a Debian install of KVM down to the bare
> minimum instead of going the easier route of just doing what there
> are thousands of guides out there for.

Of course not. I'm neither qualified nor willing to hack into the KVM
hypervisor implementation details. In fact, I've come here for advice
how to install a minimal headless hypervisor hoping for some docs
documenting the best practice.

Now I see that no such thing as a minimal hypervisor install exists in
Debian/Ubuntu, I may follow some official guide. 

Is this https://help.ubuntu.com/community/KVM/Installation the
official guide?

> 
> If the idea of the installation of binary package dependencies that
> you never use massively offends you I would suggest that Debian is
> not an ideal match for you, and you may be better off going with
> Gentoo or Arch or something.

I must admit it does offend me a bit but not to the degree of using
Gentoo or Manjaro.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: A hypervisor for a headless server?

2023-06-01 Thread Victor Sudakov
Andy Smith wrote:
> Hello,
> 
> On Fri, Jun 02, 2023 at 02:39:43AM +0000, Victor Sudakov wrote:
> > Please don't just say "kvm". I've tried installing different
> > combinations of "qemu-kvm", "virt-manager" etc and they all depend on
> > dozens of GUI tools.
> 
> "kvm" is the generally accepted answer. None of the GUI tools are
> necessary, they are optional extras. There are thousands upon

So what's the package name for just "kvm" without the GUI tools? Because

# apt install kvm
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package kvm is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'kvm' has no installation candidate


-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


A hypervisor for a headless server?

2023-06-01 Thread Victor Sudakov
Dear Colleagues,

There is a hypervisor called bhyve for FreeBSD. It's completely
headless, no graphics, runs as a daemon and provides serial and VNC
consoles.

Can you please advise a similar headless and minimal hypervisor for
Debian or Ubuntu?

Please don't just say "kvm". I've tried installing different
combinations of "qemu-kvm", "virt-manager" etc and they all depend on
dozens of GUI tools.

A list of packages for the "apt install" command to install a really
minimal hypervisor would be very much appreciated. I'm not really
afraid of writing a couple of text or YAML configuration files to
describe VMs if it helps me avoid the GUI configuration.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Wireshark does not show physical interfaces for capture

2023-05-01 Thread Victor Sudakov
daven...@tuxfamily.org wrote:

[dd]
> > 
> > I have a vague memory of having to do
> >   sudo dpkg-reconfigure wireshark-common
> > a few years ago before I was able to capture packets without using sudo
> 
> Good memory, actually. The full steps are
> 
> $ sudo dpkg-reconfigure wireshark-common # [1]
> Should non-superusers be able to capture packets => Yes

This interactive step is performed by "apt install wireshark" actually.

> 
> $ sudo usermod -a -G wireshark $USER # [1]
> $ newgrp wireshark

I even did a full logout/login from Mate to make sure my user picks up
the new group.

> $ groups # The output should now include "wireshark" group name

Turns out these steps are not sufficient now.

I wonder if Wireshark uses `dumpcap -D` internally to show the list of
interfaces? I can do this now from my user account:

$ dumpcap -D
1. enp3s0
2. any
3. lo (Loopback)
4. bluetooth-monitor
5. nflog
6. nfqueue
7. dbus-system
8. dbus-session


but still cannot see those interfaces in the Wireshark GUI.


-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Wireshark does not show physical interfaces for capture

2023-05-01 Thread Victor Sudakov
Lee wrote:
> >
> >> >
> >> > However when I startup wireshark from the GUI, it does not show the
> >> > physical interfaces in the list of interfaces to capture from, so I
> >> > cannot really capture anything from the non-root user. When started
> >> > via sudo, it does show enp3s0 and other interfaces and can capture.
> >> >
> >> > What am I missing?
> >>
> >> See if the interfaces have been hidden from the GUI.  eg
> >> $ grep devices_hide .config/wireshark/preferences
> >> capture.devices_hide: any,nflog,nfqueue,dbus-system,dbus-session
> >
> > Nothing much there:
> >
> > $ grep devices_hide .config/wireshark/preferences
> > #capture.devices_hide:
> >
> >>
> >> Or check from the GUI:
> >> Capture / Refresh Interfaces
> >
> > Does not add the NICs to the list.
> >
> >> Capture / Options
> >> select the Input tab and click Manage Interfaces
> >> select the Local Interfaces tab and make sure there's a checkmark
> >> under Show for all the physical interface names
> >
> > I don't see any physical interfaces there, this is all I see:
> > https://ibb.co/190ytwv
> 
> Have you looked at
> https://www.wireshark.org/faq.html#capprobunix

Yes, I have, and I have also read
https://gitlab.com/wireshark/wireshark/-/raw/master/packaging/debian/README.Debian

> 
> I have a vague memory of having to do
>   sudo dpkg-reconfigure wireshark-common
> a few years ago before I was able to capture packets without using sudo

All this command does IMHO is create the "wireshark" group with sufficient
privileges to capture packets. I clearly remember answering "Yes" to
that question while installing Wireshark.

That is why I wrote in my first mail that dumpcap can list interfaces
and capture packets when run from my account:

$ whoami ; dumpcap -D
vas
1. enp3s0
2. any
3. lo (Loopback)
4. bluetooth-monitor
5. nflog
6. nfqueue
7. dbus-system
8. dbus-session
$

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Wireshark does not show physical interfaces for capture

2023-04-29 Thread Victor Sudakov
Victor Sudakov wrote:
> 
> I don't see any physical interfaces there, this is all I see: 
> https://ibb.co/190ytwv

Sorry I forgot to mention that dumpcap sees the NICs, but the
Wireshark GUI does not:

$ whoami ; dumpcap -D
vas
1. enp3s0
2. any
3. lo (Loopback)
4. bluetooth-monitor
5. nflog
6. nfqueue
7. dbus-system
8. dbus-session
$

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Wireshark does not show physical interfaces for capture

2023-04-29 Thread Victor Sudakov
Lee wrote:
> On 4/29/23, Victor Sudakov  wrote:

[dd]

> >
> > However when I startup wireshark from the GUI, it does not show the
> > physical interfaces in the list of interfaces to capture from, so I
> > cannot really capture anything from the non-root user. When started
> > via sudo, it does show enp3s0 and other interfaces and can capture.
> >
> > What am I missing?
> 
> See if the interfaces have been hidden from the GUI.  eg
> $ grep devices_hide .config/wireshark/preferences
> capture.devices_hide: any,nflog,nfqueue,dbus-system,dbus-session

Nothing much there:

$ grep devices_hide .config/wireshark/preferences
#capture.devices_hide: 

> 
> Or check from the GUI:
> Capture / Refresh Interfaces

Does not add the NICs to the list.

> Capture / Options
> select the Input tab and click Manage Interfaces
> select the Local Interfaces tab and make sure there's a checkmark
> under Show for all the physical interface names

I don't see any physical interfaces there, this is all I see: 
https://ibb.co/190ytwv

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Wireshark does not show physical interfaces for capture

2023-04-29 Thread Victor Sudakov
Dear Colleages,

My user is a member of the "wireshark" group and can start /usr/bin/dumpcap all 
right:

$ ls -al /usr/bin/dumpcap 
-rwxr-xr-- 1 root wireshark 129696 мар  4  2022 /usr/bin/dumpcap

$ id
uid=1000(vas) gid=1000(vas)
группы=1000(vas),4(adm),20(dialout),21(fax),24(cdrom),25(floppy),26(tape),27(sudo),30(dip),44(video),46(plugdev),121(lpadmin),136(lxd),137(sambashare),138(wireshark),1002(admin)

$ /usr/bin/dumpcap
Capturing on 'enp3s0'
File: /tmp/wireshark_enp3s0Y3LW31.pcapng
Packets captured: 126
Packets received/dropped on interface 'enp3s0': 126/0
(pcap:0/dumpcap:0/flushed:0/ps_ifdrop:0) (100.0%)
$

However when I startup wireshark from the GUI, it does not show the
physical interfaces in the list of interfaces to capture from, so I
cannot really capture anything from the non-root user. When started
via sudo, it does show enp3s0 and other interfaces and can capture.

What am I missing?

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Color of the active window title bar in ubuntu-mate?

2022-08-22 Thread Victor Sudakov
Bret Busby wrote:
> 
> And, after all of that, in looking in my Appearance -> Themes, through 
> the Yaru stuff, and noticing that the YaruGreen looks like the 
> TraditionalGreen, I also noticed that the YaruOk looks like the 
> TraditionalOkBrave.

I've tried all the Yaru* themes and none of them features distinct
colours for the active and non-active windows.

So I'm using the TraditionalOk-Dust theme for its gentle color.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Color of the active window title bar in ubuntu-mate?

2022-08-22 Thread Victor Sudakov
Nicolas George wrote:
> 
> It is, I have found, a problem with most Gtk+3 applications. A
> manifestation of the “we know better than you” mindset of the GNOME
> people. I have not found a solution to disable it globally, short of
> patching Gtk+3 itself. The best I have found is to force my WM to ignore
> the hint on a case-by-case basis:
> 
> # Gtk+3 sucks
> Style "Application Class" !MWMDecor
> Style "Gajim" !MWMDecor

Where do you put this magic? Hopefully it could help me fix Lens and
Teams? I hate applications to bring their own decorations.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Color of the active window title bar in ubuntu-mate?

2022-08-22 Thread Victor Sudakov
Greg Wooledge wrote:
> On Mon, Aug 22, 2022 at 10:02:22AM +0000, Victor Sudakov wrote:
> > Any applications using standard decorations (Firefox, MATE Terminal,
> > Google Chrome etc).
> 
> It's worth pointing out, perhaps, that Google Chrome does *not* use
> the standard window manager decorations by default.  There is, however,
> an option you can toggle to make it do so.
> 
> (Unless this behavior changed in some recent version -- but I doubt it.)

Looks like it does now by default, which is nice of them.

> 
> Firefox, on the other hand, *does* use the regular widgets.
> 

On that computer, I have seen only 2 apps so far which use their own
decorations, they are Microsoft Teams and Lens. 

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Color of the active window title bar in ubuntu-mate?

2022-08-22 Thread Victor Sudakov
Bret Busby wrote:

[dd]

> >> I use the Theme named "TraditionalOk", with the panel at the bottom of
> >> the screen, and it is the most like MS Windows 95, and, gives my the
> >> interface that I prefer.
> > 
> > I don't have any "TraditionalOk" theme there, just countless variants of the
> > Yaru-* themes. How did you add the "TraditionalOk" theme? Is it in
> > some package?
> > 
> > 
> 
> I have been using this them,e for so many years, that I have forgotten 
> whether it came as a default theme that was available, or, whether I 
> added it.
> 
> However, In the Appearance window, in the Themes tab, where I have the 
> theme displayed, at the bottom left corner, is "Get more themes online". 
> Clicking that, opens a web page, in the default web browser, at
> https://mate-desktop.org/themes/
> and selecting
> "GTK 2.x themes"
> ...
> Unfortunately, that is not searchable, a search cannot be performed, for 
> a theme name.

Oh, thanks for the hint!  https://www.mate-look.org/browse?cat=135 is
in fact searchable, there is a (poorly visible) search bar which you
can use: https://www.mate-look.org/find?search=TraditionalOk
> 
> After going through about 40 screens, and not finding it, by doing a 
> search, using the "site=" to search that site, I found it, not as a mate 
> theme, but as a gnome (from gnome2, I assume, which mate is supposed to 
> emulate) theme;
> https://www.gnome-look.org/p/1407000
> the variant that I use, is TraditionalOkBrave (the blue and grey one).
> 
> I think, in resembling the MS Windows 95 interface, it also resembles 
> the fvwm interface, but, it is decades since I used the fvwm interface.

That's great! It looks like every user of this computer will have to
install the theme individually but this is a solution! I've chosen
the TraditionalOk-Dust theme, it reminds me of the previous version of
the MATE desktop.

> I hope that this helps.

It does! Thank you very much, Bret!

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Color of the active window title bar in ubuntu-mate?

2022-08-22 Thread Victor Sudakov
Bret Busby wrote:
> On 22/8/22 16:03, Victor Sudakov wrote:
> > 
> > The titlebar colors of active and inactive windows are the same which
> > is very inconvenient. In the previous version of Ubuntu/Mate, the
> > color of the active window's titlebar was distinct.

Hello Bret!

> 
> 1. The Ubuntu users mailing list is at
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> which may be more useful for you.

Thank you, I'll go there if I don't find any help here.
> 
> 2. In what applications are you noticing this, and, 


Any applications using standard decorations (Firefox, MATE Terminal,
Google Chrome etc).

> what interface are you using?

Sorry, I did not get the question.

> 
> I have been using UbuntuMATE for a decade or so, and, I am running 
> 22.04.1 on this computer (I rub 16.0.4.7 on another), and, I do not see 
> the problem that you are observing.
> 
> In the Control Center, go to Look and Feel -> Appearance.
> 
> I use the Theme named "TraditionalOk", with the panel at the bottom of 
> the screen, and it is the most like MS Windows 95, and, gives my the 
> interface that I prefer.

I don't have any "TraditionalOk" theme there, just countless variants of the
Yaru-* themes. How did you add the "TraditionalOk" theme? Is it in
some package?


-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Color of the active window title bar in ubuntu-mate?

2022-08-22 Thread Victor Sudakov
Dear Colleagues,

Sorry for asking a Ubuntu-specific question. Please redirect me to a
better mailing list if you feel it right.

I was using ubuntu-mate 20.04.4 with MATE 1.24.0. Now I have switched
to 22.04.1 with MATE 1.26.0 and come across an unfortunate thing: 

The titlebar colors of active and inactive windows are the same which
is very inconvenient. In the previous version of Ubuntu/Mate, the
color of the active window's titlebar was distinct.

I've been trying to find this setting in the Control Center but in
vain. Googling for something like "mate 1.26.0 active window titlebar
color" fetches some dated results about Ubuntu 18.04 and manually
editing GTK resource files.

Can you help me out? I'm sure I'm missing something obvious. 

I don't need anything fancy, simple Motif-style decorations are fine
for me, or something like the look of the previous Mate version.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: apt-get -qq install

2022-08-03 Thread Victor Sudakov
Curt wrote:
> On 2022-08-03, Victor Sudakov  wrote:
> >
> >
> > Curt wrote:
> >> >
> >> >
> >> > I'm trying to quiet apt's output by using `apt-get -qqy` in a CI/CD
> >> > pipeline, however I still see ugly stuff like this in my CI/CD log:
> 
> >> Quiet level 2 implies -y.
> >
> > An extra -y won't do any harm, especially if some day someone decides
> > to remove one -q to debug the pipeline for example.
> 
> So what's acceptable in the input is intolerable in the output.

That's correct. In fact, the apt command with its arguments is not
even visible in the CI/CD log, only its output is.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: apt-get -qq install

2022-08-03 Thread Victor Sudakov
Curt wrote:
> >
> >
> > I'm trying to quiet apt's output by using `apt-get -qqy` in a CI/CD
> > pipeline, however I still see ugly stuff like this in my CI/CD log:
> 
> Quiet level 2 implies -y.

An extra -y won't do any harm, especially if some day someone decides
to remove one -q to debug the pipeline for example.

> 
> > Selecting previously unselected package php-common.
> 
> That's dpkg ouput, isn't it? So maybe add '-o=Dpkg::Use-Pty=0' to your 
> command.

I have already written in  that I've tried 
setting `sudo DEBIAN_FRONTEND=noninteractive apt-get -qqy 
--no-install-recommends install ...` 
and `sudo apt-get -qqy -o Dpkg::Use-Pty=0 ...` but the rubbish is still there.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: apt-get -qq install

2022-08-03 Thread Victor Sudakov
David Christensen wrote:
> >>>
> >>> (Un)fortunately this is a CI/CD pipeline, the VM and its data will be
> >>> gone forever after the build. Unless I care to keep apt output as an
> >>> artifact somewhere which is IMHO an overkill. I just want an concise
> >>> CI/CD log without interactive bells and whistles like progress
> >>> indicators.
> >>
> >>
> >> Without seeing your CI/CD pipeine -- create a patterns file containing
> >> regular expressions that match the lines you want removed, then add a
> >> grep(1) filter into the pipeline:
> > 
> > Of course I can think of many workarounds. The original question was
> > however why "-qq" was not working and what I was missing in "apt"
> > usage.
> 
> 
> You're right -- I made no attempt to figure out why apt(8) apparently 
> does not implement proper "quiet", "real-quiet", etc., options.
> 
> 
> Call it pragmatism.  I've been down plenty of rabbit holes trying to 
> trouble-shoot software; and I expect apt(8) is non-trivial.  How many 
> hours have you and others spent on this issue?  

The link Davidson has provided shows that many people have spent some
time on it since 2009.

> Have you found the 
> "correct" solution?  Using grep(1) in a command pipeline to filter out 
> unwanted lines is a known technique.  It took me a few minutes to write 
> the example, and it works.

Yes, I think I'll have to resort to a workaround once it's now clear
that this is a bug. I just don't like the idea of creating a
workaround when there is an official way to do something, but this is
clearly not the case.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: apt-get -qq install

2022-08-03 Thread Victor Sudakov
davidson wrote:
> > Thank you, how do you activate this option? I've just tried
> > `apt-get -o quiet::NoProgress=true -qqy ...`
> 
> I would do it that way too.
> 
> > but the "Reading database ... 5%" stuff is still there.
> 
> Yeah, after some unsatisfying experimentation I've had no luck either.
> 
> Maybe this bug report will interest you:
> 
>   #539617 - dpkg: Add option to suppress progress display while reading 
> database
>   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=539617

So, it's an old problem since 2009, and still unresolved? Thank you for the 
link.

On the one hand, it's sad. On the other hand, I'm glad I'm not the only one who 
is annoyed.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: apt-get -qq install

2022-08-02 Thread Victor Sudakov
David Christensen wrote:
> On 8/2/22 15:53, Victor Sudakov wrote:
> > 
> > (Un)fortunately this is a CI/CD pipeline, the VM and its data will be
> > gone forever after the build. Unless I care to keep apt output as an
> > artifact somewhere which is IMHO an overkill. I just want an concise
> > CI/CD log without interactive bells and whistles like progress
> > indicators.
> 
> 
> Without seeing your CI/CD pipeine -- create a patterns file containing 
> regular expressions that match the lines you want removed, then add a 
> grep(1) filter into the pipeline:

Of course I can think of many workarounds. The original question was
however why "-qq" was not working and what I was missing in "apt"
usage.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: apt-get -qq install

2022-08-02 Thread Victor Sudakov
David Christensen wrote:
> > 
> > I don't actually like the idea of redirecting apt-get's output to
> > /dev/null because I want to see the list of packages installed, but without
> > these pseudographics. Do you think it's possible? Any ideas?
> 
> 
> I prefer the idea of collecting all of the data and then writing queries 
> and reports to print the interesting bits.  If you keep all of the data, 
> you can apply future queries and reports to past data.  But if you 
> filter the data up front and save one report format, your future options 
> are limited.

(Un)fortunately this is a CI/CD pipeline, the VM and its data will be
gone forever after the build. Unless I care to keep apt output as an
artifact somewhere which is IMHO an overkill. I just want an concise
CI/CD log without interactive bells and whistles like progress
indicators.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: apt-get -qq install

2022-08-02 Thread Victor Sudakov
davidson wrote:
> >
> > I'm trying to quiet apt's output by using `apt-get -qqy` in a CI/CD
> > pipeline, however I still see ugly stuff like this in my CI/CD log:
> >
> > Selecting previously unselected package php-common.
> > (Reading database ...
> > (Reading database ... 5%
> > (Reading database ... 10%
> [snip]
> >
> > and this:
> >
> > Scanning processes... [ 
> >]
> > Scanning processes... [ 
> >]
> > Scanning processes... [ 
> >]
> > Scanning processes... [=
> >]
> > Scanning processes... [=
> >]
> > Scanning processes... [==   
> >]
> > Scanning processes... [==   
> >]
> [snip]
> 
> > Don't you think the `-qq` modifier should spare me these things?
> 
> I would expect so too.
> 
> > I don't actually like the idea of redirecting apt-get's output to
> > /dev/null because I want to see the list of packages installed, but without
> > these pseudographics. Do you think it's possible? Any ideas?
> 
> In the file
> 
>   /usr/share/doc/apt/examples/configure-index.gz
> 
> I notice there is a stanza that begins like so:
> 
>   quiet "" {
> NoUpdate ""; // never update progress information - included in -q=1
> NoProgress ""; // disables the 0% -> 100% progress on cache 
> generation and stuff
> 
> I don't know whether this will help you, but it does look suggestive.

Thank you, how do you activate this option? I've just tried 
`apt-get -o quiet::NoProgress=true -qqy ...` but the "Reading database ... 5%"
stuff is still there.


-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: apt-get -qq install

2022-08-02 Thread Victor Sudakov
David Wright wrote:
> On Tue 02 Aug 2022 at 18:27:22 (+), Victor Sudakov wrote:
> > I'm trying to quiet apt's output by using `apt-get -qqy` in a CI/CD
> > pipeline, however I still see ugly stuff like this in my CI/CD log:
> > 
> > Selecting previously unselected package php-common.
> > (Reading database ... 
> > (Reading database ... 5%
> [ … ]
> > 
> > and this:
> > 
> > Scanning processes... [ 
> >]
> > Scanning processes... [=
> >]
> [ … ]
> > 
> > Don't you think the `-qq` modifier should spare me these things? 
> > 
> > I don't actually like the idea of redirecting apt-get's output to
> > /dev/null because I want to see the list of packages installed, but without
> > these pseudographics. Do you think it's possible? Any ideas?
> 
> The packages installed and the terminal output are logged in
> /var/log/apt/{history,term}.log respectively (which I never rotate).

Which will be lost in a CI/CD environment because the VM image is ephemeral.

BTW I've tried setting `sudo DEBIAN_FRONTEND=noninteractive apt-get -qqy 
--no-install-recommends install ...` and 
`sudo apt-get -qqy -o Dpkg::Use-Pty=0 ...` to no avail, the rubbish is still 
there.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


apt-get -qq install

2022-08-02 Thread Victor Sudakov
Dear Colleagues,

I'm trying to quiet apt's output by using `apt-get -qqy` in a CI/CD
pipeline, however I still see ugly stuff like this in my CI/CD log:

Selecting previously unselected package php-common.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%

and this:

Scanning processes... []
Scanning processes... []
Scanning processes... []
Scanning processes... [=   ]
Scanning processes... [=   ]
Scanning processes... [==  ]
Scanning processes... [==  ]
Scanning processes... [=== ]
Scanning processes... [=== ]
Scanning processes... []
Scanning processes... []
Scanning processes... [=   ]
Scanning processes... [=   ]
Scanning processes... [==  ]
Scanning processes... [==  ]
Scanning processes... [=== ]
Scanning processes... [=== ]
Scanning processes... []
Scanning processes... []
Scanning processes... [=   ]
Scanning processes... [=   ]

Don't you think the `-qq` modifier should spare me these things? 

I don't actually like the idea of redirecting apt-get's output to
/dev/null because I want to see the list of packages installed, but without
these pseudographics. Do you think it's possible? Any ideas?

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Limit memory consumption of an ad hoc process

2021-07-05 Thread Victor Sudakov
The Wanderer wrote:
> On 2021-07-05 at 22:42, Victor Sudakov wrote:
> 
> > Greg Wooledge wrote:
> 
> >> And in any case, when you test this stuff, use the subshells.  
> > 
> > Well, my goal is to find a way to limit programs run from cron, PHP's
> > proc_open() etc., not from the interactive shell. What would you advise?
> 
> Is there any reason to think that the ulimit approach wouldn't work in
> that type of context, as well as when invoked from within a shell?

That depends how you are going to *use* the ulimit approach in that type
of context. For example, there is no way to specify ulimit in PHP's
proc_open(), maybe because setrlimit() is OS-specific.

There are other cases when binaries are executed directly, without a
shell, hence the need for a wrapper.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Limit memory consumption of an ad hoc process

2021-07-05 Thread Victor Sudakov
Victor Sudakov wrote:
> 
> FreeBSD has a simple way to run some ad-hoc program with memory limits:
> 
> $ limits -m 2G ./mytest
>   memoryuse 2097152 kB
>   vmemoryuse   infinity kB
> $ limits -m 1G ./mytest
>   memoryuse 1048576 kB
>   vmemoryuse   infinity kB
> 
> How do I do the same in Linux (without root permissions)?

The short answer is /usr/bin/prlimit, it's the direct equivalent of
FreeBSD's /usr/bin/limits wrapper.

Thanks to all who replied especially Greg Wooledge!


-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Limit memory consumption of an ad hoc process

2021-07-05 Thread Victor Sudakov
Greg Wooledge wrote:
> On Mon, Jul 05, 2021 at 11:01:25PM -0400, The Wanderer wrote:
> > On 2021-07-05 at 22:42, Victor Sudakov wrote:
> > 
> > > Greg Wooledge wrote:
> > 
> > >> And in any case, when you test this stuff, use the subshells.  
> > > 
> > > Well, my goal is to find a way to limit programs run from cron, PHP's
> > > proc_open() etc., not from the interactive shell. What would you advise?
> > 
> > Is there any reason to think that the ulimit approach wouldn't work in
> > that type of context, as well as when invoked from within a shell?
> 
> Depends on how the cron job is set up.  If the cron job never calls
> bash (but rather, sh) then you can't use bash's ulimit.
> 
> Likewise, I would guess that PHP's proc_open() calls /bin/sh, not bash,
> but you'd have to ask a (more experienced) PHP user.

I suppose PHP's proc_open() does not call any shell at all, it executes
the binary directly. To execute command in a shell, there is
shell_exec() but it does not give access to the executed program's
stdin/stdout.

I think I can call the prlimit wrapper from proc_open() and that should do.

> 
> > > The equivalent of FreeBSD's `/usr/bin/limits` wrapper seems to be
> > > `/usr/bin/prlimit` but I'm really at a loss what limit to specify for
> > > testing (the equivalent of `ulimit -v`). Should be RLIMIT_AS but --as 
> > > crashes prlimit:
> > > 
> > > $ prlimit --as=1048576 /bin/ls
> > > /bin/ls: error while loading shared libraries: libselinux.so.1: failed to 
> > > map segment from shared object
> 
> Sounds like you set it too low.  Remember, setrlimit(2) and prlimit(2)
> say that RLIMIT_DATA is specified in bytes.  This is not the same as
> bash's ulimit.

I've never thought 1MB would be too low for /bin/ls, but it seems you are
right. Over 2MB required for a simple /bin/true!

$ prlimit --as=200 /bin/true
/bin/true: error while loading shared libraries: libc.so.6: failed to map 
segment from shared object
$ prlimit --as=250 /bin/true
$ 

But prlimit works mostly as expected:

$ prlimit --as=1073741824 stress-ng stress-ng --vm 1 --vm-bytes 2G
stress-ng: info:  [19042] defaulting to a 86400 second (1 day, 0.00 secs) run 
per stressor
stress-ng: info:  [19042] dispatching hogs: 1 vm
stress-ng: error: [19044] stress-ng-vm: gave up trying to mmap, no available 
memory
stress-ng: info:  [19042] successful run completed in 10.01s
$

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Limit memory consumption of an ad hoc process

2021-07-05 Thread Victor Sudakov
Greg Wooledge wrote:

[dd]

> > 
> > 
> > # ulimit -m 1048576 ; stress-ng --vm 1 --vm-bytes 8G
> > stress-ng: info:  [10961] defaulting to a 86400 second (1 day, 0.00 secs) 
> > run per stressor
> > stress-ng: info:  [10961] dispatching hogs: 1 vm
> > 
> > stress-ng is not killed. Swap is not enabled on this test host.
> 
> Perhaps -m is not the correct resource limit for what you're trying to
> achieve.  You've been assuming that it is, but I told you to read
> setrlimit(3) to see what each of them is and what it actually controls.
> 
> >From ulimit's output:
> 
> max memory size (kbytes, -m) unlimited
> 
> >From bash(1):
> 
>   -m The maximum resident set size (many systems do not  honor
>  this limit)
> 
> >From setrlimit(3):
> 
>RLIMIT_RSS
>   This is a limit (in bytes) on the process's  resident  set  (the
>   number of virtual pages resident in RAM).  This limit has effect
>   only in Linux 2.4.x, x < 30, and there  affects  only  calls  to
>   madvise(2) specifying MADV_WILLNEED.
> 
> Perhaps you want "ulimit -v" instead?

You are correct, `ulimit -v` works:

$ ulimit -v 1048576 ; stress-ng --vm 1 --vm-bytes 8G
stress-ng: info:  [11081] defaulting to a 86400 second (1 day, 0.00 secs) run 
per stressor
stress-ng: info:  [11081] dispatching hogs: 1 vm
stress-ng: error: [11083] stress-ng-vm: gave up trying to mmap, no available 
memory
stress-ng: info:  [11081] successful run completed in 10.01s
$ 

> 
> And in any case, when you test this stuff, use the subshells.  

Well, my goal is to find a way to limit programs run from cron, PHP's
proc_open() etc., not from the interactive shell. What would you advise?

The equivalent of FreeBSD's `/usr/bin/limits` wrapper seems to be
`/usr/bin/prlimit` but I'm really at a loss what limit to specify for
testing (the equivalent of `ulimit -v`). Should be RLIMIT_AS but --as 
crashes prlimit:

$ prlimit --as=1048576 /bin/ls
/bin/ls: error while loading shared libraries: libselinux.so.1: failed to map 
segment from shared object
$
$ prlimit --as=1048576 stress-ng
Segmentation fault
$

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Limit memory consumption of an ad hoc process

2021-07-05 Thread Victor Sudakov
Victor Sudakov wrote:
> > This assumes you're using bash as your shell.
> 
> I am, as you see above. I expect stress-ng to be killed when it tries to
> allocate 2G of memory but it's not happening. Can you reproduce your
> advice?

Even as root, there is no "Operation not permitted" message, but there
is no working limit either:


# ulimit -m 1048576 ; stress-ng --vm 1 --vm-bytes 8G
stress-ng: info:  [10961] defaulting to a 86400 second (1 day, 0.00 secs) run 
per stressor
stress-ng: info:  [10961] dispatching hogs: 1 vm

stress-ng is not killed. Swap is not enabled on this test host.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Limit memory consumption of an ad hoc process

2021-07-05 Thread Victor Sudakov
Greg Wooledge wrote:
> On Mon, Jul 05, 2021 at 10:15:19AM +0700, Victor Sudakov wrote:
> > FreeBSD has a simple way to run some ad-hoc program with memory limits:
> > 
> > $ limits -m 2G ./mytest
> >   memoryuse 2097152 kB
> >   vmemoryuse   infinity kB
> > $ limits -m 1G ./mytest
> >   memoryuse 1048576 kB
> >   vmemoryuse   infinity kB
> > 
> > How do I do the same in Linux (without root permissions)?
> 
> One way would be:
> 
> (ulimit -m 2097152; ./mytest)

Is the value in KB or MB? Seems KB. Anyway, the suggested method does not seem 
to work:

$ ulimit -m 640 ; stress-ng --vm 1 --vm-bytes 2G
-bash: ulimit: max memory size: cannot modify limit: Operation not permitted
stress-ng: info:  [10272] defaulting to a 86400 second (1 day, 0.00 secs) run 
per stressor
stress-ng: info:  [10272] dispatching hogs: 1 vm
^C

> 
> This assumes you're using bash as your shell.

I am, as you see above. I expect stress-ng to be killed when it tries to
allocate 2G of memory but it's not happening. Can you reproduce your
advice?

> 
> You never need root privileges to *reduce* one of your resource limits
> to a lower value.  Nor do you need root privs to raise your soft limit
> up to the hard limit.  However, you do need root privs to raise your
> hard limit.
> 

Then, why does it say "cannot modify limit: Operation not permitted" ?

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Limit memory consumption of an ad hoc process

2021-07-04 Thread Victor Sudakov
Dear Colleagues,

FreeBSD has a simple way to run some ad-hoc program with memory limits:

$ limits -m 2G ./mytest
  memoryuse 2097152 kB
  vmemoryuse   infinity kB
$ limits -m 1G ./mytest
  memoryuse 1048576 kB
  vmemoryuse   infinity kB

How do I do the same in Linux (without root permissions)?

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: bash completion and spaces

2021-04-26 Thread Victor Sudakov
davidson wrote:
> > 
> > I actually looked with `hd` and expected to see 0x20 there, but
> > somehow see none of it:
> > 
> > $ echo $COMP_WORDBREAKS | hd
> >   22 27 40 3e 3c 3d 3b 7c  26 28 3a 0a  |"'@><=;|&(:.|
> > 000c
> 
> Above I count 12 characters piped from echo to hd. The final character
> is a newline added by echo, so that leaves 11 characters attributable
> to the content of COMP_WORDBREAKS.
> 
> But try this, below. It will tell you the length (in characters) of
> the content of COMP_WORDBREAKS.
> 
>  $ echo ${#COMP_WORDBREAKS}
>  14
> 
> So, when you do...
> 
>  $ echo $COMP_WORDBREAKS | hd
>    22 27 40 3e 3c 3d 3b 7c  26 28 3a 0a  |"'@><=;|&(:.|
>  000c
> 
> ...what accounts for the three missing characters (namely SPACE, TAB,
> and NEWLINE)?
> 
> TLDR: The shell's "word splitting" removes them, because you have not
> double-quoted the variable.

Oh, I see. Thanks.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: bash completion and spaces

2021-04-25 Thread Victor Sudakov
David Wright wrote:

[dd]

> 
> > > I also don't understand what you mean by "dynamic", particularly as
> > > you wrote "A static (-W) completion" above. 
> > 
> > I actually meant that a simple example of static completion with spaces
> > (if someone cares to provide it) would help me understand the idea, and
> > I could use it in a dynamic completion later if I need to.
> > 
> > > You could always generate
> > > lists of aliases dynamically, too.
> > 
> > Well, I can make bash regenerate a completion list every time I
> > enter "app3", probably it can be done with aliases as well?
> 
> I think aliases can only work at the level of the entire command line,
> ie the aliases must have been defined by the time you start typing the
> line (which is why you can't define and use an alias in the same line).
> 
> OTOH bash completion completes at a character-to-character level AIUI,
> ie  always recalculates a fresh list (though you have to rubout
> one character and press  again to actually complete with it).

Yes, that's why I wanted to do it with completion, but now I don't feel
like investing too much time and effort into such a complicated thing.
Completion is supposed to save your time and effort, not consume it.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: bash completion and spaces

2021-04-25 Thread Victor Sudakov
davidson wrote:
> On Sat, 24 Apr 2021 Victor Sudakov wrote:
> > David Wright wrote:
> > > > > > 
> > > > > > I have an example app which can be run only as "app3 -h test1 -s
> > > > > > foo" or "app3 -h test2 -s bar". So I decided to provide it with
> > > > > > a small manual completion for convenience.
> > > > > > 
> > > > > > [vas@test2 ~]$ ./list.sh
> > > > > > -h test1 -s foo
> > > > > > -h test2 -s bar
> > > > > > [vas@test2 ~]$ complete -C ./list.sh app3
> > > > > > [vas@test2 ~]$
> > > > > > 
> > > > > > The result however is discouraging, the completion mechanism
> > > > > > won't add whole lines of parameters, it's trying to split on
> > > > > > spaces (here I press  several times:
> > > > > > 
> > > > > > [vas@test2 ~]$ app3 -h -h -h test
> > > > > > 
> > > > > > Can you please give a hint how to make it complete "app3" with 
> > > > > > either
> > > > > > "-h test1 -s foo" or "-h test2 -s bar" as a whole?
> 
> Almost entirely idle curiosity: the arguments test1/test2 and foo/bar
> which your app3 requires, are they arbitrary strings?  Or are they
> instead paths to files, or perhaps one of the other 20-odd categories
> recognised by the -A option for bash builtin "complete"?

"-h" are hosts to connect to, so I could probably get them completed as "-A 
hostname",
but the remaining arguments are arbitrary strings.

> 
> > > > > > I would not like to make all this too complicated, write complex
> > > > > > completion funcions if possible.
> 
> In the case you describe, you might find the behaviour of readline
> function "menu-complete" slightly more helpful than the readline
> function "complete" presently mapped to TAB (given that you find the
> behaviour of "complete" completely unhelpful, naturally enough).
> 
> See readline(3) for some documentation.
> 
> You could, say, map Shift-TAB to "menu-complete" in ~/.inputrc
> 
> (In emacs to get Shift-TAB to produce a literal Shift-TAB, you'll need
> to hit Ctrl-q first.)
> 
> I make this suggestion as a partial workaround/improvement to present
> situation. I doubt you'll find it an ideal solution.

I'm surprised to find out that it has become so complicated.

[dd]

> > 
> > BTW on my current Debian system I don't see the space character in 
> > $COMP_WORDBREAKS.
> 
> If you have xxd installed, what does xxd show you?

I actually looked with `hd` and expected to see 0x20 there, but
somehow see none of it:

$ echo $COMP_WORDBREAKS | hd 
  22 27 40 3e 3c 3d 3b 7c  26 28 3a 0a  |"'@><=;|&(:.|
000c


-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: bash completion and spaces

2021-04-23 Thread Victor Sudakov
David Wright wrote:
> > > > 
> > > > I have an example app which can be run only as "app3 -h test1 -s foo" or
> > > > "app3 -h test2 -s bar". So I decided to provide it with a small manual
> > > > completion for convenience.
> > > > 
> > > > [vas@test2 ~]$ ./list.sh 
> > > > -h test1 -s foo
> > > > -h test2 -s bar
> > > > [vas@test2 ~]$ complete -C ./list.sh app3
> > > > [vas@test2 ~]$
> > > > 
> > > > The result however is discouraging, the completion mechanism won't add
> > > > whole lines of parameters, it's trying to split on spaces (here I press
> > > >  several times:
> > > > 
> > > > [vas@test2 ~]$ app3 -h -h -h test
> > > > 
> > > > Can you please give a hint how to make it complete "app3" with either
> > > > "-h test1 -s foo" or "-h test2 -s bar" as a whole?
> > > > 
> > > > I would not like to make all this too complicated, write complex
> > > > completion funcions if possible. A static (-W) completion would be even
> > > > better.
> > > 
> > > Perhaps:
> > > 
> > > alias app3a='app3 -h test1 -s foo'
> > > alias app3b='app3 -h test2 -s bar'
> > 
> > No, not alias, I'd like to do it via bash completion. I may want to make
> > it dynamic eventually, the problem is in the spaces.
> 
> It's claimed that you can overcome this, in
> 
> https://stackoverflow.com/questions/11070370/bash-completion-for-strings-with-spaces-and-punctuation

Yes, this describes my case, unfortunately it lacks an example. Maybe
googling for COMP_WORDBREAKS will yield some examples. Thanks for the
link.

> 
> but I'd be balancing the possibility of side-effects with redefining Space
> against the benefits of completing a few strings.

If COMP_WORDBREAKS cannot be redefined within one and only one
completion, then perhaps the game is not worth the candle.

BTW on my current Debian system I don't see the space character in 
$COMP_WORDBREAKS.

> 
> I also don't understand what you mean by "dynamic", particularly as
> you wrote "A static (-W) completion" above. 

I actually meant that a simple example of static completion with spaces
(if someone cares to provide it) would help me understand the idea, and
I could use it in a dynamic completion later if I need to.

> You could always generate
> lists of aliases dynamically, too.

Well, I can make bash regenerate a completion list every time I
enter "app3", probably it can be done with aliases as well?

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: bash completion and spaces

2021-04-22 Thread Victor Sudakov
David Wright wrote:
> > 
> > I have an example app which can be run only as "app3 -h test1 -s foo" or
> > "app3 -h test2 -s bar". So I decided to provide it with a small manual
> > completion for convenience.
> > 
> > [vas@test2 ~]$ ./list.sh 
> > -h test1 -s foo
> > -h test2 -s bar
> > [vas@test2 ~]$ complete -C ./list.sh app3
> > [vas@test2 ~]$
> > 
> > The result however is discouraging, the completion mechanism won't add
> > whole lines of parameters, it's trying to split on spaces (here I press
> >  several times:
> > 
> > [vas@test2 ~]$ app3 -h -h -h test
> > 
> > Can you please give a hint how to make it complete "app3" with either
> > "-h test1 -s foo" or "-h test2 -s bar" as a whole?
> > 
> > I would not like to make all this too complicated, write complex
> > completion funcions if possible. A static (-W) completion would be even
> > better.
> 
> Perhaps:
> 
> alias app3a='app3 -h test1 -s foo'
> alias app3b='app3 -h test2 -s bar'

No, not alias, I'd like to do it via bash completion. I may want to make
it dynamic eventually, the problem is in the spaces.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


bash completion and spaces

2021-04-22 Thread Victor Sudakov
Dear Colleagues,

I have an example app which can be run only as "app3 -h test1 -s foo" or
"app3 -h test2 -s bar". So I decided to provide it with a small manual
completion for convenience.

[vas@test2 ~]$ ./list.sh 
-h test1 -s foo
-h test2 -s bar
[vas@test2 ~]$ complete -C ./list.sh app3
[vas@test2 ~]$

The result however is discouraging, the completion mechanism won't add
whole lines of parameters, it's trying to split on spaces (here I press
 several times:

[vas@test2 ~]$ app3 -h -h -h test

Can you please give a hint how to make it complete "app3" with either
"-h test1 -s foo" or "-h test2 -s bar" as a whole?

I would not like to make all this too complicated, write complex
completion funcions if possible. A static (-W) completion would be even
better.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: `apt list` output question

2021-03-29 Thread Victor Sudakov
IL Ka wrote:
> >
> >
> > What is the meaning of the "stable,now" string?
> 
> Here are two answers from the Debian developer
> https://unix.stackexchange.com/questions/408944/understanding-apt-list-output
> https://unix.stackexchange.com/questions/403177/what-is-the-format-of-the-apt-search-output-on-debian-ubuntu

Thank you for the links. It is strange however that this has to be
documented somewhere in stackexchange, not in any official
documentation.

> 
> 
> Btw, "apt" output is not stable nor well documented. It is recommended to
> use "apt-get" for the scripting purposes or, in your case, "dpkg --list" or
> "dpkg-query".

Oh no, my case is the purely interactive use of "apt". I have noticed
that this suffix can be used interactively:

# apt install yamllint/foobar
Reading package lists... Done
Building dependency tree   
Reading state information... Done
E: Release 'foobar' for 'yamllint' was not found

# apt install yamllint/buster
Reading package lists... Done
Building dependency tree   
Reading state information... Done
Selected version '1.15.0-1' (Debian:10.9/stable [all]) for 'yamllint'
...

I just don't quite understand how this can be put to good use.

But at least I know now what the "unknown" suffix means:
When you see unknown, that means the repository doesn’t have a "Suite"
entry in its Release file.

It's also confusing that the suffix shows "stable" while in fact I'm
tracking "buster" and have no intention to track "stable".
Indeed "apt-cache policy yamllint" shows 
"500 http://deb.debian.org/debian buster/main amd64 Packages", that is
"buster", not "stable" as in "apt list" output.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


`apt list` output question

2021-03-28 Thread Victor Sudakov
Dear Colleagues,

The output of `apt list` and some other utilities prints
package names with modifiers after the "/" symbol, e.g.

# apt list --installed | grep udev
libudev1/stable,now 241-7~deb10u7 amd64 [installed]
udev/stable,now 241-7~deb10u7 amd64 [installed]

I think that these modifiers can even change over time, at least after
an `apt upgrade`.

What is the meaning of the "stable,now" string? Sometimes there is the
"unknown" string too. At first I thought it was a reference to the repo
the package had been installed from, but no: I don't have anything like
"stable" or "now" in /etc/apt/sources.list*

This should be clearly documented somewhere but I cannot find it. Also,
can these modifiers be used for anything useful?

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Running a FreeBSD guest

2021-03-23 Thread Victor Sudakov
Dan Ritter wrote:
> > > > 
> > > > What's the minimum software kit to run a couple of FreeBSD guests
> > > > (serial console, no graphics needed) on a Debian 10 host?
> > > > 
> > > > I don't need any fancy management GUI like that of VirtualBox, would
> > > > just prefer some minimalistic hypervisor managed from the CLI. The
> > > > ability to access the host's raw disk devices from the guest would be a
> > > > great advantage.
> > > > 
> > > > Please don't just say "kvm" or any other single word but give a pointer
> > > > to a good step-by-step document.
> > > > 
> > > 
> > > I think qemu is fast and simple,
> > > 
> > > $ qemu-img create freebsd.img 4G
> > > 
> > > $ qemu-system-x86_64 -hda freebsd.img -cdrom
> > > FreeBSD-12.2-RELEASE-amd64-bootonly.iso -boot d -m 512
> > > 
> > > do the installation and then try boot it with
> > > 
> > > $ qemu-system-x86_64 -hda freebsd.img -m 512
> > 
> > Really, a nice thing. Thank you. A couple of questions if you please:
> > 
> > 1. Does qemu use hardware virtualization (VT-d, whatever is in the CPU)?
> 
> If qemu-kvm is installed, yes, that will be the default. qemu
> will fall back to emulation if a non-x86 guest is requested or
> the CPU of the host is incapable.

Do you think I can install qemu-kvm without installing the 230 X11
packages is requires?

> 
> 
> > 2. Can qemu present the NIC and drives to the guest paravirtualized?
> > FreeBSD understands VirtIO Block Adapter, VirtIO Ethernet and VMware
> > VMXNET3 and some other paravirtualized devices.
> 
> Yes.

That's great.

> 
> Most other tools for virtualization on Linux are built on top of
> qemu/kvm, largely to expose features that qemu already has but
> can required very long command lines, or to do management of
> multiple VMs. The libvirtd infrastructure is probably the
> simplest such management system. Although there is an X11 GUI
> included with it, the command line tools can do everything.
> 
> Here's a typical non-libvirtd qemu/kvm invocation:
> 
> cd /var/spool/kvm
> export VNAME=virtualmachinename
> export CPUS=2
> export RAM=4096
> export MAC=00:15:f1:c1:a2:01
> export VNC=:1
> export IMAGE=/var/spool/kvm/images/$VNAME.img
> 
> kvm -m $RAM -smp $CPUS -name $VNAME -rtc base=utc -boot menu=on -drive 
> file=$IMAGE,if=none,id=drive-virtio-disk0,boot=on,cache=writeback -device 
> virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 
> -device virtio-net-pci,vlan=0,id=net0,mac=$MAC,bus=pci.0,addr=0x3 -net
> tap -usbdevice tablet -vnc $VNC &

The "kvm" run in the line above is just a wrapper script that runs "qemu 
-enable-kvm", isn't it?


-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Running a FreeBSD guest

2021-03-23 Thread Victor Sudakov
didier gaumet wrote:
> Le 23/03/2021 à 10:54, Victor Sudakov a écrit :
> 
> > 1. Does qemu use hardware virtualization (VT-d, whatever is in the CPU)?
> 
> Yes, I think that basically, KVM requires it (and that Qemu does not)

The relation between qemu and kvm confuses me. "apt install qemu-kvm" is
trying to install a ton of X11 packages including Mesa drivers etc, I
would not really want that. And "apt install kvm" does not find such a
package.

> 
> > 2. Can qemu present the NIC and drives to the guest paravirtualized?
> > FreeBSD understands VirtIO Block Adapter, VirtIO Ethernet and VMware
> > VMXNET3 and some other paravirtualized devices.
> 
> there is an introduction to Virtio in kvm:
> https://www.linux-kvm.org/page/Virtio

This is also confusing, as the document is written about kvm but cites
qemu as an example.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Running a FreeBSD guest

2021-03-23 Thread Victor Sudakov
didier gaumet wrote:
> Le 23/03/2021 à 11:06, Victor Sudakov a écrit :
> 
> > My usecase would be, among other things, to access external media
> > attached to the host from inside the guest, e.g. those partitioned and
> > encrypted in FreeBSD-specific ways (geli encryption, gbde etc).
> 
> this link, albeit a little old should be of interest, concerning this
> scenario managed by kvm:
>  https://www.linux-kvm.org/page/USB_Host_Device_Assigned_to_Guest

Not as hardcore as USB passthrough, but
qemu -drive file=/dev/sdb 
should do the trick if I understand correctly.

> 
> [...]
> > In your opinion, what's the best,
> > simplest and most convenient CLI management tool around kvm?
> 
> Sorry, I use VirtManager (GUI) so I do not know but the kvm website has a
> list of management tools:
>  https://www.linux-kvm.org/page/Management_Tools
> 
> 

Thank you!

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Running a FreeBSD guest

2021-03-23 Thread Victor Sudakov
didier gaumet wrote:
> > 
> > What's the minimum software kit to run a couple of FreeBSD guests
> > (serial console, no graphics needed) on a Debian 10 host?
> > 
> > I don't need any fancy management GUI like that of VirtualBox, would
> > just prefer some minimalistic hypervisor managed from the CLI. The
> > ability to access the host's raw disk devices from the guest would be a
> > great advantage.
> 
> - if your last sentance is correctly enounced, I do not understand your
> usecase 

My usecase would be, among other things, to access external media
attached to the host from inside the guest, e.g. those partitioned and
encrypted in FreeBSD-specific ways (geli encryption, gbde etc).

> nor did I know that it is possible

It is quite possible in bhyve (FreeBSD's hypervisor). You just tell the
hypervisor that this guest's disk is not a file but a device in /dev/.

> 
> > Please don't just say "kvm" or any other single word but give a pointer
> > to a good step-by-step document.
> 
> This one will probably do:
>  https://wiki.debian.org/SystemVirtualization
> (particularly the 3rd chapter "System Virtualization" if I understand your
> usecase)

This is a comprehensive document. In your opinion, what's the best,
simplest and most convenient CLI management tool around kvm?

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Running a FreeBSD guest

2021-03-23 Thread Victor Sudakov
Robbi Nespu wrote:
> On 3/23/21 10:20 AM, Victor Sudakov wrote:
> > Dear Colleagues,
> > 
> > What's the minimum software kit to run a couple of FreeBSD guests
> > (serial console, no graphics needed) on a Debian 10 host?
> > 
> > I don't need any fancy management GUI like that of VirtualBox, would
> > just prefer some minimalistic hypervisor managed from the CLI. The
> > ability to access the host's raw disk devices from the guest would be a
> > great advantage.
> > 
> > Please don't just say "kvm" or any other single word but give a pointer
> > to a good step-by-step document.
> > 
> 
> I think qemu is fast and simple,
> 
> $ qemu-img create freebsd.img 4G
> 
> $ qemu-system-x86_64 -hda freebsd.img -cdrom
> FreeBSD-12.2-RELEASE-amd64-bootonly.iso -boot d -m 512
> 
> do the installation and then try boot it with
> 
> $ qemu-system-x86_64 -hda freebsd.img -m 512

Really, a nice thing. Thank you. A couple of questions if you please:

1. Does qemu use hardware virtualization (VT-d, whatever is in the CPU)?

2. Can qemu present the NIC and drives to the guest paravirtualized?
FreeBSD understands VirtIO Block Adapter, VirtIO Ethernet and VMware
VMXNET3 and some other paravirtualized devices.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Running a FreeBSD guest

2021-03-22 Thread Victor Sudakov
Dear Colleagues,

What's the minimum software kit to run a couple of FreeBSD guests
(serial console, no graphics needed) on a Debian 10 host?

I don't need any fancy management GUI like that of VirtualBox, would
just prefer some minimalistic hypervisor managed from the CLI. The
ability to access the host's raw disk devices from the guest would be a
great advantage.

Please don't just say "kvm" or any other single word but give a pointer
to a good step-by-step document.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Markdown previewer

2021-03-17 Thread Victor Sudakov
Celejar wrote:
> 
> This is pretty much what I use - I have the following snippet
> in .config/mc/mc.ext :
> 
> # Markdown
> shell/i/.md
> View=pandoc %f | lynx -stdin
> 
> Not quite a GUI, but close ;)
> 

Thanks, that is a good idea for mutt's mailcap:

text/markdown; pandoc %s | lynx -stdin -assume_local_charset=UTF-8

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Markdown previewer

2021-03-17 Thread Victor Sudakov
Tom Browder wrote:
> On Wed, Mar 17, 2021 at 05:56 Victor Sudakov  wrote:
> ...
> 
> > I have an account on Github, but nothing beats clicking a document in
> > Thunar or Thunderbird to open it for viewing. You don't even have to be
> > online for that.
> 
> 
> Great for your usage, Victor, but for my common workflow,  I write Markdown
> for Raku modules and other code on my local Debian server accessed via an
> xterm on my iPad, so Github functions as my Linux monitor!

There are very exotic use cases indeed.

> 
> 
> 
> P.S. Do you know the excellent Perl developer and astronomer Sergey
> Krushinsky?

No, I don't have the honour.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Markdown previewer

2021-03-17 Thread Victor Sudakov
to...@tuxteam.de wrote:
> On Wed, Mar 17, 2021 at 05:21:49PM +0700, Victor Sudakov wrote:
> 
> [...]
> 
> > I could write a script which would convert Markdown documents to HTML
> > and then call Firefox on the result, but I'm surprised there is no MD
> > viewer like xdvi or qpdfview.
> 
> This may be due to the fact that, if you look closely, Markdown is
> a monster.
> 
> There are many variants, a significant subset of them allows a varying
> subset of HTML (which one?) as an extension, and quite a few are just
> specified by some single implementation.
> 
> It is one of those extremely interesting cases where a clear strength
> (simplicity, under-specification: thus I can hack something together
> over a weekend in Perl; since I'm rendering to HTML anyway, if table
> support isn't enough... well, duh, I can pass-through tables and so
> on) can turn around.
> 
> Note that I am *not* judging. This simplicity and underspecification
> *is a strength* (I /love/ Org Mode), but it is also a weakness. You
> seem to be running into the latter :-)
> 
> Have a look at [1]. Does it remind you of [2]?

I'm actually surprised by the recent proliferation of similar markup
languages.  Was it Wikipedia who started the trend?

OTOH, when I was younger, I encountered troff and DocBook and Texinfo
and of course LaTeX and lout (do you remember lout?). So there have
probably always been many of them.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Markdown previewer

2021-03-17 Thread Victor Sudakov
riveravaldez wrote:
> On ..., Victor Sudakov  wrote:
> > Dear Colleagues,
> >
> > Can you please advise a good GUI Markdown previewer?

[dd]
> 
> Доброе утро, товарищ Виктор! ;)
> 
> If I recall correctly, Ghostwriter is designed towards writing/editing 
> markdown
> text with a real-time almost-identical rendering preview, 

Привет, коллега!

Ghostwriter понравился, спасибо! 

Ghostwriter looks nice, especially when "Pandoc Github-flavored
Markdown" is selected. Thanks for the hint.

> 
> Добрые пожелания из Аргентины!
> От фаната Гены и Юрия Норштейнов. ;)
> 

Великий режиссер!

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Markdown previewer

2021-03-17 Thread Victor Sudakov
Tom Browder wrote:
> On Wed, Mar 17, 2021 at 01:31 Victor Sudakov  wrote:
> > Can you please advise a good GUI Markdown previewer?
> 
> 
> A cheap and very useful way to do so is to establish a free account on
> Github, create a repository for your work, and start creating Markdown in a
> browser.

Hello Tom,

I have an account on Github, but nothing beats clicking a document in
Thunar or Thunderbird to open it for viewing. You don't even have to be
online for that.

> 
> Fork the repository onto your computer, create or modify Markdown files,
> commit them and push them to Github, and view them in a browser.

If I have to view them in a browser, I'd rather use pandoc with a
wrapper script. This can be done quickly without pushing code to Github.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Markdown previewer

2021-03-17 Thread Victor Sudakov
Weaver wrote:
> >> Can you please advise a good GUI Markdown previewer?
> >>
> >> Many editors (vim, mousepad) can highlight Markdown syntax, but it's a
> >> different matter. I'd like the previewer to display rendered Markdown
> >> nicely with fonts, hyperlinks, numbered lists etc.
> >>
> > VSCodium (https://vscodium.com) can do a good job of this, and is a
> > popular all-purpose IDE. Simply open the Markdown file and press Ctrl+K,
> > V to get a live side-by-side preview.
> > 
> > If you want something command-line based, then you need to convert the
> > Markdown code to code that some other renderer will understand. Pandoc
> > (https://packages.debian.org/buster/pandoc) can do that for you with a
> > simple "pandoc -o README.html README.md" or "pandoc -o README.pdf
> > README.md" etc.
> 
> Or, at the other end of the spectrum, you might like to try out Typora.
> Cheers!

Looks nice, thank you. I did not quite understand however, is it a
commercial software, non-free?

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Markdown previewer

2021-03-17 Thread Victor Sudakov
billium wrote:
> > On 17/03/2021 06:30, Victor Sudakov wrote:
> > > Can you please advise a good GUI Markdown previewer?
> > 
> > 
> 
> If you are on KDE there is ReText.
> 

This one looks good.

However, in rendered mode, lines with code are indistinguishable from
regular text (I expected a monospace font to be used for code, or
something like this).

Do you have this problem?

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Markdown previewer

2021-03-17 Thread Victor Sudakov
Darac Marjal wrote:
> 
> >
> > Can you please advise a good GUI Markdown previewer?
> >
> > Many editors (vim, mousepad) can highlight Markdown syntax, but it's a
> > different matter. I'd like the previewer to display rendered Markdown
> > nicely with fonts, hyperlinks, numbered lists etc.
> >
> VSCodium (https://vscodium.com) can do a good job of this, and is a
> popular all-purpose IDE. Simply open the Markdown file and press Ctrl+K,
> V to get a live side-by-side preview.

Oh now, installing a whole IDE to view Markdown files is an overkill.

> 
> If you want something command-line based, then you need to convert the
> Markdown code to code that some other renderer will understand. Pandoc
> (https://packages.debian.org/buster/pandoc) can do that for you with a
> simple "pandoc -o README.html README.md" or "pandoc -o README.pdf
> README.md" etc.
> 

Thank you for the hint about pandoc, but I would actually like some
lightweight GUI viewer I could associate with the .md extention and view
Markdown files from Thunar.

I could write a script which would convert Markdown documents to HTML
and then call Firefox on the result, but I'm surprised there is no MD
viewer like xdvi or qpdfview.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Markdown previewer

2021-03-16 Thread Victor Sudakov
Dear Colleagues,

Can you please advise a good GUI Markdown previewer?

Many editors (vim, mousepad) can highlight Markdown syntax, but it's a
different matter. I'd like the previewer to display rendered Markdown
nicely with fonts, hyperlinks, numbered lists etc.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: How to make btrfs forget a disk?

2021-03-15 Thread Victor Sudakov
Victor Sudakov wrote:
> 
> btrfs thinks that /dev/nvme1n1 has a btrfs:
> 
> # btrfs filesystem show
> Label: none  uuid: 3414ae53-f3d4-43ea-bb88-ffefc9bc86f6
> Total devices 1 FS bytes used 1.05TiB
> devid1 size 2.00TiB used 1.33TiB path /dev/nvme0n1
> 
> Label: none  uuid: 38f74bc8-465d-4866-8ec1-3a144741012c
> Total devices 1 FS bytes used 831.16GiB
> devid1 size 3.00TiB used 1.48TiB path /dev/nvme1n1
> 
> The problem is that /dev/nvme1n1 is being used for ZFS now, and there is
> currently no btrfs thereon. However, there is a btrfs label or something
> stuck somewhere, how can I clear it?
> 
> I tried to unload/load the btrfs kernel module but it did not help. 
> It's somewhere on disk, but where?

Found some hints and recipes in
https://btrfs.wiki.kernel.org/index.php/Problem_FAQ#How_to_clean_up_old_superblock_.3F
So the culprit probably *was* the btrfs superblock. Deloptes you were
right.

It's interesting however that "zpool create" created a GPT (which I did
not want), but did not erase a superblock from a previous filesystem.

A lesson? Always dd the first several MB of a disk with zeroes when
changing partitioning schemes, whole disk filesystems etc.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: How to make btrfs forget a disk?

2021-03-14 Thread Victor Sudakov
Andrei POPESCU wrote:
> On Du, 14 mar 21, 17:34:40, Victor Sudakov wrote:
> > Andrei POPESCU wrote:
> > > 
> > > I'm guessing it's in the GPT somewhere. Did you try removing the entire 
> > > partition table before switching to ZFS?
> > 
> > There had been no partition table, I just ran "mkfs.btrfs /dev/nvme1n1"
> > on the whole raw volume, and then mounted /dev/nvme1n1.
> > 
> > Later, when switching to ZFS, I ran "zpool create fastdrive /dev/nvme1n1" 
> > again on the whole volume. But ZFS outsmarted me and created a GPT
> > though I had not asked it to.
>  
> Your blkid output suggests the GPT was created by btrfs ;)

Maybe btrfs does create it under some circumstances, but I cannot
reproduce it now:


root@test2-vas:~# blkid /dev/xvdg
root@test2-vas:~# mkfs.btrfs /dev/xvdg
btrfs-progs v4.20.1 
See http://btrfs.wiki.kernel.org for more information.

Detected a SSD, turning off metadata duplication.  Mkfs with -m dup if you want 
to force metadata duplication.
Label:  (null)
UUID:   7d64c5ab-ae59-4e8d-aa6a-a86d7702f029
Node size:  16384
Sector size:4096
Filesystem size:100.00GiB
Block group profiles:
  Data: single8.00MiB
  Metadata: single8.00MiB
  System:   single4.00MiB
SSD detected:   yes
Incompat features:  extref, skinny-metadata
Number of devices:  1
Devices:
   IDSIZE  PATH
1   100.00GiB  /dev/xvdg

root@test2-vas:~# 
root@test2-vas:~# blkid /dev/xvdg
/dev/xvdg: UUID="7d64c5ab-ae59-4e8d-aa6a-a86d7702f029" 
UUID_SUB="f0868f63-b40d-413a-ba76-6837b67b8ecf" TYPE="btrfs"
root@test2-vas:~# 
root@test2-vas:~# fdisk !$
fdisk /dev/xvdg

Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

The old btrfs signature will be removed by a write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x43734e7e.

Command (m for help): 

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: How to make btrfs forget a disk?

2021-03-14 Thread Victor Sudakov
Andrei POPESCU wrote:
> > > > 
> > > > The problem is that /dev/nvme1n1 is being used for ZFS now, and there is
> > > > currently no btrfs thereon. However, there is a btrfs label or something
> > > > stuck somewhere, how can I clear it?
> > >  
> > > [...]
> > > 
> > > > It's somewhere on disk, but where?
> > > > 
> > > > # blkid | grep nvme1n1
> > > > /dev/nvme1n1: UUID="38f74bc8-465d-4866-8ec1-3a144741012c" 
> > > > UUID_SUB="ada72e33-4467-4413-b78a-1a2392f62e62" TYPE="btrfs" 
> > > > PTUUID="d73a33f2-2b34-e64b-bc66-128320256a28" PTTYPE="gpt"
> > > 
> > > Look again ;)
> > 
> > Beats me!
> > 
> > In what disk structure can this signature of type "btrfs" reside?
> > The name "nvme1n1" is for the whole disk even, not for a partition thereof.
> 
> I'm guessing it's in the GPT somewhere. Did you try removing the entire 
> partition table before switching to ZFS?

There had been no partition table, I just ran "mkfs.btrfs /dev/nvme1n1"
on the whole raw volume, and then mounted /dev/nvme1n1.

Later, when switching to ZFS, I ran "zpool create fastdrive /dev/nvme1n1" 
again on the whole volume. But ZFS outsmarted me and created a GPT
though I had not asked it to.

The FreeBSD variety of ZFS does not do that, but Solaris AFAIR does
like Linux.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: How to make btrfs forget a disk?

2021-03-13 Thread Victor Sudakov
Andrei POPESCU wrote:
> On Vi, 12 mar 21, 09:21:59, Victor Sudakov wrote:
> > 
> > The problem is that /dev/nvme1n1 is being used for ZFS now, and there is
> > currently no btrfs thereon. However, there is a btrfs label or something
> > stuck somewhere, how can I clear it?
>  
> [...]
> 
> > It's somewhere on disk, but where?
> > 
> > # blkid | grep nvme1n1
> > /dev/nvme1n1: UUID="38f74bc8-465d-4866-8ec1-3a144741012c" 
> > UUID_SUB="ada72e33-4467-4413-b78a-1a2392f62e62" TYPE="btrfs" 
> > PTUUID="d73a33f2-2b34-e64b-bc66-128320256a28" PTTYPE="gpt"
> 
> Look again ;)

Beats me!

In what disk structure can this signature of type "btrfs" reside?
The name "nvme1n1" is for the whole disk even, not for a partition thereof.

For example, and for contrast,

/dev/nvme2n1p1: UUID="97fdc843-346f-4f34-a903-c99b22a96050" TYPE="ext4" 
PARTUUID="1afa8103-4463-1048-9159-7233ce337f3f"

makes perfect sense, it's a GPT partition of the "Linux filesystem" type.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: How to make btrfs forget a disk?

2021-03-12 Thread Victor Sudakov
David wrote:
> 
> > > and then perhaps
> > >   btrfs device remove ...
> 
> > "Remove device(s) from a filesystem identified by "
> 
> > Hmm. /dev/nvme1n1 is not identified by any path because it's not mounted
> > as a btrfs filesystem.
> 
> Yeah I expect you're supposed to 'btrfs remove' before
> replacing the filesystem with something different.
> 

I dunno. I guess "btrfs device remove" is used to detach a device from
under an operational filesystem, much like "zpool remove".

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: How to make btrfs forget a disk?

2021-03-12 Thread Victor Sudakov
David wrote:
> On Fri, 12 Mar 2021 at 20:17, Victor Sudakov  wrote:
> > deloptes wrote:
> 
> > > > "wipefs -t btrfs -f -a /dev/nvme1n1" did the job.
> 
> > > > Still wondering where those labels are stored on disk in Linux.
> 
> > > FS Superblock?
> 
> > Well, the FS (btrfs in this case) was not there already, but the magic
> > label was still there somewhere.
> 
> My new knowledge after 5 seconds of searching, ...
> 
> https://en.wikipedia.org/wiki/Btrfs#Superblock
> says that there are multiple copies of the superblock.

Many filesystems have multiple copies of the superblock (e.g. UFS and ext*).

What surprised and worried me is the fact that they persisted after the
disk was converted to ZFS, and btrfs continued to recognize this
filesystem as its own (albeit unmounted).

> 
> And the on-disk format is here:
>   https://btrfs.wiki.kernel.org/index.php/On-disk_Format

> 
> And maybe if the drive was once part of a multiple
> device filesystem it might be referenced in superblocks
> on other devices.
> 

No, it was not.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: How to make btrfs forget a disk?

2021-03-12 Thread Victor Sudakov
Anssi Saari wrote:
> Victor Sudakov  writes:
> 
> > "wipefs -t btrfs -f -a /dev/nvme1n1" did the job.
> >
> > Still wondering where those labels are stored on disk in Linux.
> 
> Didn't wipefs tell you? 

No. It just told me the offset, but I have no idea what is located at
that offset, and this can be important.

> I don't have any btrfs but for me wipefs prints
> at which offset it found which label. Like this, for a Linux swap
> partition:
> 
> # wipefs /dev/sdb5
> DEVICE OFFSET TYPE UUID LABEL
> sdb5   0xff6  swap 8af9fb67-38ca-4c91-bbbd-d53c5ac1f30a 
> 
> And if I hexdump a bit of /dev/sdb5 I get:
> 
> 000ff0 00 00 00 00 00 00 53 57 41 50 53 50 41 43 45 32  >..SWAPSPACE2<
> 001000 01 00 00 00 8a f9 fb 67 38 ca 4c 91 bb bd d5 3c  >.ùûg8ÊL.»½Õ<<
> 001010 5a c1 f3 0a 00 00 15 00 80 00 ff ff ff ff 03 00  >ZÁó.....<
> 001020 00 00 01 00 00 00 00 00 00 00 3d b5 04 00 00 00  >..=µ<
> 

So what is that at 0xff6? GPT, MBR, some superblock, some reserved sector?

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: How to make btrfs forget a disk?

2021-03-12 Thread Victor Sudakov
deloptes wrote:
> 
> > "wipefs -t btrfs -f -a /dev/nvme1n1" did the job.
> > 
> > Still wondering where those labels are stored on disk in Linux.
> > 
> 
> FS Superblock? 

Well, the FS (btrfs in this case) was not there already, but the magic
label was still there somewhere.

> 
> > In FreeBSD, GEOM(4) usually keeps such stuff in the last sector of a
> > volume/device.
> 
> I think it depends on the FS not on the OS.

As I said, the FS had already been replaced by another FS. 

I would usually wipe the first several MB of a disk with dd when I
change filesystems or disk partitioning schemes, but this
one was already in production.

> 
> if search engines are not working where you live, I think this is a good
> howto (just found it among the top 10hits in duckduckgo)
> 
> https://www.cyberciti.biz/faq/howto-use-wipefs-to-wipe-a-signature-from-disk-on-linux/
> 

Well, to search Duckduckgo for wipefs, you need to know about wipefs :-)
I found it from reading man blkid and lsblk, after that the information
from wipefs(8) turned out sufficient (and the howto above did not add
any new knowledge).

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: How to make btrfs forget a disk?

2021-03-11 Thread Victor Sudakov
Victor Sudakov wrote:
> > On Fri, 12 Mar 2021 at 13:39, Victor Sudakov  wrote:
> > 
> > > btrfs thinks that /dev/nvme1n1 has a btrfs:
> > 
> > > # btrfs filesystem show
> > > Label: none  uuid: 3414ae53-f3d4-43ea-bb88-ffefc9bc86f6
> > > Total devices 1 FS bytes used 1.05TiB
> > > devid1 size 2.00TiB used 1.33TiB path /dev/nvme0n1
> > >
> > > Label: none  uuid: 38f74bc8-465d-4866-8ec1-3a144741012c
> > > Total devices 1 FS bytes used 831.16GiB
> > > devid1 size 3.00TiB used 1.48TiB path /dev/nvme1n1
> > >
> > > The problem is that /dev/nvme1n1 is being used for ZFS now, and there is
> > > currently no btrfs thereon. However, there is a btrfs label or something
> > > stuck somewhere, how can I clear it?
> > 
> > Hi,
> > 
> > I do not know the answer because I have never done that,
> > but try reading
> >   man 8 btrfs-device
> > 
> > and then perhaps
> >   btrfs device remove ...
> > 
> 
> "Remove device(s) from a filesystem identified by "
> 
> Hmm. /dev/nvme1n1 is not identified by any path because it's not mounted
> as a btrfs filesystem.

"wipefs -t btrfs -f -a /dev/nvme1n1" did the job.

Still wondering where those labels are stored on disk in Linux.

In FreeBSD, GEOM(4) usually keeps such stuff in the last sector of a
volume/device.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: How to make btrfs forget a disk?

2021-03-11 Thread Victor Sudakov
David wrote:
> On Fri, 12 Mar 2021 at 13:39, Victor Sudakov  wrote:
> 
> > btrfs thinks that /dev/nvme1n1 has a btrfs:
> 
> > # btrfs filesystem show
> > Label: none  uuid: 3414ae53-f3d4-43ea-bb88-ffefc9bc86f6
> > Total devices 1 FS bytes used 1.05TiB
> > devid1 size 2.00TiB used 1.33TiB path /dev/nvme0n1
> >
> > Label: none  uuid: 38f74bc8-465d-4866-8ec1-3a144741012c
> > Total devices 1 FS bytes used 831.16GiB
> > devid1 size 3.00TiB used 1.48TiB path /dev/nvme1n1
> >
> > The problem is that /dev/nvme1n1 is being used for ZFS now, and there is
> > currently no btrfs thereon. However, there is a btrfs label or something
> > stuck somewhere, how can I clear it?
> 
> Hi,
> 
> I do not know the answer because I have never done that,
> but try reading
>   man 8 btrfs-device
> 
> and then perhaps
>   btrfs device remove ...
> 

"Remove device(s) from a filesystem identified by "

Hmm. /dev/nvme1n1 is not identified by any path because it's not mounted
as a btrfs filesystem.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


How to make btrfs forget a disk?

2021-03-11 Thread Victor Sudakov
Dear Colleagues,

btrfs thinks that /dev/nvme1n1 has a btrfs:

# btrfs filesystem show
Label: none  uuid: 3414ae53-f3d4-43ea-bb88-ffefc9bc86f6
Total devices 1 FS bytes used 1.05TiB
devid1 size 2.00TiB used 1.33TiB path /dev/nvme0n1

Label: none  uuid: 38f74bc8-465d-4866-8ec1-3a144741012c
Total devices 1 FS bytes used 831.16GiB
devid1 size 3.00TiB used 1.48TiB path /dev/nvme1n1

The problem is that /dev/nvme1n1 is being used for ZFS now, and there is
currently no btrfs thereon. However, there is a btrfs label or something
stuck somewhere, how can I clear it?

I tried to unload/load the btrfs kernel module but it did not help. 
It's somewhere on disk, but where?

# blkid | grep nvme1n1
/dev/nvme1n1: UUID="38f74bc8-465d-4866-8ec1-3a144741012c" 
UUID_SUB="ada72e33-4467-4413-b78a-1a2392f62e62" TYPE="btrfs" 
PTUUID="d73a33f2-2b34-e64b-bc66-128320256a28" PTTYPE="gpt"
/dev/nvme1n1p1: LABEL="fastdrive" UUID="9760009171611183151" 
UUID_SUB="5246836986761113023" TYPE="zfs_member" 
PARTLABEL="zfs-04c563a98b6424bd" PARTUUID="ca163a7a-0150-714c-8e5f-375f57a8df2c"
/dev/nvme1n1p9: PARTUUID="bbc56956-5581-b449-a114-0ece0378a4c9

# Disk /dev/nvme1n1: 3 TiB, 3298534883328 bytes, 6442450944 sectors
Disk model: Amazon Elastic Block Store  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D73A33F2-2B34-E64B-BC66-128320256A28

Device  StartEndSectors Size Type
/dev/nvme1n1p1   2048 6442432511 6442430464   3T Solaris /usr & Apple ZFS
/dev/nvme1n1p9 6442432512 6442448895  16384   8M Solaris reserved 1

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet


signature.asc
Description: PGP signature


Re: Proprietary drivers management

2020-12-08 Thread Victor Sudakov
didier gaumet wrote:
> Le mardi 8 décembre 2020 à 09:40:06 UTC+1, Victor Sudakov a écrit :
> [...]
> > Do you mean that if I install the metapackage: 
> > `apt install nvidia-driver-390` 
> > this should be sufficient? No GUI tweaking?
> 
> Following the Ubuntu wiki instructions would probably be the best solution:
>  https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia

A very useful link, thank you. 

"sudo ubuntu-drivers", fancy that.

> 
> As others have said, Ubuntu is based upon Debian but there are differences 
> (like, say, GhostBSD or DragonFly BSD versus FreeBSD)
> 

Indeed.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Proprietary drivers management

2020-12-08 Thread Victor Sudakov
Georgi Naplatanov wrote:
> On 12/8/20 4:47 AM, Victor Sudakov wrote:
> > 
> > 3. What is a "driver" after all in Linux terms? A kernel module, an
> > Xserver loadable module? How do you "install a driver"? (in FreeBSD you
> > either enable/load a kernel module, or make something like
> > xorg/modules/drivers/intel_drv.so available to the Xserver).
> > 
> 
> 
> drivers can be:
> 
>  - kernel space only - Network Interface Card (NIC) for example, USB,
> SATA controllers, etc.

They come in the form of *.ko files under /lib/modules/`uname 
-r`/kernel/drivers/,
correct?

>  - kernel space + user space drivers - video drivers

These user space video drivers probably come as *.so modules for the
Xserver, like in FreeBSD?

>  - user space only drivers - printers, scanners, etc.

These are not very interesting (like ghostscript printer "drivers" etc).
> 
> 
> > How do you "install a driver"?
> 
> It depends how particular driver is packaged what kind it is. If the
> driver is included in Linux kernel then you don't have to do anything.

Are there .deb packages (other than linux-image-*.deb itself ) which
install kernel drivers?


-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Proprietary drivers management

2020-12-08 Thread Victor Sudakov
Dan Ritter wrote:
> Victor Sudakov wrote: 
> > Hope it's OK to ask an Ubuntu-related question here, after all
> > Ubuntu is Debian architecturally, isn't it?
> 
> Mostly, but Ubuntu changes whatever parts they like. Answers we
> give are not dependable for Ubuntu, unless someone specifically
> says "I also know this is true for Ubuntu".
> 
> > 3. What is a "driver" after all in Linux terms? A kernel module, an
> > Xserver loadable module? How do you "install a driver"? (in FreeBSD you
> > either enable/load a kernel module, or make something like
> > xorg/modules/drivers/intel_drv.so available to the Xserver).
> 
> For an X11 graphics thing, it's often a combination of:
> 
> - kernel mode setting support module (.deb)
> - firmware blob .deb
> - xserver-org-video-HARDWARE.deb
> - GLX lib backend (.deb)
> - special libs and helper utils

I see. In FreeBSD they just put all the stuff into one package, like 
/usr/ports/x11/nvidia-driver-390/ containing everything from kernel
modules to helper utils.

> 
> 
> nvidia-driver/stable 418.152.00-1 amd64
>   NVIDIA metapackage

Do you mean that if I install the metapackage:
`apt install nvidia-driver-390`
this should be sufficient? No GUI tweaking?

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Proprietary drivers management

2020-12-07 Thread Victor Sudakov
Dear Colleagues,

Hope it's OK to ask an Ubuntu-related question here, after all
Ubuntu is Debian architecturally, isn't it?

So there is a GUI widget to manage proprietary drivers:
http://admin.sibptus.ru/~vas/nvidia.jpg

1. Do you think the widget is a separate mechanism from the common
deb/repository infrastructure, or does it rely on the same deb packages? 

2. Is there a way to make this selection from the OS shell, not from the GUI?

3. What is a "driver" after all in Linux terms? A kernel module, an
Xserver loadable module? How do you "install a driver"? (in FreeBSD you
either enable/load a kernel module, or make something like
xorg/modules/drivers/intel_drv.so available to the Xserver).

4. It is remarkable that this GUI widget does not actually permit any choice,
it just says in Russian "Continue using the manually installed driver."
Manually installed? I don't remember installing any drivers manually in
this system, even if I knew what a "driver" in Linux terminology is.

Thank you for your patience, any input is welcome.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Building my own packages

2020-11-10 Thread Victor Sudakov
deloptes wrote:
> 
> > The problem is I don't need a ton of information :-) I need to hear from
> > someone who has already done that for themselves: "I use such and such
> > tools, and publish my repo this way..."
> 
> Well, I use debuild to build and reprepro to maintain a local repository of
> former KDE3 now called TDE.

I've already tried reprepro and it seems to do its job well in publishing
the packages I feed to it. Now it's building time.

> I do not build automatically but from time to time I pull changes and build
> the packages. Because there are dependencies it depends which package
> changes this affects other packages. For that reason I created a Makefile
> (actually few of them that complement each other).
> You have to rebuild all dependencies if you rebuild one package. You simply
> can not just build and replace a package in production environment without
> testing it, making a backup or whatever.

There lies the point which I don't completely understand yet. If I want
to build a php or exim4 package with my own build options, to what
extent should I also build their dependencies? And how do I name those
packages so that they coexist with the default Debian ones?

OTOH, sometimes I would want my package (e.g. tcpdump with my patch) to
override Debian's one.

> I guess the answer to your question is that there is no such out of the box
> tool, but you need something specific to your setup.

Pity. I wonder what those people and companies use who publish their own
repos/products for Debian (Hashicorp, PostgreSQL, Zabbix etc).

> Also consider the number of debian packages - You surely need a small
> subset - again you have to configure this for yourself.
> I guess all here would agree that with the release model of Debian you have
> a lot of freedom (stable-testing-experimental) to save time on rebuilding
> packages, otherwise it is called Gentoo.

Can I use some of the Gentoo ecosystem on Debian, for a few selected
packages? Or maybe snap is for me?

> On top of that don't forget that debian packages include patches and fixes
> specific to debian.

I hoped to download Debian's source packages (already including all
Debian-specific stuff) and just rebuild them with minimal
changes/patches.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Building my own packages

2020-11-10 Thread Victor Sudakov
Linux-Fan wrote:

[dd]

> 
> Here is the documentation of all components:
> 
> * https://masysma.lima-city.de/32/masysmaci_main.xhtml
> * https://masysma.lima-city.de/32/masysmaci_build.xhtml
> * https://masysma.lima-city.de/32/masysmaci_pkgsync.xhtml
> * https://masysma.lima-city.de/11/maartifact.xhtml

Thank you, Linux-Fan, I've read the documentation and your CI/CD system
seems impressive ... and a bit overwhelming. I don't think I need such a
degree of automation. But speaking of its educational value, thanks
again.

It's strange that there is nothing (or I have not found yet) as
intuitive and working mostly OOTB like FreeBSD's poudriere.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Building my own packages

2020-11-05 Thread Victor Sudakov
to...@tuxteam.de wrote:

[dd]

> 
> > Next I would like to publish those tweaked and local packages in a local
> > repository in a corporate intranet, so that I could add this repository to
> > sources.list and its packages should override the standard Debian ones.
> 
> Ah, a new direction to branch into :-)
> 
> There are instructions on how to set up a Debian repository, e.g.
> here [1].

Maybe I'm looking in the completely wrong direction? Maybe it would be
easier to install such "special" packages with Docker or Snap or
something similar? Would this eliminate the problem of dependencies and
clean builds? 

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Building my own packages

2020-11-04 Thread Victor Sudakov
to...@tuxteam.de wrote:
> > 
> > As a person with the FreeBSD background, I'm used to building my own
> > packages with the exact build options I need (those include exim, nginx,
> > samba, clamav and many others). FreeBSD has a good infrastructure for
> > this (ports tree, poudriere et al.)
> > 
> > Where can I learn to do a similar thing for Debian? I'd like to have my
> > own package repository which:
> 
> If you're the kind of person who needs to get dirty fingers
> while learning, pick a Debian package you care about (not a
> very complex one) and download the source. Make a work
> directory, cd there and download a source package (I'm using
> hello, because it's small)

[dd]

Thank you, it was very instructive!

The result of the described magic would be a .deb package, correct?

> 
> There are several directions you can branch out from there.
> Having the manual (pointed at by other nice folks in this
> thread) handy is highly recommended. One very interesting
> is how to decouple your build environment from your machine
> environment (including building for other Debian versions,
> cross building for other architectures, etc -> pbuilder,
> sbuild, and my favourite, schroot). Or packaging something
> new -> Debian New Maintainer's Guide) etc.

Next I would like to publish those tweaked and local packages in a local
repository in a corporate intranet, so that I could add this repository to
sources.list and its packages should override the standard Debian ones.

Maybe however, it is not such a good idea to publish for other systems a
package built outside a clean reference environment.

Actually I would like to get the better of the two worlds: the general good
quality and stability of Debian packages and - for selected packages only -
the flexibility of *BSD ports, or probably Gentoo(?).


-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Building my own packages

2020-11-04 Thread Victor Sudakov
Thomas Schmitt wrote:
> 
> Victor Sudakov wrote:
> > As a person with the FreeBSD background, I'm used to building my own
> > packages with the exact build options I need [...]
> > What would you advise me to read?
> 
> Since no Debian Developers answered yet, i propose to read
>   https://www.debian.org/doc/manuals/maint-guide/
> and look for examples in
>   https://tracker.debian.org/pkg/$package_name
> and the "tools" and "box" icons to the left under "versioned links".
> Like
>   https://tracker.debian.org/media/packages/libi/libisoburn/rules-1.5.2-1
>   https://tracker.debian.org/media/packages/libi/libisoburn/control-1.5.2-1
> 
> 

Looks scary. In FreeBSD, you don't need a Developer's or Port
Maintainer's expertise to change a few build options and publish the
resulting package(s) in your intranet.

Still looking for a good tutorial or someone with personal experience.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Building my own packages

2020-11-04 Thread Victor Sudakov
songbird wrote:
> 
> > Dear Colleagues,
> >
> > As a person with the FreeBSD background, I'm used to building my own
> > packages with the exact build options I need (those include exim, nginx,
> > samba, clamav and many others). FreeBSD has a good infrastructure for
> > this (ports tree, poudriere et al.)
> >
> > Where can I learn to do a similar thing for Debian? I'd like to have my
> > own package repository which:
> >
> > 1. Keeps my local patches and configure/build options.
> > 2. Gets updated and recompiled when the main Debian repository gets updated.
> > 3. Can have a higher preference for my Debian systems than the default Debi=
> > an repositories.
> >
> > I know this can be done because I use some vendor repositories (zabbix,
> > consul etc) but I need the tools and knowledge.
> >
> > What would you advise me to read?
> 
>   there is a ton of information under:
> 
>   https://www.debian.org/devel/

The problem is I don't need a ton of information :-) I need to hear from
someone who has already done that for themselves: "I use such and such
tools, and publish my repo this way..."

>   what you want is possible, but it really gets harder
> or easier if the package you are interested in is already
> done by someone else, then you can just get the source
> code for yourself that has already had most of the work
> done to it up to whatever standards the debian packager
> has and you can go from there.  the other aspect is if
> the package is required or not so you can't remove it
> without removing a lot of other things.  if it is a leaf
> package or one that can be somewhat self-contained then
> you can just remove the debian version and put your own
> in the place and set up a watch on the repository to
> see when changes happen.

I have no doubt there are many such tricky things, that's why I'm
looking for a tutorial.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Building my own packages

2020-11-04 Thread Victor Sudakov
Reco wrote:
>   Hi.
> 
> On Wed, Nov 04, 2020 at 09:32:31PM +0700, Victor Sudakov wrote:
> > Where can I learn to do a similar thing for Debian? I'd like to have my
> > own package repository which:
> > 
> > 1. Keeps my local patches and configure/build options.
> > 2. Gets updated and recompiled when the main Debian repository gets updated.
> > 3. Can have a higher preference for my Debian systems than the default 
> > Debian repositories.
> 
> apt-build can do 1 and 3.
> 2 is tricky.
> 
> And the trick here lies in the fact that building software should use a
> controlled, reproducible and deterministic environment (pbuilder,
> cowbuilder, buildd to name a few), and not a live OS installation with
> assorted packages and customizations.

Most certainly yes. In FreeBSD, poudriere provides this controlled
environment in the form of reference jails.

> Assuming, of course, that you need whatever you want to build working,
> not merely compiled somehow and installed somewhere.

Sure. 

> 
> But, since you're accustomed to do things FreeBSD way (and building
> something in controlled environment isn't something they do or promote)

This is incorrect.

> - just assume that apt-build can do updates too.
> 

I'll take a look at it but from what you have written above, it's
probably not what I am looking for. From the man page, it looks more
like FreeBSD's portmaster ("fetch the source and build/install right
here for this particular system").

I would like for my custom packages to form a repo I could use from
several Debian systems.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Building my own packages

2020-11-04 Thread Victor Sudakov
Dear Colleagues,

As a person with the FreeBSD background, I'm used to building my own
packages with the exact build options I need (those include exim, nginx,
samba, clamav and many others). FreeBSD has a good infrastructure for
this (ports tree, poudriere et al.)

Where can I learn to do a similar thing for Debian? I'd like to have my
own package repository which:

1. Keeps my local patches and configure/build options.
2. Gets updated and recompiled when the main Debian repository gets updated.
3. Can have a higher preference for my Debian systems than the default Debian 
repositories.

I know this can be done because I use some vendor repositories (zabbix,
consul etc) but I need the tools and knowledge.

What would you advise me to read?

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Who installed package "foo"?

2020-11-02 Thread Victor Sudakov
Nito wrote:
> On Mon, Nov 02, 2020 at 09:51:29 +0700, Victor Sudakov wrote:
> > Jean-Philippe MENGUAL wrote:
> > > or apt-cache rdepends foo
> > 
> > I got the impression that it shows all possible reverse dependencies,
> > not just those installed locally.
> > It lists plenty of stuff which "dpkg -l" does not list.

> 
> apt-cache rdepends --installed foo
> will limit this to locally installed reverse dependencies.

Thank you (and John Crawley). This answer is the winner!

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Who installed package "foo"?

2020-11-01 Thread Victor Sudakov
David Wright wrote:
> On Mon 02 Nov 2020 at 09:52:53 (+0700), Victor Sudakov wrote:
> > Dan Ritter wrote:
> > > > 
> > > > When I want to figure out what package has installed package "foo" as a
> > > > dependency, is there a less barbaric method than 
> > > > 
> > > > apt-get -s remove foo 
> > > 
> > > In addition to the other answers I see, you probably have a
> > > record of when it happened in /var/log/history.log
> > 
> > You probably mean /var/log/apt/history.log.* 
> > 
> > Unfortunately the information about "foo" seems to have already been 
> > rotated away.
> 
> $ grep -e '^Package:' -e 'Depends: .*\' /var/lib/dpkg/status | grep -B1 
> -e 'Depends:' | less

Oh, parsing a text file is to my liking, thank you for the hint.

It's good that Debian's package database is a plain text file (as
compared to FreeBSD's sqlite for example).

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Who installed package "foo"?

2020-11-01 Thread Victor Sudakov
Dan Ritter wrote:
> > 
> > When I want to figure out what package has installed package "foo" as a
> > dependency, is there a less barbaric method than 
> > 
> > apt-get -s remove foo 
> 
> In addition to the other answers I see, you probably have a
> record of when it happened in /var/log/history.log

You probably mean /var/log/apt/history.log.* 

Unfortunately the information about "foo" seems to have already been rotated 
away.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Who installed package "foo"?

2020-11-01 Thread Victor Sudakov
Jean-Philippe MENGUAL wrote:
> > > 
> > > When I want to figure out what package has installed package "foo" as a
> > > dependency, is there a less barbaric method than
> > > 
> > > apt-get -s remove foo
> > > 
> > > ?
> 
> or apt-cache rdepends foo

I got the impression that it shows all possible reverse dependencies,
not just those installed locally.

It lists plenty of stuff which "dpkg -l" does not list.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Who installed package "foo"?

2020-11-01 Thread Victor Sudakov
Andreas Ronnquist wrote:
> >Dear Colleagues,
> >
> >When I want to figure out what package has installed package "foo" as a
> >dependency, is there a less barbaric method than 
> >
> >apt-get -s remove foo 
> >
> >?
> >
> 
> There's 
> 
> aptitude why [package]
> 
> which should do what you ask.

I would like to avoid installing aptitude just for this purpose, if
possible. It's kind of bloated.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Who installed package "foo"?

2020-11-01 Thread Victor Sudakov
Dear Colleagues,

When I want to figure out what package has installed package "foo" as a
dependency, is there a less barbaric method than 

apt-get -s remove foo 

?

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: arc_meta_used > arc_meta_limit, need tuning hints

2020-09-30 Thread Victor Sudakov
D. R. Evans wrote:
> > No ZFS gurus here? Where could I ask?
> > 
> 
> zfs-disc...@list.zfsonlinux.org

Thanks, subscribed:
https://zfsonlinux.topicbox.com/groups/zfs-discuss/Tc55ff6ef317b8932/arcmetaused-arcmetalimit-need-tuning-hints



-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Where is spamassassin's bayes database?

2020-09-30 Thread Victor Sudakov
Jonathan Dowland wrote:
> On Tue, Sep 29, 2020 at 11:41:37PM +0700, Victor Sudakov wrote:
> > Nope, just https://wiki.debian.org/DebianSpamAssassin needs to be fixed.
> > It suggests for Exim "spam = nobody" or "spam = nobody:true", while it
> > should be "spam = debian-spamd" or "spam = debian-spamd:true" of course.
> > 
> > The example is correct for Postfix but incorrect for Exim.
> 
> I've updated the page accordingly. Thanks for your feedback. 


Thank you!

> If you spot any other problems, please consider fixing them yourself.

Well, I don't consider myself a Debian expert, so I may suddenly see a
problem where there is none. Does someone knowledgeable monitor and
review the changes in the Debian Wiki?

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: arc_meta_used > arc_meta_limit, need tuning hints

2020-09-30 Thread Victor Sudakov
No ZFS gurus here? Where could I ask?

Victor Sudakov wrote:
> Dear Colleagues,
> 
> On a system with many small files, I often observe arc_meta_used over 
> arc_meta_limit:
> 
> # grep arc_m /proc/spl/kstat/zfs/arcstats 
> arc_meta_used   45580987440
> arc_meta_limit  45532735283
> arc_meta_max46179223472
> arc_meta_min416777216
> # 
> 
> I think the situation is abnormal and degrades performance. Running
> "echo 3 > /proc/sys/vm/drop_caches" clears the situation ... for a while. 
> 
> I've tried increasing zfs_arc_dnode_limit_percent and
> arc_meta_limit_percent to no avail. What else can I tune?
> 
> Debian 10, zfs-0.8.4-2~bpo10+1
> 
> -- 
> Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
> 2:5005/49@fidonet http://vas.tomsk.ru/



-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Where is spamassassin's bayes database?

2020-09-29 Thread Victor Sudakov
Dan Ritter wrote:
> Victor Sudakov wrote: 
> > F*ck!
> > 
> > I wonder why it is trying to create it as nobody:nogroup...
> > 
> >  spamd[32333]: plugin: eval failed: bayes: (in learn) locker: safe_lock: 
> > cannot create tmp lockfile 
> > /var/lib/spamassassin/.spamassassin/bayes.lock.ip-172-31-37-150.us-west-2.compute.internal.32333
> >  for /var/lib/spamassassin/.spamassassin/bayes.lock: Permission denied
> > 
> > At least I have something to go on with.
> 
> At some point Debian started creating debian-spamd user with
> /var/lib/spamassassin as $HOME. 
> 
> dpkg --reconfigure spamd   maybe?

Nope, just https://wiki.debian.org/DebianSpamAssassin needs to be fixed.
It suggests for Exim "spam = nobody" or "spam = nobody:true", while it
should be "spam = debian-spamd" or "spam = debian-spamd:true" of course.

The example is correct for Postfix but incorrect for Exim.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


Re: Where is spamassassin's bayes database?

2020-09-29 Thread Victor Sudakov
Victor Sudakov wrote:
> Dan Ritter wrote:
> > Victor Sudakov wrote: 
> > > Dear Colleagues,
> > > 
> > > Is anyone running Debian's default SpamAssassin package together with
> > > some MTA (exim, postfix etc)?
> > > 
> > > My question is, when SpamAssassin is accessed over the network
> > > (127.0.0.1:783), where does it keep its Bayesian database? 
> > > 
> > > A command like
> > > spamc -u nobody -L ham  < mail.txt
> > > 
> > > returns that "Message was already un/learned", but for the life of me,
> > > where is the database kept?
> > > 
> > > I've even tried setting bayes_path in local.cf, to no avail. Beats me.
> > 
> > /var/lib/spamassassin/.spamassassin
> > 
> 
> I thought as much, but this directory contains only sa-compile.cache.
> 
> Even if I set "bayes_path /var/lib/spamassassin/.spamassassin/bayes"
> in local.cf, the database does not appear there.

F*ck!

I wonder why it is trying to create it as nobody:nogroup...

 spamd[32333]: plugin: eval failed: bayes: (in learn) locker: safe_lock: cannot 
create tmp lockfile 
/var/lib/spamassassin/.spamassassin/bayes.lock.ip-172-31-37-150.us-west-2.compute.internal.32333
 for /var/lib/spamassassin/.spamassassin/bayes.lock: Permission denied

At least I have something to go on with.


-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/


signature.asc
Description: PGP signature


  1   2   >