You are not logged in.

#51 2013-06-03 15:47:09

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,390

Re: Binaries move to /usr/bin requiring update intervention

what i did was
to get the list of "bad" packages by following the instruction in the wiki
then i did bacman on then
removed them
upgraded the system
reinstalled them from the previous bacman backup.

Now i'm gonna to reboot, start to worry if i don't edit this post smile

-edit-
Yay, it worked.

Last edited by kokoko3k (2013-06-03 15:51:06)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#52 2013-06-03 15:54:08

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: Binaries move to /usr/bin requiring update intervention

Scimmia wrote:

The news didn't tell you not to run "sudo rm -rf /" either.

Moderator Comment:  I realize that is meant to be sarcasm, but please never post a command like that;  Someone for whom English is not a first language could misinterpret your post and think you are offering that as a suggestion.

Thanks.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#53 2013-06-03 16:01:13

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,390

Re: Binaries move to /usr/bin requiring update intervention

@ewaller: that user could be convinced to do that because of your quote; maybe you could edit that string to make it harmless wink

Mod Edit:  I thought I had edited the OP hmm  Anyway, the OP added a warning - ewaller

Last edited by ewaller (2013-06-03 16:57:31)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#54 2013-06-03 16:16:13

shariebeth
Member
From: South Florida
Registered: 2010-04-27
Posts: 77

Re: Binaries move to /usr/bin requiring update intervention

errikosd wrote:
Scimmia wrote:

The filesystem package contains the symlinks, you're not supposed to create them yourself let alone move everything manually. Seriously, did you read the front page news?

Seriously, I did, but as far as I can see, there is no such a note there (well, there is also no note that tells that I was supposed to, but ehh)...

Anyway, my mistake, all set, thanks.

Front page news, along with the email that came, said to "fix" and "move".
"Fix" is clear as mud (as multiple people's posts show) and it seems perfectly understandable that "move" could imply to some to manually move it (especially since they are told they need to "fix" things themselves).

Last edited by shariebeth (2013-06-03 16:18:15)

Offline

#55 2013-06-03 16:20:03

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: Binaries move to /usr/bin requiring update intervention

Following this:

   # pacman -Syu --ignore filesystem,bash

    # pacman -S bash

    # pacman -Su

I got to the second one, then my terminal closed and I can't get a shell :S

Last edited by colbert (2013-06-03 16:23:14)

Offline

#56 2013-06-03 16:23:34

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Binaries move to /usr/bin requiring update intervention

colbert, so what's the output of pacman -Qo /bin /sbin /usr/sbin?

Edit after the post I replied to was edited: Did bash update? Assuming it did, you may need to use an install disk to update the filesystem package.

Last edited by Scimmia (2013-06-03 16:32:55)

Online

#57 2013-06-03 16:42:33

Thomas_Do
Member
Registered: 2011-08-12
Posts: 65

Re: Binaries move to /usr/bin requiring update intervention

I understand well that one is not supposed to move any files manually to /usr/bin.
But I am curious why that is, because after update of filesystem symbolic links are in place and the moved files could be accessed via the same path as before.
Could someone explain this, please?

Offline

#58 2013-06-03 16:49:01

tanrax
Member
Registered: 2012-08-11
Posts: 31

Re: Binaries move to /usr/bin requiring update intervention

After following the steps do not get started. I need help please tongue

https://dl.dropboxusercontent.com/u/619 … 03_001.jpg

Mod Edit:  Changed over sized in-line image to url (Also, turn off your flash tongue ) https://wiki.archlinux.org/index.php/Fo … s_and_Code

Last edited by ewaller (2013-06-03 16:55:57)

Offline

#59 2013-06-03 16:50:18

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: Binaries move to /usr/bin requiring update intervention

Thomas_Do wrote:

I understand well that one is not supposed to move any files manually to /usr/bin.
But I am curious why that is, because after update of filesystem symbolic links are in place and the moved files could be accessed via the same path as before.
Could someone explain this, please?

As people have mentioned previously, if you move them manually, then you are interfering with a job that pacman is supposed to do (managing files installed by packages). If you do move them manually, then you must, to avoid problems in the future, manually edit pacman's database of installed files for each package whose files you moved; it is much simpler if you rebuild the offending packages.

All the best,

-HG

Offline

#60 2013-06-03 16:51:02

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Binaries move to /usr/bin requiring update intervention

Thomas_Do wrote:

I understand well that one is not supposed to move any files manually to /usr/bin.
But I am curious why that is, because after update of filesystem symbolic links are in place and the moved files could be accessed via the same path as before.
Could someone explain this, please?

Pacman does parse symlinks now IIRC, but it will not in the future. If a package is supposed to be installed in /bin, pacman won't find the files in /usr/bin later.

Online

#61 2013-06-03 16:52:31

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Binaries move to /usr/bin requiring update intervention

tanrax, cd to new_root and do "ls -l" If the symlinks for /bin and /sbin aren't there, the filesystem package didn't get upgraded.

Online

#62 2013-06-03 16:52:49

Thaodan
Member
From: Dortmund, Nordrein-Westfalen
Registered: 2012-04-28
Posts: 448

Re: Binaries move to /usr/bin requiring update intervention

You need to add init=/usr/lib/systemd/systemd to GRUB_CMDLINE_LINUX_DEFAULT in /etc/grub/default and run mkinitcpio to build a new initramfs
To boot temporary add the init I posted above to the kernel boot line in your grub (there where the quit option is),


Linux odin 3.13.1-pf #1 SMP PREEMPT Wed Mar 5 21:47:28 CET 2014 x86_64 GNU/Linux

Offline

#63 2013-06-03 16:53:58

errikosd
Member
Registered: 2013-04-19
Posts: 17

Re: Binaries move to /usr/bin requiring update intervention

Scimmia wrote:
errikosd wrote:
Scimmia wrote:

The filesystem package contains the symlinks, you're not supposed to create them yourself let alone move everything manually. Seriously, did you read the front page news?

Seriously, I did, but as far as I can see, there is no such a note there (well, there is also no note that tells that I was supposed to, but ehh)...

Anyway, my mistake, all set, thanks.

The news didn't tell you not to run "sudo rm -rf /" either.

I already mentioned that myself.

Last edited by errikosd (2013-06-03 16:54:08)

Offline

#64 2013-06-03 17:25:17

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: Binaries move to /usr/bin requiring update intervention

Scimmia wrote:
Thomas_Do wrote:

I understand well that one is not supposed to move any files manually to /usr/bin.
But I am curious why that is, because after update of filesystem symbolic links are in place and the moved files could be accessed via the same path as before.
Could someone explain this, please?

Pacman does parse symlinks now IIRC, but it will not in the future. If a package is supposed to be installed in /bin, pacman won't find the files in /usr/bin later.

I have a small python script that is supposed to walk through all installed packages and move all files from usr/sbin, bin, sbin to usr/bin and update the package database. If someone wants to test it (and risk breaking their system wink ), go ahead

#!/usr/bin/python3 
# Author: ProgAndy

import os
import shutil
import glob

class PkgMover:
	def __init__(self, pkgfiles, name=None):
		self.checkdirs = []
		self.pkgfiles = pkgfiles
		self.modified = False
		self.name = name

	def movetousrbin(self, filename):
		if filename.startswith("sbin/"):
			newname="usr/bin"+filename[4:]
		elif filename.startswith("bin/"):
			newname="usr/"+filename
		elif filename.startswith("usr/sbin/"):
			newname="usr/bin"+filename[8:]
		else: #NOOP
			return filename
			
		self.modified = True	
		f="/"+filename.strip()
		n="/"+newname.strip()
	
		if (os.path.isdir(f)):
			# create new directory
			if not os.path.exists(n):
				os.makedirs(n)
			# register for deletion
			self.checkdirs.append(f)
		# do something about symlinks:
		elif (os.path.exists(n)):
			# always prefer binary over symlink
			if (os.path.islink(f) and not os.path.islink(n)):
				return "" # delete
			elif (os.path.islink(n) and not os.path.islink(f)):
				shutil.move(f, n)
			# if both are symlinks or both are binary files, 
			# remove file from package instead of move
			else:
				return ""
		else:
			shutil.move(f, n)
			# fix relative symlinks
			if (os.path.islink(n)):
				link=os.readlink(n)
				if (link.startswith("../usr/"):
					os.remove(n)
					os.symlink('..'+link[6:], n)
					
	
		return newname

	def fixpkg(self):
		# abort if package has laready been processed
		if self.modified:
			return
	
		content = None
		with open(self.pkgfiles) as f:
			content = f.readlines()
	
		# convert to new name and move in one go
		content = list(map(self.movetousrbin, content))
		
		# don't continue if nothing has been moved
		if not self.modified:
			return
		
		# remove empty directories
		self.checkdirs.sort(reverse=True)
		for d in self.checkdirs:
			# delete directory if empty
			try:
				os.rmdir(d)
			except OSError:
				pass
		
		print "Fixed " + self.name
		
		# update local package database with new locations
		with open(self.pkgfiles, "w") as f:
			f.writelines(content)



for pkg in glob.iglob("/var/lib/pacman/local/*/files"):
	mvr = PkgMover(pkg, pkg[22:-6])
	mvr.fixpkg()

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#65 2013-06-03 18:24:19

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Binaries move to /usr/bin requiring update intervention

There seems to be a little confusion about the "moving" of these files, so to clarify the language of the instructions: Replace the words "unofficial packages" with "unofficial PKGBUILDs," i.e. fix AUR PKGBUILDs (or those you wrote yourself) to point to /usr/bin instead of /bin.  Never, on any Linux system, manually move files owned by official packages, and avoid making superfluous symlinks where possible.

EDIT: Looks like HalosGhost covered my second point while I was typing the post. tongue

Last edited by ANOKNUSA (2013-06-03 18:31:36)

Offline

#66 2013-06-03 18:24:37

KejPi
Member
Registered: 2011-06-17
Posts: 40

Re: Binaries move to /usr/bin requiring update intervention

I have followed the instructions but last step failed and now nothing is working (origonally in czech language, I have tried to translate it to english):

pacman -Su
:: Staring system update...
solving dependencies..
checking internal conflicts...

Packages (1):

Name           Previous version  New version  Change (approx)

core/filesystem  2013.03-2        2013.05-2        -0,30 MiB

Total Installed Size:   0,01 MiB
Net Upgrade Size:       -0,30 MiB

:: Continue instalation? [A/n] 
(1/1) checking keys in keyring                                                                     [##########################################################] 100%
(1/1) checking package integrity                                                                   [##########################################################] 100%
(1/1) reading package                                                                              [##########################################################] 100%
(1/1) checking file conflicts                                                                      [##########################################################] 100%
(1/1) checking free space                                                                          [##########################################################] 100%

And nothing else. It is somehow stuck.

If it type anything in other shall with root login as suggested:

# /usr/bin/pacman -Ql bash
bash: /usr/bin/pacman: Directory or file does not exist
# ls /
bash: /usr/bin/ls: Directory or file does not exist

So I cannot do anything :-(

What can I do? How can I fix it? Any help please?

Offline

#67 2013-06-03 18:25:49

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Binaries move to /usr/bin requiring update intervention

KejPi wrote:

I have followed the instructions but last step failed and now nothing is working (origonally in czech language, I have tried to translate it to english):

pacman -Su
:: Staring system update...
solving dependencies..
checking internal conflicts...

Packages (1):

Name           Previous version  New version  Change (approx)

core/filesystem  2013.03-2        2013.05-2        -0,30 MiB

Total Installed Size:   0,01 MiB
Net Upgrade Size:       -0,30 MiB

:: Continue instalation? [A/n] 
(1/1) checking keys in keyring                                                                     [##########################################################] 100%
(1/1) checking package integrity                                                                   [##########################################################] 100%
(1/1) reading package                                                                              [##########################################################] 100%
(1/1) checking file conflicts                                                                      [##########################################################] 100%
(1/1) checking free space                                                                          [##########################################################] 100%

And nothing else. It is somehow stuck.

If it type anything in other shall with root login as suggested:

# /usr/bin/pacman -Ql bash
bash: /usr/bin/pacman: Directory or file does not exist
# ls /
bash: /usr/bin/ls: Directory or file does not exist

So I cannot do anything :-(

What can I do? How can I fix it? Any help please?

See this thread: https://bbs.archlinux.org/viewtopic.php?id=164458

Online

#68 2013-06-03 18:28:10

Thomas_Do
Member
Registered: 2011-08-12
Posts: 65

Re: Binaries move to /usr/bin requiring update intervention

HalosGhost wrote:
Thomas_Do wrote:

I understand well that one is not supposed to move any files manually to /usr/bin.
But I am curious why that is, because after update of filesystem symbolic links are in place and the moved files could be accessed via the same path as before.
Could someone explain this, please?

As people have mentioned previously, if you move them manually, then you are interfering with a job that pacman is supposed to do (managing files installed by packages). If you do move them manually, then you must, to avoid problems in the future, manually edit pacman's database of installed files for each package whose files you moved; it is much simpler if you rebuild the offending packages.

All the best,

-HG

Thanks for the answer.

Offline

#69 2013-06-03 18:38:32

KejPi
Member
Registered: 2011-06-17
Posts: 40

Re: Binaries move to /usr/bin requiring update intervention

Thank for the hint. It looks like that I have also missed that /boot is mounted automatically and was not mounted :-( The question is how to solve it now? I have no working terminal an do not know ho to make one working to be able to mount /boot.

Offline

#70 2013-06-03 18:51:26

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Binaries move to /usr/bin requiring update intervention

KejPi wrote:

Thank for the hint. It looks like that I have also missed that /boot is mounted automatically and was not mounted :-( The question is how to solve it now? I have no working terminal an do not know ho to make one working to be able to mount /boot.

Hmm, ask graph how he got one. If nothing else, you can always boot from the install media.

Online

#71 2013-06-03 19:13:59

KejPi
Member
Registered: 2011-06-17
Posts: 40

Re: Binaries move to /usr/bin requiring update intervention

Thanks! The trick was to send several Ctrl+C's to pacman and when it finished there was the one working shell where I could mount /boot.

Offline

#72 2013-06-03 23:05:15

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: Binaries move to /usr/bin requiring update intervention

I just want to clarify something.

In order to update, I removed two packages. One is from AUR. One I can find nowhere right now so it must have disappeared altogether. I then removed a few stray files.

Everything proceeded fine.

Now, I was wondering what was wrong with simply reinstalling the AUR package as is. That is, since symlinks are in place, I assume that it would simply install its files to, say, /bin and that would effectively put them in /usr/bin. Since the symlinks are in place, anything relying on them being in /bin would still find them.

If I understand the discussion correctly, the reason not to do this is that although this would work for now, it will mess things up in the future because pacman will stop traversing symlinks at some point. I would just like to understand why. What is the problem with packages that think they are installing in, say, /bin so long as the symlinks are there and working?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#73 2013-06-04 00:10:38

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Binaries move to /usr/bin requiring update intervention

cfr wrote:

If I understand the discussion correctly, the reason not to do this is that although this would work for now, it will mess things up in the future because pacman will stop traversing symlinks at some point. I would just like to understand why. What is the problem with packages that think they are installing in, say, /bin so long as the symlinks are there and working?

Link to mailing list: https://mailman.archlinux.org/pipermail … 16488.html

Online

#74 2013-06-04 01:57:22

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: Binaries move to /usr/bin requiring update intervention

Thanks, Scimmia. I have to admit to not really understanding it but it gives me a sort of general sense of why.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#75 2013-06-04 06:27:39

kriz
Member
Registered: 2009-06-29
Posts: 96

Re: Binaries move to /usr/bin requiring update intervention

paclist aur | awk ' { print $1 } ' | pacman -Ql - | grep ' /s\?bin/\| /usr/sbin/' > list.txt
error: repository "aur" was not found.

how can i check my aur built packages?


„Je verdinglichter die Welt, je dichter das Netz, das der Natur überworfen wurde, desto mehr beansprucht ideologisch das Denken, das jenes Netz spinnt, seinerseits Natur, Urerfahrung zu sein." Theodor W. Adorno [aus: Wozu noch Philosopie]

Offline

Board footer

Powered by FluxBB