You are not logged in.
Hey Guys,
i'm going to upload my first pkgbuilds. Would be nice if someone can review them first
I have two pkgbuilds for vdo and its kernel-modules (see https://github.com/dm-vdo/vdo and https://access.redhat.com/documentation … uick-start
vdo:
# Maintainer: zapp-brannigan (fuerst.reinje@web.de)
pkgname=vdo
pkgrel=1
pkgver=6.2.0.197
pkgdesc='Userspace tools for managing VDO volumes'
arch=('x86_64')
url="https://github.com/dm-vdo/vdo"
license=('GPL2')
depends=('kvdo' 'python' 'device-mapper')
source=("$pkgname-$pkgver.tar.gz::https://github.com/dm-vdo/vdo/archive/$pkgver.tar.gz")
sha256sums=('2ca31bfbf5aa960395a9b5b2e56745e6387b4934adfb8d2f06a525564d835a70')
build() {
cd "$pkgname-$pkgver"
make
}
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir" \
unitdir=/usr/lib/systemd/system \
presetdir=/usr/lib/systemd/system-preset \
mandir=/usr/share/man \
install
}
and the kernel-modules:
# Maintainer: zapp-brannigan (fuerst.reinje@web.de)
_pkgname=kvdo
pkgname=kvdo-dkms
pkgrel=1
pkgver=6.2.0.197
pkgdesc='A pair of kernel modules which provide pools of deduplicated and/or compressed block storage'
arch=('x86_64')
url="https://github.com/dm-vdo/kvdo"
license=('GPL2')
provides=('kvdo')
source=("$_pkgname-$pkgver.tar.gz::https://github.com/dm-vdo/kvdo/archive/$pkgver.tar.gz"
"dkms.conf")
sha256sums=('a477561b695ab52450be3fe56799334377be75a07c47e4aac7dcb7f29b8303c5'
'516f60bdb28f7a0cb6c8f1f84c656ee7c6aec8feb393538f227ed515372ac88a')
package() {
mkdir -p "$pkgdir"/usr/src
cp -r "$_pkgname-$pkgver" "$pkgdir"/usr/src/"$_pkgname-$pkgver"
sed -e "s/@PKGVER@/${pkgver}/" dkms.conf > "$pkgdir"/usr/src/"$_pkgname-$pkgver"/dkms.conf
}
this is my dkms.conf:
PACKAGE_NAME="kvdodrv"
PACKAGE_VERSION=@PKGVER@
AUTOINSTALL=yes
BUILT_MODULE_NAME[0]="kvdo"
BUILT_MODULE_LOCATION[0]="vdo"
DEST_MODULE_LOCATION[0]="/kernel/misc"
BUILT_MODULE_NAME[1]="uds"
BUILT_MODULE_LOCATION[1]="uds"
DEST_MODULE_LOCATION[1]="/kernel/misc"
I'm not sure about the dependencies, there is nothing mentioned on the github pages. Both packages are compiling and working without errors on my system, so i simply don't know the dependencies.
Edit: updated pkgbuilds
Last edited by zapp-brannigan (2018-08-19 06:44:21)
Offline
provides=('vdo')
All packages provide themselves
cp -r lib usr/
rm -rf lib
Could you not use mv instead?
Offline
I was also wondering about the cp and rm - mv is an obvious improvement, but are those necessary at all?
I checked the makefile to see if it used PREFIX for this, which it should, but I couldn't even find any references to /lib/ at all. What get's installed to /lib?
EDIT: ah, I didn't check under "examples" as I figured those were just ... well ... examples.
Last edited by Trilby (2018-08-18 15:29:19)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
All packages provide themselves
Ok, i will remove that
Could you not use mv instead?
A simple "mv" won't work because $pkgdir/usr/lib is not empty (there is already a python-module in it).
What get's installed to /lib?
It's just a systemd-unit and a .preset file. Pacman refuses to install files to /lib, so i copied/moved them to /usr/lib
Offline
You should be able to set unitdir and presetdir as variables to make to fix that.
$ grep -r lib/
examples/systemd/Makefile:unitdir ?= /lib/systemd/system
examples/systemd/Makefile:presetdir ?= /lib/systemd/system-preset
...
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Thank you for the hint. I've added a patch file.
Offline
There should be no need to patch the Makfile - it accepts variables:
make DESTDIR="$pkgdir" unitdir=/usr/lib/systemd/system presetdir=/usr/lib/systemd/system-preset install
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Is it even installable? It depends on kvdo, but nothing seems to provide that. Does it really need gcc at runtime?
The source file name is too generic, you need to rename it. If someone's using a combined SRCDEST, it could conflict with other packages.
Why cp then sed -i dkms.conf instead of just redirecting the output of sed?
What does namcap tell you about dependencies?
Offline
Is it even installable? It depends on kvdo, but nothing seems to provide that.
kvdo-dkms is probably the required package, but it is missing provides=('kvdo')
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Does it really need gcc at runtime?
The source file name is too generic, you need to rename it.
Why cp then sed -i dkms.conf instead of just redirecting the output of sed?
kvdo-dkms is probably the required package, but it is missing provides=('kvdo')
Updated the pkgbuilds.
namcap complains about a few things which i don't know how to resolve:
vdo W: ELF file ('usr/bin/vdodmeventd') lacks FULL RELRO, check LDFLAGS.
vdo W: ELF file ('usr/bin/vdodumpconfig') lacks FULL RELRO, check LDFLAGS.
vdo W: ELF file ('usr/bin/vdoforcerebuild') lacks FULL RELRO, check LDFLAGS.
vdo W: ELF file ('usr/bin/vdoformat') lacks FULL RELRO, check LDFLAGS.
vdo W: ELF file ('usr/bin/vdoprepareupgrade') lacks FULL RELRO, check LDFLAGS.
vdo W: ELF file ('usr/bin/vdoreadonly') lacks FULL RELRO, check LDFLAGS.
vdo W: Unused shared library '/usr/lib/libz.so.1' by file ('usr/bin/vdodmeventd')
vdo W: Unused shared library '/usr/lib/libm.so.6' by file ('usr/bin/vdodmeventd')
vdo W: Unused shared library '/usr/lib/libuuid.so.1' by file ('usr/bin/vdodmeventd')
vdo W: Unused shared library '/usr/lib/libdl.so.2' by file ('usr/bin/vdodumpconfig')
vdo W: Unused shared library '/usr/lib/libm.so.6' by file ('usr/bin/vdodumpconfig')
vdo W: Unused shared library '/usr/lib/libdl.so.2' by file ('usr/bin/vdoforcerebuild')
vdo W: Unused shared library '/usr/lib/libm.so.6' by file ('usr/bin/vdoforcerebuild')
vdo W: Unused shared library '/usr/lib/libdl.so.2' by file ('usr/bin/vdoformat')
vdo W: Unused shared library '/usr/lib/libm.so.6' by file ('usr/bin/vdoformat')
vdo W: Unused shared library '/usr/lib/libdl.so.2' by file ('usr/bin/vdoprepareupgrade')
vdo W: Unused shared library '/usr/lib/libm.so.6' by file ('usr/bin/vdoprepareupgrade')
vdo W: Unused shared library '/usr/lib/libuuid.so.1' by file ('usr/bin/vdoprepareupgrade')
vdo W: Unused shared library '/usr/lib/libdl.so.2' by file ('usr/bin/vdoreadonly')
vdo W: Unused shared library '/usr/lib/libm.so.6' by file ('usr/bin/vdoreadonly')
The shared libs are not part of the vdo-package.
Offline
What's with the prettyname/noextract stuff? I think you grossly misinterpreted what I was talking about. See https://wiki.archlinux.org/index.php/PKGBUILD#source
gcc in the makedepends is wrong as well, see https://wiki.archlinux.org/index.php/PK … akedepends
Offline
kvdo has
makedepends=('dkms')
but dkms is only used once the package is installed.
Edit:
https://github.com/dm-vdo/vdo/blob/4248 … kefile#L68 would explain
vdo W: ELF file ('usr/bin/vdodmeventd') lacks FULL RELRO, check LDFLAGS.
vdo W: ELF file ('usr/bin/vdodumpconfig') lacks FULL RELRO, check LDFLAGS.
vdo W: ELF file ('usr/bin/vdoforcerebuild') lacks FULL RELRO, check LDFLAGS.
vdo W: ELF file ('usr/bin/vdoformat') lacks FULL RELRO, check LDFLAGS.
vdo W: ELF file ('usr/bin/vdoprepareupgrade') lacks FULL RELRO, check LDFLAGS.
vdo W: ELF file ('usr/bin/vdoreadonly') lacks FULL RELRO, check LDFLAGS.
Edit2:
https://github.com/dm-vdo/vdo/blob/4248 … kefile#L72 would explain
vdo W: Unused shared library '/usr/lib/libz.so.1' by file ('usr/bin/vdodmeventd')
vdo W: Unused shared library '/usr/lib/libm.so.6' by file ('usr/bin/vdodmeventd')
vdo W: Unused shared library '/usr/lib/libuuid.so.1' by file ('usr/bin/vdodmeventd')
vdo W: Unused shared library '/usr/lib/libdl.so.2' by file ('usr/bin/vdodumpconfig')
vdo W: Unused shared library '/usr/lib/libm.so.6' by file ('usr/bin/vdodumpconfig')
vdo W: Unused shared library '/usr/lib/libdl.so.2' by file ('usr/bin/vdoforcerebuild')
vdo W: Unused shared library '/usr/lib/libm.so.6' by file ('usr/bin/vdoforcerebuild')
vdo W: Unused shared library '/usr/lib/libdl.so.2' by file ('usr/bin/vdoformat')
vdo W: Unused shared library '/usr/lib/libm.so.6' by file ('usr/bin/vdoformat')
vdo W: Unused shared library '/usr/lib/libdl.so.2' by file ('usr/bin/vdoprepareupgrade')
vdo W: Unused shared library '/usr/lib/libm.so.6' by file ('usr/bin/vdoprepareupgrade')
vdo W: Unused shared library '/usr/lib/libuuid.so.1' by file ('usr/bin/vdoprepareupgrade')
vdo W: Unused shared library '/usr/lib/libdl.so.2' by file ('usr/bin/vdoreadonly')
vdo W: Unused shared library '/usr/lib/libm.so.6' by file ('usr/bin/vdoreadonly')
Last edited by loqs (2018-08-18 19:28:46)
Offline
I think you grossly misinterpreted what I was talking about.
Yes, i thought the name of the extracted src-archive is too short
Offline
@loqs,
Wow, that Makefile is horrid. o_O
GLOBAL_LDFLAGS = $(EXTRA_LDFLAGS)
EXTRA_LDFLAGS =
LDFLAGS = $(GLOBAL_LDFLAGS)
@zapp-brannigan,
I suggest you completely rewrite the Makefile from scratch, then submit your working Makefile upstream as a replacement.
There is absolutely nothing whatsoever of value in that Makefile to be preserved...
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
I suggest you completely rewrite the Makefile from scratch
Well...i don't have the skills to do that
Offline