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 David Wright
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

Cheers,
David.



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


Re: why buster doesn't enter sleep mode

2020-11-01 Thread David Wright
On Sun 01 Nov 2020 at 20:49:48 (+), Long Wind wrote:
> On Sunday, November 1, 2020, 2:46:28 PM EST, Long Wind  
> wrote:  
> > 
> > tty2 doesn't enter sleep mode after long period of keyboard inactivityby 
> > sleep mode i mean monitor isn't turned offi believe that sound playing on 
> > tty3 prevents buster from entering sleep mode
> > which setting shall i change to enter sleep mode? for how long do i have to 
> > wait?

>  i've solved it. i switch to X Window, it enter sleep mode after long period 
> of mouse/keyboard inactivity.

Attached is my issue file, which blanks the console after 16 minutes.
(16 is the second number in the file.)

Switching to X isn't a solution if you remotely wake up a PC, but
don't trek over to it to log in.

Cheers,
David.
\e[9;16]\S \n \l \d  \t


Re: package of cfdisk

2020-11-01 Thread Bob Weber

On 11/1/20 5:53 PM, gregoire roumache wrote:

Hello,

I've found multiple bugs while using the command : cfdisk. I've written a 
report to sub...@bugs.debian.org , however it 
was rejected because I didn't specify a package (line at the very first line 
of the mail body). Unfortunately, I couldn't determine what package cfdisk was 
part of. If you could give me its name, it would be very helpful!


Sincerely,

Grégoire Roumache


"apt-file search cfdisk" (without quotes) will also find the package.  You might 
have to install the apt-file package to use it.


--


*...Bob*


Re: package of cfdisk

2020-11-01 Thread Gregory Seidman
On Sun, Nov 01, 2020 at 11:53:18PM +0100, gregoire roumache wrote:
> Hello,
> 
> I've found multiple bugs while using the command : cfdisk. I've written a
> report to sub...@bugs.debian.org, however it was rejected because I didn't
> specify a package (line at the very first line of the mail body).
> Unfortunately, I couldn't determine what package cfdisk was part of. If you
> could give me its name, it would be very helpful!

You can determine what package a file comes from using dpkg -S:

% dpkg -S $(which cfdisk)
fdisk: /sbin/cfdisk

> Sincerely,
> Grégoire Roumache
--Gregory



Re: package of cfdisk

2020-11-01 Thread Kushal Kumaran
On Sun, Nov 01 2020 at 11:53:18 PM, gregoire roumache  
wrote:
> Hello,
>
> I've found multiple bugs while using the command : cfdisk. I've written a
> report to sub...@bugs.debian.org, however it was rejected because I didn't
> specify a package (line at the very first line of the mail body).
> Unfortunately, I couldn't determine what package cfdisk was part of. If you
> could give me its name, it would be very helpful!
>

# dpkg -S cfdisk 
fdisk: /sbin/cfdisk

-- 
regards,
kushal



package of cfdisk

2020-11-01 Thread gregoire roumache
Hello,

I've found multiple bugs while using the command : cfdisk. I've written a
report to sub...@bugs.debian.org, however it was rejected because I didn't
specify a package (line at the very first line of the mail body).
Unfortunately, I couldn't determine what package cfdisk was part of. If you
could give me its name, it would be very helpful!

Sincerely,

Grégoire Roumache


Re: [un peu HS] argc, argv et exec*()

2020-11-01 Thread BERTRAND Joël
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Étienne Mollier a écrit :
> Bonjour,
> 
> Je crois que le problème vient des simple quotes surnuméraires en
> début et fin d'expression

Rhôh, bien vu ! Le truc maintenant est de réussir à les enlever de
façon intelligente parce que, comme de bien entendu, ça ne vient pas
directement d'un tableau argv[] rempli à la main...

Merci pour tout,

JKB
-BEGIN PGP SIGNATURE-

