Re: need sources.list example for lan with approx-server

2019-06-07 Thread Andrei POPESCU
On Mi, 27 mar 19, 08:12:42, Greg Wooledge wrote:
> 
>  * apt removes the .deb files that it downloads, after installing them.
>apt-get leaves them in /var/cache/.  This is configurable, I think.
 
My best guess would be:

$ apt-config dump | grep -i keep
Binary::apt::APT::Keep-Downloaded-Packages "0";

>  * apt uses non-configurable yellow tty output that is completely unreadable
>on a white background.  apt-get doesn't do colors, so you can read it
>even if you don't override your terminal's background color.
> 
>  * apt search uses 3 lines of output for each result, with non-configurable
>green text for the package name.  apt-cache search uses 1 line of output
>for each result, and doesn't mess with colors.  At least the green is
>mostly readable, albeit still not as good as the default.
> 
>As compensation for the triple line cost and less readable package names,
>apt search includes the version number in its results.  apt-cache search
>does not.

The colors are probably optimized for white on black terminals.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: need sources.list example for lan with approx-server

2019-03-27 Thread Brian
On Wed 27 Mar 2019 at 08:12:42 -0400, Greg Wooledge wrote:

> On Wed, Mar 27, 2019 at 11:01:38AM +1100, David wrote:
> > The important differences to be aware of are probably:
> > 
> > apt full-upgrade == apt-get dist-upgrade
> > apt upgrade == apt-get upgrade --with-new-pkgs
> > 
> > In other words, 'apt upgrade' does install new packages.
> 
> Also:
> 
>  * apt removes the .deb files that it downloads, after installing them.
>apt-get leaves them in /var/cache/.  This is configurable, I think

It is. The days of conserving bandwidth are mostly in the past. Not
that users have generally been given to reinstalling from /var/cache/apt.

>  * apt uses non-configurable yellow tty output that is completely unreadable
>on a white background.  apt-get doesn't do colors, so you can read it
>even if you don't override your terminal's background color.
> 
>  * apt search uses 3 lines of output for each result, with non-configurable
>green text for the package name.  apt-cache search uses 1 line of output
>for each result, and doesn't mess with colors.  At least the green is
>mostly readable, albeit still not as good as the default.
> 
>As compensation for the triple line cost and less readable package names,
>apt search includes the version number in its results.  apt-cache search
>does not.
> 
> And probably more that I'm not remembering or never encountered before
> switching back to apt-*.

The yellow on white is a pain. Is

https://unix.stackexchange.com/questions/392791/apt-configure-the-colors

any use? Change the background?

Combining apt-get and apt-cache into one command isn't such a bad idea
for most users.

-- 
Brian.




> 



Re: need sources.list example for lan with approx-server

2019-03-27 Thread Curt
On 2019-03-27, Greg Wooledge  wrote:
> On Wed, Mar 27, 2019 at 05:09:51PM -, Curt wrote:
>> In the time-frame of the cited bug (October, 2015), at least, one thread
>> participant opined that the automatic clean-up in apt had yet to be
>> "implemented". Has it been done since somewhere? 
>
> wooledg:~$ ls /var/cache/apt/archives/
> lock  partial
> wooledg:~$ sudo apt install sl
> Reading package lists... Done
> Building dependency tree   
> Reading state information... Done
> The following NEW packages will be installed:
>   sl
> 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
> Need to get 26.7 kB of archives.
> After this operation, 99.3 kB of additional disk space will be used.
> Get:1 http://ftp.us.debian.org/debian stretch/main amd64 sl amd64 3.03-17+b2 
> [26.7 kB]
> Fetched 26.7 kB in 0s (0 B/s) 
> Selecting previously unselected package sl.
> (Reading database ... 91995 files and directories currently installed.)
> Preparing to unpack .../sl_3.03-17+b2_amd64.deb ...
> Unpacking sl (3.03-17+b2) ...
> Setting up sl (3.03-17+b2) ...
> Processing triggers for man-db (2.7.6.1-2) ...
> wooledg:~$ ls /var/cache/apt/archives/
> lock  partial
>
>

I guess I'm not noticing very well these days, having repeated your
demonstration with identical results.

I dig that choo-choo, too, thanks.



Re: need sources.list example for lan with approx-server

2019-03-27 Thread Greg Wooledge
On Wed, Mar 27, 2019 at 05:09:51PM -, Curt wrote:
> In the time-frame of the cited bug (October, 2015), at least, one thread
> participant opined that the automatic clean-up in apt had yet to be
> "implemented". Has it been done since somewhere? 

wooledg:~$ ls /var/cache/apt/archives/
lock  partial
wooledg:~$ sudo apt install sl
Reading package lists... Done
Building dependency tree   
Reading state information... Done
The following NEW packages will be installed:
  sl
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 26.7 kB of archives.
After this operation, 99.3 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian stretch/main amd64 sl amd64 3.03-17+b2 
[26.7 kB]
Fetched 26.7 kB in 0s (0 B/s) 
Selecting previously unselected package sl.
(Reading database ... 91995 files and directories currently installed.)
Preparing to unpack .../sl_3.03-17+b2_amd64.deb ...
Unpacking sl (3.03-17+b2) ...
Setting up sl (3.03-17+b2) ...
Processing triggers for man-db (2.7.6.1-2) ...
wooledg:~$ ls /var/cache/apt/archives/
lock  partial



