You are not logged in.
here is my PKGBUILD file:
pkgname=my_pkg
pkgver=0.01
pkgrel=1
pkgdesc="mypkg"
arch=(any)
license=('unknown')
depends=(
'python'
)
makedepends=(
'git'
)
install='my_pkg.install'
source=('my_pkg.py'
'my_pkg.service'
'my_pkg.sysusers'
)
package() {
mkdir -p ${pkgdir}/opt/my_pkg
cp -r $srcdir/* $pkgdir/opt/my_pkg
install -Dm644 "$srcdir/my_pkg.service" "${pkgdir}/etc/systemd/system/my_pkg.service"
install -Dm644 "$srcdir/my_pkg.sysusers" "$pkgdir/usr/lib/sysusers.d/my_pkg.conf"
}
in the final tar.xz package file , the files copied via the 'cp' command in package() function are all symlinks. why and how to solve it ?
Last edited by socialloser1 (2017-05-21 01:59:39)
Offline
Whats the output of ...
ls -l
when your in the directory containing your PKGBUILD and source files?
Offline
drwxr-xr-x 5 user user 4.0K May 21 08:30 ./
drwxr-xr-x 12 user user 4.0K May 21 08:01 ../
-rw-r--r-- 1 user user 295 May 21 08:13 init.sql
-rw-r--r-- 1 user user 974 May 21 08:13 manual_test.py
-rw-r--r-- 1 user user 2.5K May 21 08:13 pkglib.py
lrwxrwxrwx 1 user user 58 May 21 08:13 pkg_server-0.01-1-any.pkg.tar.xz -> /home/user/build/packages/pkg_server-0.01-1-any.pkg.tar.xz
-rw-r--r-- 1 user user 93 May 20 19:42 pkg_server.install
-rw-r--r-- 1 user user 2.5K May 21 08:13 pkg_server.py
-rw-r--r-- 1 user user 236 May 21 08:13 pkg_server.service
-rw-r--r-- 1 user user 27 May 21 08:13 pkg_server.sysusers
drwxr-xr-x 3 user user 4.0K May 21 08:16 pkg/
-rw-r--r-- 1 user user 928 May 21 08:16 PKGBUILD
drwxr-xr-x 2 user user 4.0K May 20 18:44 __pycache__/
drwxr-xr-x 2 user user 4.0K May 21 08:16 src/
-rw-r--r-- 1 user user 268 May 19 16:33 test.sql
all original files , no symlinks. the only link in the list is a link to the final pkg.tar.xz file cause I configured the $pkgdir to other location.
Last edited by socialloser1 (2017-05-21 01:25:34)
Offline
Offline
I don't see any filenames in that output.
sorry , now it shows. by the way, my default shell is fish, don't know if that matters or not.
Last edited by socialloser1 (2017-05-21 01:27:16)
Offline
Makepkg symlinks the source files into $srcdir. Using cp -r copies symlinks instead of dereferencing them.
Offline
Makepkg symlinks the source files into $srcdir. Using cp -r copies symlinks instead of dereferencing them.
thanks, I added a '-L' to the cp command , now it works.
Last edited by socialloser1 (2017-05-21 02:26:24)
Offline
You can also use the install command with a glob. You'd probably want to use the "-t DIRECTORY" format.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
You can also use the install command with a glob. You'd probably want to use the "-t DIRECTORY" format.
thank you for the tip
Offline