To give some answers to my own questions:
1. checksums:
It seems there are no checksums for single files in a git-repo.
Thus we skip the checksum.
2. version:
I decided to use a date format for versioning.
3. url:
I kept the url of the ubuntu repo, because that is the original source of the module after all.
I added additional links in a pinned comment.
4. different versions:
I seperated the packages, because obviously you should install only one of the packages anyway.
This should now also work for custom kernels and AUR helpers which automatically install packages.
diff --git a/Makefile b/Makefile
index 8645be2..59ad447 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ modname := shiftfs
obj-m := $(modname).o
KVERSION := $(shell uname -r)
-KDIR := /lib/modules/$(KVERSION)/build
+KDIR ?= /lib/modules/`uname -r`/build
PWD := "$$(pwd)"
ifdef DEBUG
diff --git a/PKGBUILD b/PKGBUILD
index d97bade..f1a6bd6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,10 +11,12 @@ makedepends=('linux-headers')
source=("https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/groovy/plain/fs/shiftfs.c"
dkms.conf
Makefile)
-sha512sums=('SKIP')
+sha512sums=('SKIP'
+ '186a0d0bb6f85db978636a9e8471865542aae8f2170b3d4bdd35952c9eaa73a055acb2d4bea6b5c62ca7732d3c5fb478a267f1f5d78b50a4ac3e095ba689833f'
+ '564fa7777089f16ca1522b1893d0e77ce34cd2b3632ff807c4a932eb29559053ad04a3d6a083c2b34e50864d72f6707c96a951aafca663fa67d483af04bcf0e9')
build() {
- make
+ make KDIR="/usr/lib/modules/$(</usr/src/linux/version)/build"
}
package_shiftfs() {
diff --git a/dkms.conf b/dkms.conf
index de08f93..8b6d92d 100644
--- a/dkms.conf
+++ b/dkms.conf
@@ -1,6 +1,5 @@
PACKAGE_NAME="shiftfs"
PACKAGE_VERSION="1.3"
-MAKE[0]="make KVERSION=$kernelver"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="shiftfs"
DEST_MODULE_LOCATION[0]="/kernel/fs/"
I would like to contribute a package on AUR for a kernel module named "shiftfs".
shiftfs is a kernel filesystem that provides uid/gid shifting, which is used in software like LXD.
More information can be found here:
https://discuss.linuxcontainers.org/t/t … iftfs/5155
shiftfs is considered stable (link to comment), enabled by default in the Ubuntu kernel and maintained by experienced kernel maintainers.
I have a few questions/problems that I would like to discuss here, before I submit files to AUR.
You can find my draft here:
https://github.com/toby63/shiftfs-dkms/tree/aur
1. checksums:
The pkgbuild downloads the shiftfs.c-file from the Ubuntu Kernel repo (which is the most recent repo to take it from; the maintainers also work for ubuntu):
https://git.launchpad.net/~ubuntu-kerne … /shiftfs.c
Now I am stuck finding a good method for adding a checksum or disabling checksums.
Sry I have no experience in this, so I ask for help.
2. version:
Officially there are no versions, so right now I use my own versioning scheme:
pkgver=1.3
An alternative would be to use the date from the last update presented in the log:
https://git.launchpad.net/~ubuntu-kerne … /shiftfs.c
What would you recommend?
3. url:
There is also no real official url, so there are the following options:
a) The Ubuntu kernel repo: https://git.launchpad.net/~ubuntu-kerne … /shiftfs.c
b) LXD Forum post (nearest to an official description): https://discuss.linuxcontainers.org/t/t … iftfs/5155
c) Initial Bug report on Ubuntu about implementing shiftfs: https://bugs.launchpad.net/ubuntu/+sour … ug/1823186
d) my Github repo, which describes the details, but is of course completely unofficial as I am not the maintainer of the kernel module:
https://github.com/toby63/shiftfs-dkms/
e) I could ask the maintainers whether they would set up something more official.
What would you recommend?
4. Different versions:
As you can see the PKGBUILD file right now includes two packages, I assume I should seperate these into two different AUR packages, correct?
Thx in advance.
Greetings,
G3ro