Re: need sources.list example for lan with approx-server

2019-03-27 Thread Curt
On 2019-03-27, rlhar...@oplink.net  wrote:
> On 2019.03.27 07:12, Greg Wooledge wrote:
>> On Wed, Mar 27, 2019 at 11:01:38AM +1100, David wrote:
>>> The important differences to be aware of are probably:
>
>
>> Also:
>>  * apt removes the .deb files that it downloads, after installing them.
>>apt-get leaves them in /var/cache/.  This is configurable, I think.
>
>
>
>> And probably more that I'm not remembering or never encountered before
>> switching back to apt-*.
>
> Interesting.  But though I am keyboard-oriented, my preference is 
> Synaptic, because I typically am searching for a particular feature in a 
> package, and for this the package summaries presented by Synaptic save 
> me time.
>
>

I haven't noticed 'apt' deleting the download cache by default here on
my Stretch machine; I also 'apt clean' periodically for this very reason
(that argument being accepted by apt and more*, although it remains
undocumented so as to not confuse and/or clutter the minds of the hoi
polloi).

* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=781237

In the time-frame of the cited bug (October, 2015), at least, one thread
participant opined that the automatic clean-up in apt had yet to be
"implemented". Has it been done since somewhere? 






Re: need sources.list example for lan with approx-server

2019-03-27 Thread rlharris

On 2019.03.27 07:12, Greg Wooledge wrote:

On Wed, Mar 27, 2019 at 11:01:38AM +1100, David wrote:

The important differences to be aware of are probably:




Also:
 * apt removes the .deb files that it downloads, after installing them.
   apt-get leaves them in /var/cache/.  This is configurable, I think.





And probably more that I'm not remembering or never encountered before
switching back to apt-*.


Interesting.  But though I am keyboard-oriented, my preference is 
Synaptic, because I typically am searching for a particular feature in a 
package, and for this the package summaries presented by Synaptic save 
me time.




Re: need sources.list example for lan with approx-server

2019-03-27 Thread Greg Wooledge
On Wed, Mar 27, 2019 at 11:01:38AM +1100, David wrote:
> The important differences to be aware of are probably:
> 
> apt full-upgrade == apt-get dist-upgrade
> apt upgrade == apt-get upgrade --with-new-pkgs
> 
> In other words, 'apt upgrade' does install new packages.

Also:

 * apt removes the .deb files that it downloads, after installing them.
   apt-get leaves them in /var/cache/.  This is configurable, I think.

 * apt uses non-configurable yellow tty output that is completely unreadable
   on a white background.  apt-get doesn't do colors, so you can read it
   even if you don't override your terminal's background color.

 * apt search uses 3 lines of output for each result, with non-configurable
   green text for the package name.  apt-cache search uses 1 line of output
   for each result, and doesn't mess with colors.  At least the green is
   mostly readable, albeit still not as good as the default.

   As compensation for the triple line cost and less readable package names,
   apt search includes the version number in its results.  apt-cache search
   does not.

And probably more that I'm not remembering or never encountered before
switching back to apt-*.



Re: need sources.list example for lan with approx-server

2019-03-26 Thread David
On Wed, 27 Mar 2019 at 03:59,  wrote:
>
> I saw Debian documentation which says that "apt" has been revised to
> correct errors made when coding "apt-get".  But then I saw other
> documentation which recommended "apt-get" over "apt".  I suppose this
> question belongs in another thread...

The intention of apt is to provide an easier-to-use human interface
to the most common operations, but its interface might
be improved from time to time, so don't rely on it in scripts.

Whereas the apt-* tools are intended to be powerful
low-level tools to use in scripts, so their interfaces never change
and they provide all functionality, but consequently they have many
complex options.

Hence the apt-* tools were created first, and keep growing more options
as required. Much later, the team got around to writing and releasing
apt. The guides you read that use apt-* probably predate apt.

https://itsfoss.com/apt-vs-apt-get-difference/
https://askubuntu.com/questions/445384/what-is-the-difference-between-apt-and-apt-get

The important differences to be aware of are probably:

apt full-upgrade == apt-get dist-upgrade
apt upgrade == apt-get upgrade --with-new-pkgs

In other words, 'apt upgrade' does install new packages.



Re: need sources.list example for lan with approx-server

2019-03-26 Thread rlharris

On 2019.03.26 03:40, David wrote:

On Tue, 26 Mar 2019 at 14:33,  wrote:


Would someone kindly point me to (or email me) an example sources.list
for machines running Debian-9 (Stretch) in a LAN with an approx 
server?





I have used approx for many releases. But I've never used Synaptic.
I suggest to avoid using Synaptic until you have fixed command-line
apt. Synaptic might be what caused the problem.



