diff --git a/.SRCINFO b/.SRCINFO index 5daa0eef02c0..51fb96680dbb 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = linux-usermode pkgdesc = User mode Linux kernel and modules - pkgver = 5.1.5 + pkgver = 5.2.13 pkgrel = 1 url = http://user-mode-linux.sourceforge.net/ arch = x86_64 @@ -8,21 +8,18 @@ pkgbase = linux-usermode makedepends = bc makedepends = inetutils depends = coreutils - source = http://www.kernel.org/pub/linux/kernel/v5.x/linux-5.1.tar.xz - source = http://www.kernel.org/pub/linux/kernel/v5.x/linux-5.1.tar.sign - source = http://www.kernel.org/pub/linux/kernel/v5.x/patch-5.1.5.xz + source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.2.13.tar.xz + source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.2.13.tar.sign source = config - source = 001-hide_the_int3_emulate_call_jmp_functions_from_uml.patch + source = 70-uml.hook validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886 validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E - sha256sums = d06a7be6e73f97d1350677ad3bae0ce7daecb79c2c2902aaabe806f7fa94f041 + sha256sums = 17b60f55241dee4b9a2919a653de144ef1002e2de49ccf5d15225b1f07bc178a sha256sums = SKIP - sha256sums = def1a382c555454daf28fb768ed2c3e6f339c4bfcd36faa99982e4d31c04efa6 - sha256sums = c2741019f57c2c918ad80cbf0fad0d03ef585fadf045078b3117cd73d83e5f2b - sha256sums = f292341bdbc90f27ea6775bf3c709d92fbf8842c7cf7603c71807f06ad1e69a9 + sha256sums = a5ad6d1bad174fa407e891c2128746125b2bc0c921be5459ce90fe1949ef617c + sha256sums = 452b8d4d71e1565ca91b1bebb280693549222ef51c47ba8964e411b2d461699c pkgname = linux-usermode pkgname = linux-usermode-modules - install = modules.install diff --git a/001-hide_the_int3_emulate_call_jmp_functions_from_uml.patch b/001-hide_the_int3_emulate_call_jmp_functions_from_uml.patch deleted file mode 100644 index d9374cb165cd..000000000000 --- a/001-hide_the_int3_emulate_call_jmp_functions_from_uml.patch +++ /dev/null @@ -1,36 +0,0 @@ -From: "Steven Rostedt (VMware)" - -User Mode Linux does not have access to the ip or sp fields of the pt_regs, -and accessing them causes UML to fail to build. Hide the int3_emulate_jmp() -and int3_emulate_call() instructions from UML, as it doesn't need them -anyway. - -Reported-by: kbuild test robot -Signed-off-by: Steven Rostedt (VMware) ---- - arch/x86/include/asm/text-patching.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/arch/x86/include/asm/text-patching.h b/arch/x86/include/asm/text-patching.h -index 05861cc08787..0bbb07eaed6b 100644 ---- a/arch/x86/include/asm/text-patching.h -+++ b/arch/x86/include/asm/text-patching.h -@@ -39,6 +39,7 @@ extern int poke_int3_handler(struct pt_regs *regs); - extern void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler); - extern int after_bootmem; - -+#ifndef CONFIG_UML_X86 - static inline void int3_emulate_jmp(struct pt_regs *regs, unsigned long ip) - { - regs->ip = ip; -@@ -65,6 +66,7 @@ static inline void int3_emulate_call(struct pt_regs *regs, unsigned long func) - int3_emulate_push(regs, regs->ip - INT3_INSN_SIZE + CALL_INSN_SIZE); - int3_emulate_jmp(regs, func); - } --#endif -+#endif /* CONFIG_X86_64 */ -+#endif /* !CONFIG_UML_X86 */ - - #endif /* _ASM_X86_TEXT_PATCHING_H */ --- -2.20.1 diff --git a/70-uml.hook b/70-uml.hook new file mode 100644 index 000000000000..584ce35372b0 --- /dev/null +++ b/70-uml.hook @@ -0,0 +1,11 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/lib/modules/%KERNVER%/* + +[Action] +Description = Updating %PKGBASE% module dependencies... +When = PostTransaction +Exec = /usr/bin/depmod %KERNVER% diff --git a/PKGBUILD b/PKGBUILD index 20680a9837bb..dccffab7261c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,12 +1,13 @@ -# Maintainer: Haruue Icymoon -# Contributor: Lucjan Lucjanov +# Maintainer: Piotr Gorski +# Contributor: Haruue Icymoon -pkgname=linux-usermode -true && pkgname=(linux-usermode linux-usermode-modules) pkgbase=linux-usermode +pkgname=('linux-usermode' 'linux-usermode-modules') _kernelname=-usermodelinux -_srcname=linux-5.1 -pkgver=5.1.5 +_major=5.2 +_minor=13 +pkgver=${_major}.${_minor} +_srcname=linux-${pkgver} pkgrel=1 pkgdesc="User mode Linux kernel and modules" arch=('x86_64') @@ -14,74 +15,79 @@ license=('GPL2') url="http://user-mode-linux.sourceforge.net/" depends=('coreutils') makedepends=('bc' 'inetutils') -source=( - http://www.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.{xz,sign} -# http://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.{xz,sign} - http://www.kernel.org/pub/linux/kernel/v5.x/patch-${pkgver}.xz - config - 001-hide_the_int3_emulate_call_jmp_functions_from_uml.patch) +source=("https://www.kernel.org/pub/linux/kernel/v5.x/linux-${pkgver}.tar.xz" + "https://www.kernel.org/pub/linux/kernel/v5.x/linux-${pkgver}.tar.sign" + 'config' + '70-uml.hook') -sha256sums=('d06a7be6e73f97d1350677ad3bae0ce7daecb79c2c2902aaabe806f7fa94f041' +sha256sums=('17b60f55241dee4b9a2919a653de144ef1002e2de49ccf5d15225b1f07bc178a' 'SKIP' - 'def1a382c555454daf28fb768ed2c3e6f339c4bfcd36faa99982e4d31c04efa6' - 'c2741019f57c2c918ad80cbf0fad0d03ef585fadf045078b3117cd73d83e5f2b' - 'f292341bdbc90f27ea6775bf3c709d92fbf8842c7cf7603c71807f06ad1e69a9') + 'a5ad6d1bad174fa407e891c2128746125b2bc0c921be5459ce90fe1949ef617c' + '452b8d4d71e1565ca91b1bebb280693549222ef51c47ba8964e411b2d461699c') validpgpkeys=( - 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds - '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman -) + 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds + '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman + ) prepare() { - cd "${srcdir}/${_srcname}" + cd ${_srcname} + + msg2 "Setting version..." + sed -e "/^EXTRAVERSION =/s/=.*/=/" -i Makefile + scripts/setlocalversion --save-scmversion + echo "-$pkgrel" > localversion.10-pkgrel + echo "$_kernelname" > localversion.20-pkgname - # add upstream patch - patch -p1 -i "${srcdir}/patch-${pkgver}" - - # https://lkml.org/lkml/2019/5/14/966 - patch -Np1 -i "${srcdir}"/001-hide_the_int3_emulate_call_jmp_functions_from_uml.patch - - cat ../config - >.config </dev/null + + make ARCH=um kernelrelease > ../version + msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)" + + msg2 "Save configuration for later reuse" + cat .config > "${startdir}/config.last" } build() { - cd "${srcdir}/${_srcname}" + cd ${_srcname} unset LDFLAGS CFLAGS - make ARCH=um vmlinux modules } -package_linux-usermode() { - cd "${srcdir}/${_srcname}" +_package() { + + cd ${_srcname} mkdir -p "$pkgdir/usr/bin" "$pkgdir/usr/share/kernel-usermode" install -m 644 System.map ${pkgdir}/usr/share/kernel-usermode/System.map install -m 755 vmlinux ${pkgdir}/usr/bin/ } -package_linux-usermode-modules() { - install=modules.install - - cd "${srcdir}/${_srcname}" - - # get kernel version, but discard the first result - make ARCH=um kernelrelease > /dev/null - _kernver="$(make ARCH=um kernelrelease)" +_package-modules() { + + local kernver="$(>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} -} - -post_upgrade() { - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} -}