View previous topic :: View next topic |
Author |
Message |
poolshrk n00b
Joined: 26 Apr 2007 Posts: 21
|
Posted: Sat Dec 16, 2017 2:05 am Post subject: [solved] Portage syncing on its own? How to disable? |
|
|
Hi, I have multiple computers so instead of syncing portage on each one I manually mount /usr/portage as an nfs/sshfs file system.
Recently however I have noticed that all of my computers seem to be automatically syncing portage on their own. This is very annoying. Why/how is this happening and how can I stop it?
Last edited by poolshrk on Sun Dec 17, 2017 12:07 am; edited 2 times in total |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Sat Dec 16, 2017 2:15 am Post subject: |
|
|
Were these fresh installs or did you inherit these computers? My machines do not automatically sync.
Check your crontabs and ensure you or previous owner hadn't automated it. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
poolshrk n00b
Joined: 26 Apr 2007 Posts: 21
|
Posted: Sat Dec 16, 2017 2:22 am Post subject: |
|
|
Thanks for the suggestion.
I briefly checked out the crontabs and didn't see anything. It's possible I accidentally synced the wrong computer (multiple times) but it seems to be happening so often and on multiple different computers that it seems unlikely.
I'll look into it more in depth when I get some free time, but though I would ask here first just in case it could save me some time. Thanks again. |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3134
|
Posted: Sat Dec 16, 2017 1:22 pm Post subject: |
|
|
ps auxwf will print all processes stacked as a tree for your convenience.
You can find the trigger there, unless it's fire, fork and forget sort of trigger that exists immediately, making PID 1 the parent of its orphaned subprocess.
Perhaps running it from cron (or even in a loop in a terminal) would help you nail it.
Also, grep produces different exit codes when it finds a string you're looking for than when it fails, so you have an easy way to find whether or not a particular dump from ps contains the process you're looking for (hint: grep -B7 -A2 -E '[s]ync' ) |
|
Back to top |
|
|
limn l33t
Joined: 13 May 2005 Posts: 997
|
Posted: Sat Dec 16, 2017 1:33 pm Post subject: |
|
|
Do you see
Code: | 1513427085: *** emerge --sync |
in the /var/log/emerge.log on all of the boxes? |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
poolshrk n00b
Joined: 26 Apr 2007 Posts: 21
|
Posted: Sat Dec 16, 2017 6:45 pm Post subject: |
|
|
Hmmm...
I may have found it. The other day I installed lynis (security auditing tool) just to check it out, and I just noticed it automatically installed a crontab in cron.daily:
Code: |
#!/bin/sh
/usr/sbin/lynis --checkall --auditor "automated" --cronjob
|
in the lynis log file I found this:
Code: |
2017-12-16 11:10:13 Performing test ID PKGS-7393 (Check for Gentoo vulnerable packages)
2017-12-16 11:10:13 Action: updating portage with emerge-webrsync
2017-12-16 11:10:38 Result: emerge-webrsync finished
2017-12-16 11:10:38 Test: checking if /usr/bin/glsa-check exists
2017-12-16 11:10:38 Result: found /usr/bin/glsa-check
2017-12-16 11:10:38 Test: checking if there are any vulnerable packages
|
So that appears to be the issue?
Thanks everyone. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Sat Dec 16, 2017 7:06 pm Post subject: |
|
|
Sounds right. I guess all these things are elective after all; I'm not a lynis user. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
poolshrk n00b
Joined: 26 Apr 2007 Posts: 21
|
Posted: Sun Dec 17, 2017 12:06 am Post subject: |
|
|
For others who may run across this issue, it looks like you can disable it by creating the file
/etc/lynis/custom.prf
with the following configuration option
Code: |
refresh-repositories=no
|
|
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sun Dec 17, 2017 8:48 pm Post subject: |
|
|
FWIW the correct way to check only for GLSAs (which I'm guessing this software is supposed to do but messed up) is "emaint sync --sync-submodule glsa". |
|
Back to top |
|
|
|