[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#962310: chmod 0700 warning messages appears to be incorrect



David Kalnischkies wrote:
> On Fri, Jun 05, 2020 at 09:15:56PM -0400, Wakko Warner wrote:
> > I noticed, due to the way I have apt setup, that it complains about chmoding
> > some files.  I was looking in the source for a way to bypass this message
> > and noticed that 0700 is hard coded in the warning.
> 
> Can you describe your setup some more so that we can perhaps make apt
> deal with that setup better? It is a bit on the backburner ATM, but
> isolating the methods more from the system and each other is always on
> the TODO list and that tends to involve more directories with more
> permissions and stuff.

I keep a mirror of debian in /debian.  I usually only get dists/sid
(amd64/i386 and source only), zz-dists and pool (again, amd64/i386/source).

In apt/, I have amd64, amd64+i386 and i386.

Under those, I have 2 apt config snippets to use the local mirror (one keeps
cache on local system, other keeps it centralized).  I have a sources.list
that points to this location.  Then I have cache and lists.  These are the
same as /var/cache/apt and /var/lib/apt/lists.

After my mirror finishes, the following is ran:
unset clean
for dir in apt/*;do
 [ "$dir" = "apt/*" ] && break
 [ -e "$dir/00mirror" ] || continue
 rm -f "$dir/cache/pkgcache.bin" "$dir/cache/srcpkgcache.bin"
 apt-get ${clean+-o} $clean -o Debug::NoLocking=yes -c "$dir/00mirror" update
 clean="APT::Get::List-Cleanup=no"
done

This is not ran as root, the reason for NoLocking.  Currently, my server's
apt version is quite old and I have been reluctant to upgrade it due to this
setup and the fact that apt-file changed.  apt currenlty 1.0.7 and apt-file
2.5.1 on the server.  Clients with 2.1.6 works just fine but not apt-file

00mirror is for trusted clients (Normally part of my network) and have full
write access to the mirror.  The other part of this is to keep the .bin files
off the local machine.  This file also describes my directory layout too.
I'm only using sid for this setup.  00mirror (for my amd64+i386) contains:
Apt::Architecture "amd64";
Apt::Architectures {"amd64"; "i386";};
Dir "/debian/"
{
 State "apt/amd64+i386/"
 {
  Lists "lists/";
  extended_states "/var/lib/apt/extended_states";
  status "/var/lib/dpkg/status";
 };
 Cache "apt/amd64+i386/cache/"
 {
  Archives "/var/cache/apt/archives/";
  srcpkgcache "srcpkgcache.bin";
  pkgcache "pkgcache.bin";
 };
 Etc "/etc/apt/"
 {
  SourceList "/debian/apt/amd64+i386/sources.list";
 };
 Log "/var/log/apt";
};

The amd64 only and i386 only have that specific arch on line 1, they do not
have the 2nd line and the paths are changed respectively.

00mirror-localcache is the same, just replacing the Cache section with
Cache "/var/cache/apt/";
It's used on clients where the mirror is read only.

For the client side, all that has to be done is
1) create /debian
2) mount via nfs
3) link either 00mirror or 00mirror-localcache to /etc/apt/apt.conf.d

apt-get update is never ran on client side, it's always up to date.  I
noticed that if packagecache.bin is out of date, an apt-get install will fix
it.  I also know that the .bin files are not the same between apt versions,
however I never install packages on 2 different machines concurrently (For
the ones that use 00mirror)

> > In apt-pkg/acquire.cc:SetupAPTPartialDirectory() on lines 112 and 119 is
> > where I noticed the message.  The chown in the if statement shows it using a
> > variable named mode.  The warning message should reflect the mode it was
> > trying to set.
> 
> Indeed, thanks for reporting!
> 
> I will see how to change that string (and the one assuming root-group to
> be root even through we have a compile-time variable for that) without
> creating busywork for our translations.

Y/W.  I received another email that stated this was fixed in git already.

-- 
 Microsoft has beaten Volkswagen's world record.  Volkswagen only created 22
 million bugs.


Reply to: