Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] rsync link error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 688
Location: USA

PostPosted: Thu Jul 19, 2018 3:11 pm    Post subject: [SOLVED] rsync link error Reply with quote

Today
Code:
# emaint sync -a
produced this error
Code:
rsync: link "/usr/portage/.tmp-unverified-download-quarantine/app-admin/ansible/Manifest" => /usr/portage/app-admin/ansible/Manifest failed: Operation not permitted (1)
and 26,844 other, similar, messages for other packages.

Any debugging hints would be gratefully received.

[SOLVED] Thanks go to fedeliallalinea who pointed out that eselect news read 45 has the solution. I added the suggested line to my /etc/repos.conf/gentoo.conf and the sync works normally now. [/SOLVED]


Last edited by cfgauss on Thu Jul 19, 2018 3:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30895
Location: here

PostPosted: Thu Jul 19, 2018 3:37 pm    Post subject: Reply with quote

Can be related?
Code:
$ eselect news read 45
2018-07-11-portage-sync-allow-hardlinks
  Title                     Portage rsync hardlink support
  Author                    Zac Medico <zmedico@gentoo.org>
  Posted                    2018-07-11
  Revision                  1

For users of the rsync tree, beginning with sys-apps/portage-2.3.42,
the default behavior for sync operations will use hardlinks in order
to ensure that a repository remains in a valid state if something
goes wrong [1]. For example, if signature verification fails during a
sync operation, the new hardlink behavior will preserve the previous
state of the repository.

The new behavior may conflict with configurations that restrict the
use of hardlinks, such as overlay filesystems. Therefore, users will
have to set "sync-allow-hardlinks = no" in repos.conf if they have
a configuration that restricts the use of hardlinks, but this should
not be very common:

[DEFAULT]
sync-allow-hardlinks = no

Note that it is possible to sync more efficiently using git [2]
instead of rsync, though git consumes an increasing amount of disk
space over time unless shallow pull is enabled via the sync-depth
option in repos.conf [3] (requires sys-apps/portage-2.3.42 or later).

[1] https://bugs.gentoo.org/660410 sys-apps/portage: use rsync
    --link-dest to implement atomic repository updates (and abort if
    signature verification fails)
[2] https://wiki.gentoo.org/wiki/Portage_Security#git-mirror_repo
[3] https://bugs.gentoo.org/552814 sys-apps/portage: support shallow
    git pull by setting sync-depth = 1 in repos.conf

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1247
Location: Edinburgh, UK

PostPosted: Fri Jul 20, 2018 9:29 pm    Post subject: Reply with quote

I know you've already marked this SOLVED so I'm sorry for the threadjack, but did you establish why hardlinking was not permitted?

I got the same occurrence on my last sync and my $PORTDIR is 100% vanilla, default setup on a standard Ext4 root partition. Seems like it might merit a bug report.
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 688
Location: USA

PostPosted: Sat Jul 21, 2018 12:08 am    Post subject: Reply with quote

Havin_it wrote:
I know you've already marked this SOLVED so I'm sorry for the threadjack, but did you establish why hardlinking was not permitted?

I didn't. I simply observed that the suggested configuration change solved my particular problem. Perhaps someone else could provide more insight.
Back to top
View user's profile Send private message
yzg
Guru
Guru


Joined: 18 Jun 2005
Posts: 493

PostPosted: Sat Jul 21, 2018 6:55 am    Post subject: Reply with quote

@Havin_it, do you intend to file a bug report?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30895
Location: here

PostPosted: Sat Jul 21, 2018 7:46 am    Post subject: Reply with quote

Havin_it wrote:
I know you've already marked this SOLVED so I'm sorry for the threadjack, but did you establish why hardlinking was not permitted?

I got the same occurrence on my last sync and my $PORTDIR is 100% vanilla, default setup on a standard Ext4 root partition. Seems like it might merit a bug report.

This is strange, this error should appear when a fs not support hard link
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1247
Location: Edinburgh, UK

PostPosted: Sat Jul 21, 2018 3:18 pm    Post subject: Reply with quote

yzg wrote:
@Havin_it, do you intend to file a bug report?


I'd like to see if I can work out what the issue may be before doing so (hence enquiring here, plus I'll try to investigate myself a bit). The last report I made on bgo was a bit dumb so I'm not looking to make my karma any worse :wink:
Back to top
View user's profile Send private message
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1247
Location: Edinburgh, UK

PostPosted: Sat Jul 21, 2018 3:40 pm    Post subject: Reply with quote

One non-standard thing I guess is that I'm syncing from a local server, not upstream. I've also got rsync-verification disabled on both machines because it was proving slow and buggy.

One curious thing I noticed is there are a mix of ownership between portage:portage and root:root (can't see a pattern). Shouldn't everything be portage:portage?
Back to top
View user's profile Send private message
colo-des
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2011
Posts: 97

PostPosted: Sun Jul 22, 2018 7:29 am    Post subject: Reply with quote

Havin_it wrote:
One non-standard thing I guess is that I'm syncing from a local server, not upstream. I've also got rsync-verification disabled on both machines because it was proving slow and buggy.

One curious thing I noticed is there are a mix of ownership between portage:portage and root:root (can't see a pattern). Shouldn't everything be portage:portage?


Hoo yes, that's the solution, I just put all the files and folders to the user and group portage and he did not give me those messages anymore.

# cd /usr
# chown -R portage:portage portage

I still do not understand why some files come with user and group root.

Thanks for giving this clue.
Back to top
View user's profile Send private message
yzg
Guru
Guru


Joined: 18 Jun 2005
Posts: 493

PostPosted: Sun Jul 22, 2018 8:22 am    Post subject: Reply with quote

@Havin_it, I have the exact setup: syncing from a local server and rsync-verification disabled.

On the server syncing from upstream, I do not see the error but I see it on the computer syncing locally.

I tried to change the owner on everything under /usr/portage to portage:portage on the server and the local computer but this did not fix the problem.

The setting "sync-allow-hardlinks = no" fixed the error but it does not make sense.
Back to top
View user's profile Send private message
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1247
Location: Edinburgh, UK

PostPosted: Sun Jul 22, 2018 12:50 pm    Post subject: Reply with quote

yzg wrote:
@Havin_it, I have the exact setup: syncing from a local server and rsync-verification disabled.

On the server syncing from upstream, I do not see the error but I see it on the computer syncing locally.

I tried to change the owner on everything under /usr/portage to portage:portage on the server and the local computer but this did not fix the problem.

The setting "sync-allow-hardlinks = no" fixed the error but it does not make sense.


I just chown'd my client box's PORTDIR and did a sync with no issues, however afterwards there were lots of root-owned files again. The server had no root-owned files (apart from in /packages dir), however it was running an older portage. I've just updated it and have a feeling I'll see the same there after next sync.

So this issue seems to be that sync is failing to set ownership of the sync'd files, which causes problems on the subsequent run. That seems bug-worthy.

BTW I am still using the command "emerge --sync" rather than "emaint sync -a", does this matter?
Back to top
View user's profile Send private message
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1247
Location: Edinburgh, UK

PostPosted: Sun Jul 22, 2018 9:41 pm    Post subject: Reply with quote

Bug report
Back to top
View user's profile Send private message
pickd.mask
n00b
n00b


Joined: 02 Aug 2011
Posts: 28

PostPosted: Mon Jul 30, 2018 9:16 pm    Post subject: Reply with quote

colo-des wrote:

# cd /usr
# chown -R portage:portage portage

Thanks for giving this clue.


This one helped me. Thanks a lot :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
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