prova a dare i comandi a manoulisse89 ha scritto:Ho appena provato lo fa anche con tgz.
xz e tar intendo
Moderatore: Staff

prova a dare i comandi a manoulisse89 ha scritto:Ho appena provato lo fa anche con tgz.


no, correggoconraid ha scritto:ho provato
è tar che fa questa cosa



ulisse89 ha scritto:Mi sono corretto: cambia proprietario e gruppo di appartenenza del file no? Anche a te succede così?
Codice: Seleziona tutto
# ls -l
totale 4,0K
drwxrwxrwx 2 conraid users 4,0K 2009-11-06 18:00 xz
# cd xz
# ls -l
totale 1,7M
-rw-r--r-- 1 conraid users 1,7M 2008-11-21 03:20 alpine-2.00-i486-1.txz
-rw-r--r-- 1 root root 427 2009-11-06 17:49 prova.tgz
# tar -xvf alpine-2.00-i486-1.txz
./
usr/
usr/doc/
usr/doc/pinepgp-0.18.0/
usr/doc/pinepgp-0.18.0/README
usr/doc/pinepgp-0.18.0/COPYING
usr/doc/alpine-2.00/
usr/doc/alpine-2.00/README
usr/doc/alpine-2.00/LICENSE
usr/doc/alpine-2.00/VERSION
usr/doc/alpine-2.00/tech-notes.txt.gz
usr/doc/alpine-2.00/NOTICE
usr/doc/alpine-2.00/mailcap.unx
usr/doc/alpine-2.00/mime.types
usr/doc/alpine-2.00/brochure.txt
usr/share/
usr/bin/
usr/bin/alpine
usr/bin/rpdump
usr/bin/pinepgpgpg-install
usr/bin/pico
usr/bin/pilot
usr/bin/rpload
usr/bin/pinegpg
usr/man/
usr/man/man1/
usr/man/man1/rpdump.1.gz
usr/man/man1/pilot.1.gz
usr/man/man1/pico.1.gz
usr/man/man1/alpine.1.gz
usr/man/man1/rpload.1.gz
etc/
etc/pine.conf.new
install/
install/slack-desc
install/doinst.sh
# ls -l
totale 1,7M
-rw-r--r-- 1 conraid users 1,7M 2008-11-21 03:20 alpine-2.00-i486-1.txz
drwxr-xr-x 2 root root 4,0K 2008-11-21 03:20 etc
drwxr-xr-x 2 root root 4,0K 2008-11-21 03:20 install
-rw-r--r-- 1 root root 427 2009-11-06 17:49 prova.tgz
drwxr-xr-x 6 root root 4,0K 2008-11-21 03:20 usr
# cd ..
# ls -l
totale 4,0K
drwxr-xr-x 5 root root 4,0K 2009-11-06 18:01 xz
Codice: Seleziona tutto
# chmod 777 xz
# chown conraid:users xz
# ls -l
totale 4,0K
drwxrwxrwx 5 conraid users 4,0K 2009-11-06 18:01 xz
# cd xz
# cd ..
# ls -l
totale 4,0K
drwxrwxrwx 5 conraid users 4,0K 2009-11-06 18:04 xz
# tar -xvf prova.tgz
test.sh
test.sh~
no, prova solamente con tar, senza usare explodepkg e guardaulisse89 ha scritto:Allora l'errore dev'essere nello script di explodepkg e io l'unica cosa che vedo inerente a permessi di file etc è il comando `umask 000` alla fine.

Codice: Seleziona tutto
$ ls -al
drwxr-xr-x 2 raffaele users 4096 2009-11-06 18:39 ./
drwxr-xr-x 6 raffaele users 4096 2009-11-06 18:37 ../
-rw-r--r-- 1 raffaele users 343002 2009-11-06 18:37 kmix.tar.lzma
$ su
# tar xzf kmix.tar.lzma
# ls -al
drwxr-xr-x 3 raffaele users 4096 2009-11-06 18:40 .
drwxr-xr-x 6 raffaele users 4096 2009-11-06 18:37 ..
drwxr-xr-x 8 raffaele users 4096 2009-11-02 19:51 kmix
-rw-r--r-- 1 raffaele users 343002 2009-11-06 18:37 kmix.tar.lzma
Codice: Seleziona tutto
# tar -xvf alpine-2.00-i486-1.txz
./
usr/
usr/doc/
... eccetera ...

Codice: Seleziona tutto
$ mkdir test
$ touch test/prova.txt
$ tar cf archivio.tar test
$ tar tvf archivio.tar
drwxr-xr-x raffaele/users 0 2009-11-06 19:18 test/
-rw-r--r-- raffaele/users 0 2009-11-06 19:18 test/prova.txt
$ cd test/
$ tar cf ../archivio.tar .
$ tar tvf ../archivio.tar
drwxr-xr-x raffaele/users 0 2009-11-06 19:18 ./
-rw-r--r-- raffaele/users 0 2009-11-06 19:18 ./prova.txt

Identico comportamento sulla mia slackware. Ho fatto le stesse tue prove.se faccio la stessa cosa con un tgz creato da me con "tar czf " i permessi rimangono invariati
non penso sia un comportamento corretto

chi me lo spiega?Well, I'm not really sure that I follow your "test". You don't
actually show using tar czf, or using explodepkg. However, it is
normal for a package to change the permissions of every included
directory. That means "/", too, so you have to be sure that all the
directories in the package have the correct perms/ownership.


Codice: Seleziona tutto
bash-3.1$ mkdir -p foo/bar
bash-3.1$ cd foo
bash-3.1$ su
bash-3.1# chown -R root:root .
bash-3.1# tar cvf ../archive.tar .
./
./bar
bash-3.1# cd ..
bash-3.1# ls -ld .
drwxr-xr-x 3 raffaele users 4096 2009-11-06 20:16 .
bash-3.1# tar xf archive.tar
bash-3.1# ls -ld .
drwxr-xr-x 4 root root 4096 2009-11-06 20:16 .

