You are not logged in.
I am trying build arch linux package with PKGBUILD. I have downloaded binaries and places them in usr/ and etc/ in same dir as PKGBUILD , here is my PKGBUILD file
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Your Name <youremail@domain.com>
pkgname='mariadb-bin'
pkgver=10.3.7
pkgrel=1
pkgdesc="lastat stable MariaDB "
arch=('x86_64')
url="http://mirror.truenetwork.ru/mariadb/"
license=('GPL')
groups=()
depends=()
makedepends=()
checkdepends=()
optdepends=()
provides=("mariadb=${pkgver}")
conflicts=('mariadb')
replaces=()
backup=('etc/mysql/my.cnf',
'etc/mysql/wsrep.cnf')
options=()
install=mariadb-bin.install
changelog=
source=()
noextract=()
md5sums=()
validpgpkeys=()
prepare() {
echo "I am prepare fn";
pwd
}
build() {
echo "I am buid fn ";
pwd
}
check() {
echo "I am check fn";
pwd
}
package() {
echo "I am package fn";
cp ../usr ${pkgdir} -r
cp ../etc ${pkgdir} -r
pwd
cd ${pkgdir}
find ${pkgdir}/ -name *.so -exec chmod 777 {} \;
chmod 755 ${pkgdir}/usr/bin/*
}when I try to install the ceated package I get following :-
% sudo pacman -U mariadb-bin-10.3.7-1-x86_64.pkg.tar :(
loading packages...
resolving dependencies...
looking for conflicting packages...
Packages (1) mariadb-bin-10.3.7-1
Total Installed Size: 539.71 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [########################################] 100%
(1/1) checking package integrity [########################################] 100%
(1/1) loading package files [########################################] 100%
(1/1) checking for file conflicts [########################################] 100%
error: failed to commit transaction (conflicting files)
mariadb-bin: /usr/lib64 exists in filesystem (owned by filesystem)
mariadb-bin: /usr/sbin exists in filesystem (owned by filesystem)
Errors occurred, no packages were upgraded.what should I do ? where I am going wrong ?
Offline
You have to fix the file locations. Nothing can be in /usr/li64 or in /usr/sbin.
Offline
Have you tried using the package from the official repositories?
pacman -S mariadbEdit: This is probably a terrible reply but I was just wondering if it was a pkgbuild problem.
Last edited by CPlusPandaGives (2018-06-07 14:39:43)
Offline
Have you tried using the package from the official repositories?
pacman -S mariadb
I can do that but want to build my own package so I can learn how to make packages . Also packages in ropos is outdated
Offline
I can do that but want to build my own package so I can learn how to make packages.
This is not a good way to go about that - eveything about this is quite artificial: packages generally download content into srcdir and install it to pkgdir from there, you've placed the binaries and libs already and you are just using a PKGBUILD to copy them. This might make a package, but it is not a good way to learn about packaging.
Instead, that the PKGBUILD for mariadb in the repos, and modify it to get the most recent version.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Offline