I saw Debian documentation which says that "apt" has been revised to 
correct errors made when coding "apt-get".  But then I saw other 
documentation which recommended "apt-get" over "apt".  I suppose this 
question belongs in another thread...



I don't think 'approx' is responsible for the error message you 
provided.
It appears to be a permissions problem of apt-get failing to read a 
local

file /etc/apt/trusted.gpg


I agree.



On stretch, I don't have that file.


It appears to be created by the menu item SETTINGS -> REPOSITORY menu of 
synaptic.  I found a discussion thread about the problem:


One reply said that the trouble was caused when the SETTINGS -> 
REPOSITORY menu of synaptic was used, and that getting things running 
right again required removal of the file /etc/apt/trusted.gpg.  Another 
reply lambasted that solution; however, in my experience it worked.


However, "apt update" did not run without error, because of my botched 
editing of sources.list; I still needed a pristine copy of sources.list 
which corresponded to installation with a mirror (approx).  Thankfully, 
I found the file on another machine here, so I copied that pristine 
sources.list to the broken system.  Then I executed "apt update" and 
everything appeared to be good.


Then I started Synaptic, and RELOAD ran without error, so I used 
Synaptic to install a file I needed, and now the system appears to be 
running properly.




Re: need sources.list example for lan with approx-server

2019-03-26 Thread David
On Tue, 26 Mar 2019 at 14:33,  wrote:
>
> Would someone kindly point me to (or email me) an example sources.list
> for machines running Debian-9 (Stretch) in a LAN with an approx server?
>
> Following the installation of Stretch on a machine in the LAN, I used
> Synaptic to add packages, but pressing the RELOAD button of Synaptic
> produces the following error message:
>
> http://192.168.1.40:/debian/dists/stretch-updates/InRelease: The
> key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file is
> not readable by user '_apt' executing
> apt-key.http://deb.debian.org/debian-security/dists/stretch/updates/InRelease:
> The key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file
> is not readable by user '_apt' executing
> apt-key.http://192.168.1.40:/debian/dists/stretch/Release.gpg: The
> key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file is
> not readable by user '_apt' executing apt-key.Failed to fetch
> http://192.168.1.40:/debian/dists/stretch-updates/main/source/Sources.xz
> Hash Sum mismatch
> 
>
> The approx server is running a recent installation of Stretch, and was
> used as a mirror for installation of the machine which now is generating
> the error message.  I then attempted to edit the sources.list created by
> the installer on the complaining machine, and in the process I overwrote
> the version left by the installer.

Based on the info you provided, I would expect a *minimal*
/etc/apt/sources.list file to contain something like:

deb http://192.168.1.40:/debian/ stretch main
deb http://security.debian.org/debian-security stretch/updates main

if you want to use approx, assuming 192.168.1.40 is the IP address
of your approx server. The actual file contents depends on choices
made during installation.

I have used approx for many releases. But I've never used Synaptic.
I suggest to avoid using Synaptic until you have fixed command-line
apt. Synaptic might be what caused the problem. So while troubleshooting
this problem, I suggest running 'apt-get update' as root, and defer running
Synaptic until that command completes without error.

I don't think 'approx' is responsible for the error message you provided.
It appears to be a permissions problem of apt-get failing to read a local
file /etc/apt/trusted.gpg

On stretch, I don't have that file. I had to go back two releases to wheezy
to find an example. It is readable only by root.

$ ls -l /mnt/p/B/etc/apt/trusted.gpg
-rw--- 1 root root 1252 2013-07-03 21:49 /etc/apt/trusted.gpg

So, I wonder what is going on? I'm not familiar with the contents
of that file. That's why I suggest to remove Synaptic
from the troubleshooting process, until apt-get is working.

As a first step, I would create a /etc/apt/sources.list that does
not use approx, and test it with 'apt-get update'. It would
contain this:

deb http://deb.debian.org/debian/ stretch main
deb http://security.debian.org/debian-security stretch/updates main



need sources.list example for lan with approx-server

2019-03-25 Thread rlharris
Would someone kindly point me to (or email me) an example sources.list 
for machines running Debian-9 (Stretch) in a LAN with an approx server?


Following the installation of Stretch on a machine in the LAN, I used 
Synaptic to add packages, but pressing the RELOAD button of Synaptic 
produces the following error message:



http://192.168.1.40:/debian/dists/stretch-updates/InRelease: The 
key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file is 
not readable by user '_apt' executing 
apt-key.http://deb.debian.org/debian-security/dists/stretch/updates/InRelease: 
The key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file 
is not readable by user '_apt' executing 
apt-key.http://192.168.1.40:/debian/dists/stretch/Release.gpg: The 
key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file is 
not readable by user '_apt' executing apt-key.Failed to fetch 
http://192.168.1.40:/debian/dists/stretch-updates/main/source/Sources.xz

Hash Sum mismatch



The approx server is running a recent installation of Stretch, and was 
used as a mirror for installation of the machine which now is generating 
the error message.  I then attempted to edit the sources.list created by 
the installer on the complaining machine, and in the process I overwrote 
the version left by the installer.