View previous topic :: View next topic |
Author |
Message |
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Fri Aug 26, 2016 8:03 am Post subject: How to handle post-install-issues |
|
|
I'm wondering, why my portage wants upgrade Tor again from 0.2.8.6 to *.7, although the new version was upgraded yesterday and runs fine. It turns out, that the package was installed yesterday, the package data base however did not reflect that. The problem is related to the fact, that the directory /var/lib/portage is located on an ext4 fs and encrypted using a native ext4 tool (see section "setup" in [1]). And that directory was un-locked just for user "tor". The user "root" was still able to read that content, but probably not able to write into it : Code: | ...
>>> Completed installing tor-0.2.8.7 into /var/tmp/portage/net-misc/tor-0.2.8.7/image/
* Final size of build directory: 87396 KiB
* Final size of installed tree: 19144 KiB
strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version
usr/bin/tor
usr/bin/tor-resolve
usr/bin/tor-gencert
ecompressdir: bzip2 -9 /usr/share/man
ecompressdir: bzip2 -9 /usr/share/doc
* This package will overwrite one or more files that may belong to other
* packages (see list below). You can use a command such as `portageq
* owners / <filename>` to identify the installed package that owns a
* file. If portageq reports that only one package owns a file then do
* NOT file a bug report. A bug report is only useful if it identifies at
* least two or more packages that are known to install the same file(s).
* If a collision occurs and you can not explain where the file came from
* then you should simply ignore the collision since there is not enough
* information to determine if a real problem exists. Please do NOT file
* a bug report at http://bugs.gentoo.org unless you report exactly which
* two packages install the same file(s). See
* http://wiki.gentoo.org/wiki/Knowledge_Base:Blockers for tips on how to
* solve the problem. And once again, please do NOT file a bug report
* unless you have completely understood the above message.
*
* Detected file collision(s):
*
* /usr/share/doc/tor-0.2.8.7/README.gentoo.bz2
* /usr/share/doc/tor-0.2.8.7/README.bz2
* /usr/share/doc/tor-0.2.8.7/ChangeLog.bz2
* /usr/share/doc/tor-0.2.8.7/ReleaseNotes.bz2
* /usr/share/doc/tor-0.2.8.7/torify.html
* /usr/share/doc/tor-0.2.8.7/tor-resolve.html
* /usr/share/doc/tor-0.2.8.7/tor-gencert.html
* /usr/share/doc/tor-0.2.8.7/tor.html
* /usr/share/doc/tor-0.2.8.7/HACKING/HowToReview.md.bz2
* /usr/share/doc/tor-0.2.8.7/HACKING/GettingStarted.md.bz2
* /usr/share/doc/tor-0.2.8.7/HACKING/CodingStandards.md.bz2
* /usr/share/doc/tor-0.2.8.7/HACKING/README.1st.md.bz2
* /usr/share/doc/tor-0.2.8.7/HACKING/ReleasingTor.md.bz2
* /usr/share/doc/tor-0.2.8.7/HACKING/HelpfulTools.md.bz2
* /usr/share/doc/tor-0.2.8.7/HACKING/WritingTests.md.bz2
*
* Searching all installed packages for file collisions...
*
* Press Ctrl-C to Stop
*
* None of the installed packages claim the file(s).
*
* Package 'net-misc/tor-0.2.8.7' merged despite file collisions. If
* necessary, refer to your elog messages for the whole content of the
* above message.
!!! copy /var/tmp/portage/net-misc/tor-0.2.8.7/image/var/lib/tor/.keep_net-misc_tor-0 -> /var/lib/tor/.keep_net-misc_tor-0 failed.
!!! [Errno 126] Required key not available: '/var/lib/tor/.keep_net-misc_tor-0#new'
*
* The following package has failed to build, install, or execute postinst:
*
* (net-misc/tor-0.2.8.7:0/0::gentoo, ebuild scheduled for merge), Log file:
* '/var/log/portage/net-misc:tor-0.2.8.7:20160826-075111.log.gz'
*
* GNU info directory index is up-to-date.
* IMPORTANT: 2 config files in '/etc' need updating.
* See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
* sections of the emerge man page to learn how to update config files.
* After world updates, it is important to remove obsolete packages with
* emerge --depclean. Refer to `man emerge` for more information.
mr-fox ~ # rm /etc/tor/._cfg0000_torrc
mr-fox # etc-update
Scanning Configuration files...
The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
1) /etc/conf.d/tor (1)
Please select a file to edit by entering the corresponding number.
(don't use -3, -5, -7 or -9 if you're unsure what to do)
(-1 to exit) (-3 to auto merge all files)
(-5 to auto-merge AND not use 'mv -i')
(-7 to discard all updates)
(-9 to discard all updates AND not use 'rm -i'): -7
Deleting /etc/conf.d/._cfg0000_tor
rm: remove regular file ‘/etc/conf.d/._cfg0000_tor’? y
Exiting: Nothing left to do; exiting. :)
|
So I added the user "root" to the key ring too and the enxt attempt worked.
I'm however distracted by the fact, that the package was installed - but not the package database.
FWIW the current situation looks fine : Code: | mr-fox ~ # ls -ald /var/lib/tor/
drwxr-xr-x 3 tor tor 4096 Aug 26 09:56 /var/lib/tor/
mr-fox ~ # ls -al /var/lib/tor/
total 12
drwxr-xr-x 3 tor tor 4096 Aug 26 09:56 .
drwxr-xr-x 14 root root 4096 Aug 26 03:10 ..
drwx------ 4 tor tor 4096 Aug 26 09:02 data
-rw-r--r-- 1 root root 0 Aug 26 09:55 .keep_net-misc_tor-0
|
Ah, and what is really distracting me is the elog message I got via email in the first case : Code: |
Press Ctrl-C to Stop
None of the installed packages claim the file(s).
Package 'net-misc/tor-0.2.8.7' merged despite file collisions. If
necessary, refer to your elog messages for the whole content of the
above message. |
[1] https://www.zwiebeltoralf.de/torserver.html |
|
Back to top |
|
|
nativemad Developer
Joined: 30 Aug 2004 Posts: 918 Location: Switzerland
|
Posted: Fri Aug 26, 2016 10:17 am Post subject: |
|
|
Hi Toralf,
I guess it's a bug if portage doesn't die if /var/lib/portage is not writable!
When a pkg gets installed but not registered in the world file, then there is no pkg claiming to be the owner of the installed files, therefore portage reports file-collisions when it gets merged again.
HTH, cheers _________________ Power to the people! |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Fri Aug 26, 2016 10:41 am Post subject: |
|
|
nativemad wrote: | Hi Toralf,
I guess it's a bug if portage doesn't die if /var/lib/portage is not writable! | Yep, it was readable by root (for some good reasons) - but only "tor" was allowed to write into it - restricted both by the directory perms as well as by the e4crypt mechanism. SO by adding root to the keyring too I solved it - but I do think too, that here's a flaw in the logic of portage. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|