LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   All owner:group set to 4015:4015 on Slackware trees from 13.37 through current?? (https://www.linuxquestions.org/questions/slackware-14/all-owner-group-set-to-4015-4015-on-slackware-trees-from-13-37-through-current-4175480223/)

Didier Spaier 10-09-2013 09:47 PM

All owner:group set to 4015:4015 on Slackware trees from 13.37 through current??
 
For slint I maintain local mirrors of 13.37, 14.0 and current in 32 and 64 bit versions. I just ran following script and now have all files' owner:group set to 4015:4015 in all trees.

What can have happened, locally or remotely?

Code:

bash-4.2# cat maj.sh
#!/bin/bash
rsync -avzPH --del rsync://slackware.mirrors.tds.net/slackware/slackware-13.37 /media/versions
echo "maj 13.37 terminée."
rsync -avzPH --del rsync://slackware.mirrors.tds.net/slackware/slackware64-13.37 /media/versions
echo "maj 64-13.37 terminée."
rsync -avzPH --del rsync://slackware.mirrors.tds.net/slackware/slackware-14.0 /media/versions
echo "maj 14.0 terminée."
rsync -avzPH --del rsync://slackware.mirrors.tds.net/slackware/slackware64-14.0 /media/versions
echo "maj 64-14.0 terminée."
rsync -avzPH --del rsync://ftp.slackware.com/slackware/slackware-current /media/versions
echo "maj current terminée."
rsync -avzPH --del rsync://ftp.slackware.com/slackware/slackware64-current /media/versions
echo "maj 64-current terminée."
bash-4.2#

And the mirror list is empty on http://mirrors.slackware.com/mirrorlist/

willysr 10-09-2013 09:53 PM

the mirror list is empty since it was recently rebuilt from scratch due to hard drive failure and i guess Robby is still working on other thing, but it will be fixed soon :)

Didier Spaier 10-09-2013 09:57 PM

Quote:

Originally Posted by willysr (Post 5043151)
the mirror list is empty since it was recently rebuilt from scratch due to hard drive failure and i guess Robby is still working on other thing, but it will be fixed soon :)

Thanks for the info, Willy.

jtsn 10-09-2013 11:12 PM

Quote:

Originally Posted by Didier Spaier (Post 5043147)
For slint I maintain local mirrors of 13.37, 14.0 and current in 32 and 64 bit versions. I just ran following script and now have all files' user:group set to 4015:4015 in all trees.

Use -rlpt instead of -a. Also instead of calling rsync multiple times (increasing server load) you can use multiple sources with one rsync call:

Code:

#!/bin/sh
MIRROR=slackware.mirrors.tds.net
SOURCES=${MIRROR}
TARGET=/media/versions

for VERSION in 12.1 12.2
do
        SOURCES="${SOURCES}::slackware/slackware-${VERSION} "
done
for VERSION in 13.0 13.1 13.37 14.0
do
        SOURCES="${SOURCES}::slackware/slackware-${VERSION} "
        SOURCES="${SOURCES}::slackware/slackware64-${VERSION} "
done

rsync -rlpt --delete -P ${SOURCES} ${TARGET}


Didier Spaier 10-10-2013 03:51 AM

It worked, thanks jtsn.

I just kept the -H option to preserve hard links.

GazL 10-10-2013 04:04 AM

I run my rsync as a non-root user specifically created for the purpose, so everything ends up being owned by my local user rather than some arbitrary foreign UID:GID

Didier Spaier 10-10-2013 04:52 AM

Quote:

Originally Posted by GazL (Post 5043290)
I run my rsync as a non-root user specifically created for the purpose, so everything ends up being owned by my local user rather than some arbitrary foreign UID:GID

Yes, omitting -og will allow that.

jtsn 10-10-2013 12:24 PM

Quote:

Originally Posted by Didier Spaier (Post 5043283)
I just kept the -H option to preserve hard links.

Are there hard links on the mirrors?

Didier Spaier 10-10-2013 12:42 PM

Quote:

Originally Posted by jtsn (Post 5043509)
Are there hard links on the mirrors?

Yes, here is an example (mirrored from USOSL):
Code:

bash-4.2$ ls -l /media/versions/slackware{,64}-current/usb-and-pxe-installers/
/media/versions/slackware-current/usb-and-pxe-installers/:
total 50096
-rw-r--r-- 2 didier users    31203 mars  21  2011 README_PXE.TXT
-rw-r--r-- 2 didier users    9197 sept. 25 06:33 README_USB.TXT
drwxr-xr-x 2 didier users    4096 juin  26  2007 etherboot
-rw-r--r-- 1 didier users      882 mars  27  2013 pxelinux.cfg_default
-rw-r--r-- 1 didier users 51225600 oct.  2 04:36 usbboot.img
-rw-r--r-- 2 didier users    15697 sept. 25 07:14 usbimg2disk.sh

/media/versions/slackware64-current/usb-and-pxe-installers/:
total 37068
-rw-r--r-- 2 didier users    31203 mars  21  2011 README_PXE.TXT
-rw-r--r-- 2 didier users    9197 sept. 25 06:33 README_USB.TXT
-rw-r--r-- 1 didier users      574 mars  27  2013 pxelinux.cfg_default
-rw-r--r-- 1 didier users 37889024 oct.  2 03:02 usbboot.img
-rw-r--r-- 2 didier users    15697 sept. 25 07:14 usbimg2disk.sh
bash-4.2$

EDIT and there was a hard link in slackware64-current between /isolinux/initrd.img and /EFI/BOOT/initrd.img before the "grubification" of /EFI/BOOT.

Alien Bob 10-10-2013 01:03 PM

Only a "ls -i" will show whether there are hard links: The two files' inode numbers will have to be identical.

Eric

Didier Spaier 10-10-2013 01:08 PM

Code:

bash-4.2$ ls -li /media/versions/slackware{,64}-current/usb-and-pxe-installers/
/media/versions/slackware-current/usb-and-pxe-installers/:
total 50096
33822333 -rw-r--r-- 2 didier users    31203 mars  21  2011 README_PXE.TXT
33823360 -rw-r--r-- 2 didier users    9197 sept. 25 06:33 README_USB.TXT
33822315 drwxr-xr-x 2 didier users    4096 juin  26  2007 etherboot
33822336 -rw-r--r-- 1 didier users      882 mars  27  2013 pxelinux.cfg_default
33822756 -rw-r--r-- 1 didier users 51225600 oct.  2 04:36 usbboot.img
33823417 -rw-r--r-- 2 didier users    15697 sept. 25 07:14 usbimg2disk.sh

/media/versions/slackware64-current/usb-and-pxe-installers/:
total 37068
33822333 -rw-r--r-- 2 didier users    31203 mars  21  2011 README_PXE.TXT
33823360 -rw-r--r-- 2 didier users    9197 sept. 25 06:33 README_USB.TXT
17439012 -rw-r--r-- 1 didier users      574 mars  27  2013 pxelinux.cfg_default
17432645 -rw-r--r-- 1 didier users 37889024 oct.  2 03:02 usbboot.img
33823417 -rw-r--r-- 2 didier users    15697 sept. 25 07:14 usbimg2disk.sh
bash-4.2$

The '2' before the owner shows that it's a hard link too (PV told me, so that _should_be_true_ :-)

PS Eric, though that was not intentional, stuff in that example are mostly your work. Thanks ;)

Alien Bob 10-10-2013 02:35 PM

Ah, indeed.


All times are GMT -5. The time now is 06:35 AM.