iQIzBAEBCgAdFiEEq4YCoAJMwLElZVYXOAfo0lKQ8+cFAl+fMe0ACgkQOAfo0lKQ
8+fnjhAAsTn+iup5Ruz1PXygPa4ciWtZ7uC888aamhvsEPdo00cHiITySYbGZVGX
eboJaz286rl2rGbidoilUKovsIxHWjY14Fo7ZMyON8aIIE2+PQmvMSrR7opsokvP
1LnTCYFUGqx7ODcqfDsPpFOzcZhKk2H8y9DdWCV18NtPjNpDVO9eZGHNJFqpInpP
5CcPPqnUS8zOvzA8qzPGr+Bp0VHV42oCc6Ne4L+niz1Ql8QjixBFdNhFnk3OEv38
/jfJwW5d7Ts+euDfevFQl9dn2bCCZ27wH8daqpXiWDd5dkAQIDgrr9wBn5k/pyDy
RHVP72E0aYbBaoaAoGXJsZ9ycRBF3Twz/bOF2/aCxcFRgEW/oDMzqAQZo2PXCIsF
MF93GOLz+a9Bmfc4bLb3z1OwOJR4xHXIBlapluCDpVYjZOYgoxHUWJ9gZG41g09y
i0xND2pH1WKwJqoXJg3vtpQxy9bukNB10CLsJYRDtvf5JHE5N/PCDd/ZhlUT77xG
bRbRrUFVPHoluqdckz/i1eLNPJW9gMl9fCcuybtvM2QnE5lWCMGCnb1ZKKNbFnSM
84CRljnlx45fWtEct+CJ7gfwSKlzl92NcclopS/SnPYG+xWj7UoxT4DwRcoghstZ
zptZU4ghLUS+IUk8+2sSkvlgnFiUTxPLhSFzx9vIwNxDHZWHitA=
=ipTo
-END PGP SIGNATURE-



Re: [un peu HS] argc, argv et exec*()

2020-11-01 Thread Étienne Mollier
Bonjour,

Je crois que le problème vient des simple quotes surnuméraires
en début et fin d'expression

BERTRAND Joël, on 2020-11-01 10:34:14 +0100:
>   Sur la console, j'obtiens bien :
> 0: awk
> 1: 'BEGIN { I=0; } // { I=I+1; } { if (I>0) print; } /<\/comp>/ 
> { I=I-1; }'
ici: 
^~~~^

$ ls
alimentations_haute_tension.xml  truc  truc.c

$ ./truc 
0: awk
1: BEGIN { I=0; } // { I=I+1; } { if (I>0) print; } 
/<\/comp>/ { I=I-1; }
2: alimentations_haute_tension.xml
3: (null)

> 2: alimentations_haute_tension.xml
> 3: (null)
> 
>   Donc argc[0] vaut awk, argc[1] vaut bien le contenu du script awk et
> argc[2] le nom du xml à analyser.
> 
>   Résultat :
> 
> "awk: ligne de commande:1: 'BEGIN { I=0; } // { I=I+1; } { if 
> (I>0) print; } /<\/comp>/ { I=I-1; }'"

En ajoutant les simple quotes en Debian Sid, j'obtiens bien une
erreur similaire, modulo la localisation:

$ ./truc
0: awk
1: 'BEGIN { I=0; } // { I=I+1; } { if (I>0) print; } 
/<\/comp>/ { I=I-1; }'
2: alimentations_haute_tension.xml
3: (null)
awk: cmd. line:1: 'BEGIN { I=0; } // { I=I+1; } { if (I>0) 
print; } /<\/comp>/ { I=I-1; }'
awk: cmd. line:1: ^ invalid char ''' in expression

J'imagine que la solution de contournement fait l'affaire, mais
si ça peut éclairer votre lanterne...

Bonne soirée,
-- 
Étienne Mollier 
Old rsa/3072: 5ab1 4edf 63bb ccff 8b54  2fa9 59da 56fe fff3 882d
New rsa/4096: 8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
Sent from /dev/pts/3, please excuse my verbosity.


signature.asc
Description: PGP signature


Re: [un peu HS] argc, argv et exec*()

2020-11-01 Thread BERTRAND Joël
Je viens de tester une ruse : passer par un shell intermédiaire.

argc contiens donc dans l'ordre :

0: sh
1: -c
2: awk 'BEGIN { I=0; } // { I=I+1; } { if (I>0) print; }
/<\/comp>/ { I=I-1; }' alimentations_haute_tension.xml
3: (null)

et ça fonctionne. Quelque chose m'échappe sur le tableau argc[] dans le
premier mail.

JKB



Re: The .xsession-errors problem

2020-11-01 Thread Kenneth Parker
On Sun, Nov 1, 2020, 11:48 AM Teemu Likonen  wrote:

> * 2020-11-01 11:09:50+01, Anders Andersson wrote:
>
> > On Mon, Oct 26, 2020 at 5:43 PM Teemu Likonen  wrote:
> >> From my backups I found an ~/.xsession-errors file of size 111
> >> megabytes. Probably I deleted the file at that point and it started
> >> grow again.
> >
> > Amateur. I found a 24 GB .xsession-errors once, on a 30 GB filesystem.
> > 423 million lines.
>
> That is some log file. One would probably want to introduce it to the
> nice /dev/null device:
>
> ln -sf /dev/null ~/.xsession-errors
>
> Graphical programs are sometimes really noisy when started from command
> line. And there are various output lines related to dbus, kdeinit5 and
> other fancy desktop stuff which nobody understands anymore.
>

Also, verify that Debug Mode is not set.  (I once did that with the Linux
Kernel, years ago, and it filled up the Partition!)

Kenneth Parker


Re: The .xsession-errors problem

2020-11-01 Thread Teemu Likonen
* 2020-11-01 11:09:50+01, Anders Andersson wrote:

> On Mon, Oct 26, 2020 at 5:43 PM Teemu Likonen  wrote:
>> From my backups I found an ~/.xsession-errors file of size 111
>> megabytes. Probably I deleted the file at that point and it started
>> grow again.
>
> Amateur. I found a 24 GB .xsession-errors once, on a 30 GB filesystem.
> 423 million lines.

That is some log file. One would probably want to introduce it to the
nice /dev/null device:

ln -sf /dev/null ~/.xsession-errors

Graphical programs are sometimes really noisy when started from command
line. And there are various output lines related to dbus, kdeinit5 and
other fancy desktop stuff which nobody understands anymore.

-- 
/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450


signature.asc
Description: PGP signature


unable to login

2020-11-01 Thread anthony gennard
I was getting along quite well with my Debian 10.6 installation when I
encountered a strange problem. I have Kde with Plazma installed in Debian
and the machine is a dual installation with Windows 10.

When starting I selected Debian from Grub, that was normal and went through
the startup routine also as normal and then ignoring the login
screen continued to bring up the Gui but when I tried to install two update
packages, it refused to go any further. I played about with the
Gui quite alright but anything that required authorising failed. I could
access my email as normal.

I went out of the Gui into a console and all seemed normal, I login in
and commands were obeyed.

Can anyone help me with this problem please.

(I`m sorry for this message but I`m still in a bid place with all my
medical problems and condition).


Re: Who installed package "foo"?

2020-11-01 Thread Dan Ritter
Victor Sudakov 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 

In addition to the other answers I see, you probably have a
record of when it happened in /var/log/history.log

-dsr-



Re: Who installed package "foo"?

2020-11-01 Thread Jean-Philippe MENGUAL

Le 01/11/2020 à 13:35, Andreas Ronnquist a écrit :

On Sun, 1 Nov 2020 18:59:16 +0700,
Victor Sudakov 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]


or apt-cache rdepends foo

Regards


which should do what you ask.

-- Andreas Rönnquist
mailingli...@gusnan.se
andr...@ronnquist.net





Re: Who installed package "foo"?

2020-11-01 Thread Andreas Ronnquist
On Sun, 1 Nov 2020 18:59:16 +0700,
Victor Sudakov 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.

-- Andreas Rönnquist
mailingli...@gusnan.se
andr...@ronnquist.net



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: Mounting a USB device

2020-11-01 Thread Mick Ab
Many thanks for your email, David.

Apologies for any contradictory messages i have posted. My understanding of
the automatic mount of USB devices has been rapidly evolving.

I have now seen that people have had various problems with usbmount over
the years, so I can quite understand why it might not be in the  most
recent Debian distributions.

My plan is to update my distribution very soon, but first I need to do a
backup of the system to a USB portable hard drive (which uses NTFS).

I would like this backup to go as smoothly as possible.
On 31 Oct 2020 22:41, "David Wright"  wrote:

> On Thu 29 Oct 2020 at 18:40:53 (+), Mick Ab wrote:
> > I am fairly convinced that the USB 3 port previously mentioned has a
> loose
> > connection.
> >
> > It also seems to me that a FAT32 device such as a memory stick is
> > automatically mounted when inserted in a USB port while the system
> > is running, if such a device is not referenced in /etc/fstab.
>
> Call that paragraph ¶ 2.
>
> > What is not clear to me is what happens to an NTFS device such as a
> > portable drive when it is inserted in a USB port while the system is
> > running, if the device is not referenced in /etc/fstab.
> >
> > The following point is observed :-
> >
> > USB devices referenced in /etc/fstab are automatically mounted when the
> > system is rebooted, even though their entries include the noauto option
> > (the devices are already plugged in when a reboot is performed).
>
> As I thought, this observation contradicts the first thought expressed
> in your Tue, 27 Oct 2020 20:43:52 + post (the last paragraph of
> quote below). I presume that although mounting is disallowed for   mount -a
> (by noauto), your automounter is not constrained in this way.
>
> > What happens to a USB device that is not referenced in /etc/fstab,
> > when it is plugged into a USB port while the system is running :-
> >
> > If the filesystem is FAT32 (e.g. a memory stick) will it always be
> > automatically mounted or will it always have to be manually mounted ?
>
> Isn't that just what you answered in ¶ 2 above?
>
> > If the filesystem is NTFS (e.g. a portable hard drive) will it always
> > be automatically mounted or will it always have to be manually mounted ?
> >
> > The automount system appears to be usbmount.
>
> I guess your answer lies there then. AFAICT usbmount hasn't been
> included in the last two stable distributions (stretch and buster).
> I've never used it. I assume there are others here for which this
> all works. (I've left it a day before replying.) I can't work out
> where your questions are leading, and whether you have a problem
> to solve (besides having flaky hardware).
>
> > On 29 Oct 2020 17:33, "David Wright"  wrote:
> > > On Tue 27 Oct 2020 at 20:43:52 (+), Mick Ab wrote:
> > > >
> > > > It seems to me that the situation is as follows :-
> > > >
> > > > Filesystems in /etc/fstab which have the noauto option are not
> > > > automatically mounted at boot time, so if these filesystems are
> already
> > > > plugged into USB ports at boot time, they would subsequently have to
> be
> > > > manually mounted in order to be used.
> > > >
>
> Cheers,
> David.
>
>


Re: The .xsession-errors problem

2020-11-01 Thread Anders Andersson
On Mon, Oct 26, 2020 at 5:43 PM Teemu Likonen  wrote:
>
> It seems that ~/.xsession-errors file can still grow to infinity in
> size. Sometimes it grows really fast. This is nothing new: we have all
> seen it and talked about it. What do you do to maintain this file?
>
>   - Do you just delete it when you happen to notice it's too big?
>
>   - Do you configure some rotating system, perhaps with logrotate(8)?
> (Why doesn't Debian have this automatically?)
>
>   - Do you add it to your backup system's ignore list so that a
> potentially big file doesn't fill your backups?
>
>   - What do Debian documentation and faq lists teach about maintaining
> this potentially huge file?
>
>   - Why is it normal that in Debian (and GNU/Linux) you need to manually
> delete a hidden file to keep it from filling your hard disks?
>
> Note that I'm not necessarily looking for help but different views are
> welcome. I'm mostly interested in the phenomenon that there still is
> this well-known indefinitely growing file and seemingly no automatic
> rotation.
>
> From my backups I found an ~/.xsession-errors file of size 111
> megabytes. Probably I deleted the file at that point and it started grow
> again.

Amateur. I found a 24 GB .xsession-errors once, on a 30 GB filesystem.
423 million lines. Most of them the same:

(indicator-weather:2201): LIBDBUSMENU-GLIB-CRITICAL **:
dbusmenu_menuitem_build_variant: assertion `DBUSMENU_IS_MENUITEM(mi)'
failed

Buggy crap can fill it up pretty fast.



[un peu HS] argc, argv et exec*()

2020-11-01 Thread BERTRAND Joël
Bonjour à tous,

Pardonnez-moi le hors sujet léger. Je tombe sur un problème que je ne
comprends pas tout à fait.

J'essaie de lire un fichier XML trivial (mais long) à coup de awk avant
de passer le résultat dans une moulinette (en C, mais là n'est pas la
question) pour trier les différentes données.

En ligne de commande, je commence à traiter mon fichier XML comme ceci :

awk 'BEGIN { I=0; } // { I=I+1; } { if (I>0) print; }
/<\/comp>/ { I=I-1; }' alimentations_haute_tension.xml

et ça fonctionne parfaitement. J'extrais tous les blocs ..., même les blocs récursifs. Je n'ai pas besoin de plus
pour l'instant.

Comme le traitement doit être automatique, j'ai donc collé cela dans un
programme en C avec un execvp(). Extrait :

...
{
for(i = 0; i <= nombre_arguments; i++)
printf("%d: %s\n", i, arguments[i]);

execvp(arguments[0], arguments);
}
...

Je vous fais grâce de ce qui est avant et après ce traitement, en
particulier la grouille avec fork() et j'en passe.

Sur la console, j'obtiens bien :
0: awk
1: 'BEGIN { I=0; } // { I=I+1; } { if (I>0) print; }
/<\/comp>/ { I=I-1; }'
2: alimentations_haute_tension.xml
3: (null)

Donc argc[0] vaut awk, argc[1] vaut bien le contenu du script awk et
argc[2] le nom du xml à analyser.

Résultat :

"awk: ligne de commande:1: 'BEGIN { I=0; } // { I=I+1; } {
if (I>0) print; } /<\/comp>/ { I=I-1; }'"

Et là, je ne comprends plus, d'autant que si je copie simplement les
trois valeurs dans un shell, ça fonctionne. Je suis preneur de toute
lumière.

Bien cordialement,

JKB