You are not logged in.
I make a package to install my configs files with pacman. Someone files are install in my home folder (like openbox configs), but when i install this with pacman, files change permission to root.
I try make a install file with command chown in post_install, but still don't work.
How make files install in home don't change group and ower to root?
My pkg
pkgname=myconfigs
pkgver=08.09.29
pkgrel=1
pkgdesc="My configs"
arch=('i686' 'x86_64')
license=('GPL')
makedepends=('pkgconfig')
install=myconfigs.install
source=(Configs.tar.gz)
build() {
cd ${srcdir}/Configs/
cp -HR ${srcdir}/Configs/* ${startdir}/pkg/ || return 1
}My install:
pre_install() {
#Add user
gpasswd -a myuser users
gpasswd -a myuser audio
gpasswd -a myuser video
gpasswd -a myuser floppy
gpasswd -a myuser optical
gpasswd -a myuser storage
gpasswd -a myuser power
gpasswd -a myuser network
#Shortcuts
chmod -c +s /sbin/shutdown
ln -sf /sbin/shutdown /usr/bin/shutdown
ln -sf /dev/null /root/.bash_history
ln -sf /dev/null /home/MyHome/.bash_history
ln -sf /dev/null /home/MyHome/.fbrun_history
ln -sf /dev/null /home/MyHome/.recently-used.xbel
#Update clock
ntpdate ntp.usp.br
}
op=$1
shift
$op $*Last edited by kramerxiita (2008-10-01 11:10:12)
Offline
How make files install in home don't change group and ower to root?
you should use install instead of cp for installing the files.
With the -m flag of install you can set the permissions, with the -o flag the ownership of the files.
Offline
Error: install: omiting directory ...
How to make install copy folders?
Offline
Error: install: omiting directory ...
How to make install copy folders?
if you want to install all files into a specific folder you need to create a folder, you need first to create the directory with something like (guess you can also specify ownership if you need)
install -d $pkgdir/path/to/folder || return 1If you just want to copy a single file, you can do something like (add ownership if you need it)
install -Dm644 $srcdir/path/to/file $pkgdir/path/to/new/location || return 1Please take a look at the manpage if you need more information.
Last edited by pressh (2008-09-30 19:22:06)
Offline
Thanks, pressh.
Offline