[arch-commits] Commit in deepin-anything-arch/repos (4 files)
Jan Steffens
heftig at archlinux.org
Mon Mar 4 21:11:18 UTC 2019
Date: Monday, March 4, 2019 @ 21:11:17
Author: heftig
Revision: 437634
archrelease: copy trunk to community-staging-x86_64
Added:
deepin-anything-arch/repos/community-staging-x86_64/
deepin-anything-arch/repos/community-staging-x86_64/PKGBUILD
(from rev 437633, deepin-anything-arch/trunk/PKGBUILD)
deepin-anything-arch/repos/community-staging-x86_64/linux-4.20.patch
(from rev 437633, deepin-anything-arch/trunk/linux-4.20.patch)
deepin-anything-arch/repos/community-staging-x86_64/linux-5.0.patch
(from rev 437633, deepin-anything-arch/trunk/linux-5.0.patch)
------------------+
PKGBUILD | 38 +++++++++++++++++++++++++++++++
linux-4.20.patch | 16 +++++++++++++
linux-5.0.patch | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 118 insertions(+)
Copied: deepin-anything-arch/repos/community-staging-x86_64/PKGBUILD (from rev 437633, deepin-anything-arch/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2019-03-04 21:11:17 UTC (rev 437634)
@@ -0,0 +1,38 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=deepin-anything-arch
+pkgver=0.0.4
+_extramodules=extramodules-ARCH
+pkgrel=7
+pkgdesc="Deepin Anything file search tool, kernel module for Arch kernel"
+arch=('x86_64')
+url="https://github.com/linuxdeepin/deepin-anything"
+license=('GPL3')
+depends=('linux')
+makedepends=('linux-headers')
+provides=('DEEPIN-ANYTHING-MODULE')
+replaces=('deepin-anything-module')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/deepin-anything/archive/$pkgver.tar.gz"
+ linux-4.20.patch
+ linux-5.0.patch)
+sha512sums=('fcb7683ce3bef818ac06dd62f14b5624669f9c09b53c5f08e319b724f5408bc221154428a6436d9e2a68aa6444e966c494c8a7611dfed0c93b6b9e71a3da0f55'
+ 'dc3c85e9535cc589fdf56d265c4330519c92b5bcc406153e3162ba6ef5e799b702c394e1961132770f4f3ddd288dbbfe74a9d8056329e4585eb5a2094ffe0155'
+ '6179fae5263d651279e073b4e116cf5fd1986614a0f3129927c39f462cc2ff12bb7c118b64ddbd31399a752d6b177df517133ae634d38146465fe97f49dc31d4')
+
+prepare() {
+ cd deepin-anything-$pkgver
+ patch -p1 -i ../linux-4.20.patch
+ patch -p1 -i ../linux-5.0.patch
+}
+
+build() {
+ cd deepin-anything-$pkgver
+ _kernver="$(cat /usr/lib/modules/$_extramodules/version)"
+ make -C kernelmod kdir=/usr/lib/modules/$_kernver/build
+}
+
+package() {
+ cd deepin-anything-$pkgver/kernelmod
+ install -Dm644 vfs_monitor.ko "$pkgdir"/usr/lib/modules/$_extramodules/vfs_monitor.ko
+ gzip "$pkgdir"/usr/lib/modules/$_extramodules/vfs_monitor.ko
+}
Copied: deepin-anything-arch/repos/community-staging-x86_64/linux-4.20.patch (from rev 437633, deepin-anything-arch/trunk/linux-4.20.patch)
===================================================================
--- community-staging-x86_64/linux-4.20.patch (rev 0)
+++ community-staging-x86_64/linux-4.20.patch 2019-03-04 21:11:17 UTC (rev 437634)
@@ -0,0 +1,16 @@
+diff --git a/kernelmod/vfs_change.c b/kernelmod/vfs_change.c
+index 0d6d360..d09e439 100644
+--- a/kernelmod/vfs_change.c
++++ b/kernelmod/vfs_change.c
+@@ -115,7 +115,11 @@ static ssize_t copy_vfs_changes(struct timeval *last, char* buf, size_t size)
+
+ time_t shifted_secs = vc->ts.tv_sec + hour_shift*3600;
+ struct tm ts;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0)
+ time_to_tm(shifted_secs, 0, &ts);
++#else
++ time64_to_tm(shifted_secs, 0, &ts);
++#endif
+ char temp[MIN_LINE_SIZE];
+ snprintf(temp, sizeof(temp), "%04ld-%02d-%02d %02d:%02d:%02d.%03ld %s ",
+ 1900+ts.tm_year, 1+ts.tm_mon, ts.tm_mday, ts.tm_hour, ts.tm_min, ts.tm_sec, vc->ts.tv_usec/1000,
Copied: deepin-anything-arch/repos/community-staging-x86_64/linux-5.0.patch (from rev 437633, deepin-anything-arch/trunk/linux-5.0.patch)
===================================================================
--- community-staging-x86_64/linux-5.0.patch (rev 0)
+++ community-staging-x86_64/linux-5.0.patch 2019-03-04 21:11:17 UTC (rev 437634)
@@ -0,0 +1,64 @@
+diff -u -r deepin-anything-0.0.4/kernelmod/vfs_change.c deepin-anything-0.0.4-5.0/kernelmod/vfs_change.c
+--- deepin-anything-0.0.4/kernelmod/vfs_change.c 2019-03-04 19:59:13.782355964 +0000
++++ deepin-anything-0.0.4-5.0/kernelmod/vfs_change.c 2019-03-04 20:17:05.425142691 +0000
+@@ -15,7 +15,7 @@
+ #endif
+
+ typedef struct __vfs_change__ {
+- struct timeval ts;
++ struct timespec64 ts;
+ char *src, *dst;
+ unsigned char action;
+ unsigned short size;
+@@ -77,7 +77,7 @@
+ return -EBUSY;
+ }
+
+- struct timeval* tv = kzalloc(sizeof(struct timeval), GFP_KERNEL);
++ struct timespec64* tv = kzalloc(sizeof(struct timespec64), GFP_KERNEL);
+ if (unlikely(tv == 0)) {
+ atomic_set(&vfs_changes_is_open, 0);
+ return -ENOMEM;
+@@ -104,13 +104,13 @@
+
+ #define MIN_LINE_SIZE 50
+
+-static ssize_t copy_vfs_changes(struct timeval *last, char* buf, size_t size)
++static ssize_t copy_vfs_changes(struct timespec64 *last, char* buf, size_t size)
+ {
+ size_t total = 0;
+ vfs_change* vc;
+ list_for_each_entry(vc, &vfs_changes, list) {
+ if (vc->ts.tv_sec < last->tv_sec ||
+- (vc->ts.tv_sec == last->tv_sec && vc->ts.tv_usec <= last->tv_usec))
++ (vc->ts.tv_sec == last->tv_sec && vc->ts.tv_nsec <= last->tv_nsec))
+ continue;
+
+ time_t shifted_secs = vc->ts.tv_sec + hour_shift*3600;
+@@ -122,7 +122,7 @@
+ #endif
+ char temp[MIN_LINE_SIZE];
+ snprintf(temp, sizeof(temp), "%04ld-%02d-%02d %02d:%02d:%02d.%03ld %s ",
+- 1900+ts.tm_year, 1+ts.tm_mon, ts.tm_mday, ts.tm_hour, ts.tm_min, ts.tm_sec, vc->ts.tv_usec/1000,
++ 1900+ts.tm_year, 1+ts.tm_mon, ts.tm_mday, ts.tm_hour, ts.tm_min, ts.tm_sec, vc->ts.tv_nsec/1000000,
+ action_names[vc->action]);
+ size_t line_len = strlen(temp) + strlen(vc->src) + 1; //+1 for \n
+ if (vc->dst)
+@@ -158,7 +158,7 @@
+ if (kbuf == 0)
+ return -ENOMEM;
+
+- struct timeval *last = (struct timeval*)filp->private_data;
++ struct timespec64 *last = (struct timespec64*)filp->private_data;
+ spin_lock(&sl_changes);
+ ssize_t r = copy_vfs_changes(last, kbuf, size);
+ spin_unlock(&sl_changes);
+@@ -585,7 +585,7 @@
+ strcat(full_dst, dst);
+ }
+ vfs_change* vc = (vfs_change*)p;
+- do_gettimeofday(&vc->ts);
++ ktime_get_real_ts64(&vc->ts);
+ vc->size = size;
+ vc->action = act;
+ vc->src = full_src;
More information about the arch-commits
mailing list