You are not logged in.

#1 2018-06-07 14:35:53

nooneSQL
Member
Registered: 2018-06-07
Posts: 3

exists in filesystem (owned by filesystem) in PKGBUILD

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

#2 2018-06-07 14:36:59

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: exists in filesystem (owned by filesystem) in PKGBUILD

You have to fix the file locations. Nothing can be in /usr/li64 or in /usr/sbin.

Offline

#3 2018-06-07 14:37:57

CPlusPandaGives
Member
From: United Kingdom
Registered: 2017-03-07
Posts: 11

Re: exists in filesystem (owned by filesystem) in PKGBUILD

Have you tried using the package from the official repositories?

pacman -S mariadb

Edit: 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

#4 2018-06-07 14:40:49

nooneSQL
Member
Registered: 2018-06-07
Posts: 3

Re: exists in filesystem (owned by filesystem) in PKGBUILD

CPlusPandaGives wrote:

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

#5 2018-06-07 15:02:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: exists in filesystem (owned by filesystem) in PKGBUILD

nooneSQL wrote:

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

#6 2018-06-07 15:18:10

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: exists in filesystem (owned by filesystem) in PKGBUILD

Offline

Board footer

Powered by FluxBB