summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSwyter2022-03-05 01:16:03 +0100
committerSwyter2022-03-05 01:16:03 +0100
commitf9a75087aaa79e35bafcbcdca472af3962884b1d (patch)
treef25f9f35c58c69775be4a727912a64751946b182
parent325fd298b0a6e3f03b18c5a4c0747efab8b8b7a6 (diff)
downloadaur-f9a75087aaa79e35bafcbcdca472af3962884b1d.tar.gz
Update the package, add a patch file with compilation fixes and other tweaks.
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD35
-rw-r--r--systemd-216-fixes.patch100
3 files changed, 126 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e59f3214fa60..3a7c7b9dcc34 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = systemd-readahead
pkgdesc = Standalone version of the fast built-in readahead implementation dropped in systemd 217
pkgver = 216
- pkgrel = 1
+ pkgrel = 2
url = https://dev.gentoo.org/~pacho/systemd-readahead.html
install = systemd-readahead.install
arch = i686
@@ -12,8 +12,9 @@ pkgbase = systemd-readahead
makedepends = gperf
makedepends = sed
depends = systemd>216
- source = http://www.freedesktop.org/software/systemd/systemd-216.tar.xz
+ source = https://freedesktop.org/software/systemd/systemd-216.tar.xz
+ source = systemd-216-fixes.patch
md5sums = 04fda588a04f549da0f397dce3ae6a39
+ md5sums = e680c9819960a97b0691b27f3d0afb37
pkgname = systemd-readahead
-
diff --git a/PKGBUILD b/PKGBUILD
index 6d9c5fb17070..28280cbfe62a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=systemd-readahead
pkgver=216
-pkgrel=1
+pkgrel=2
epoch=
pkgdesc="Standalone version of the fast built-in readahead implementation dropped in systemd 217"
arch=('i686' 'x86_64')
@@ -19,8 +19,8 @@ provides=()
conflicts=()
replaces=()
install=systemd-readahead.install
-source=("http://www.freedesktop.org/software/systemd/systemd-$pkgver.tar.xz")
-md5sums=('04fda588a04f549da0f397dce3ae6a39')
+source=("https://freedesktop.org/software/systemd/systemd-$pkgver.tar.xz" "systemd-$pkgver-fixes.patch")
+md5sums=('04fda588a04f549da0f397dce3ae6a39' 'SKIP')
prepare()
{
@@ -29,12 +29,16 @@ prepare()
# systemd-notify no longer supports readahead playing
sed -i -e 's:ExecStart=@SYSTEMD_NOTIFY@ --readahead=done:ExecStart=/bin/touch /run/systemd/readahead/done:' \
units/systemd-readahead-done.service.in || die
+
+ patch -t -p1 < "$srcdir/systemd-$pkgver-fixes.patch" # LANG=C diff -urN -x '*.Plo' -x '*.la' -x '*.Po' -x '*.a' -x '*.json' -x Makefile -x config.h -x config.log -x '*.status' -x 'libtool' -x '*.in' -x '*.extra' -x libsystemd.sym -x '*.lo' -x '*.gperf' -x '*test*' -x bus-error-mapping.c -x af-from-name.h systemd-216/ src/systemd-216/ > diff.diff
}
build()
{
cd "systemd-$pkgver"
+ export CC=clang
+
./configure --enable-readahead --prefix=/usr \
--disable-maintainer-mode \
--localstatedir=/var \
@@ -123,17 +127,22 @@ package()
# Install main app
install -Dm 755 "systemd-readahead" "$pkgdir/usr/lib/systemd/systemd-readahead"
+ install -d "$pkgdir/usr/lib/systemd/system/"
+
# Install unit files
- install -Dm 644 "units/systemd-readahead-drop.service" "$pkgdir/usr/lib/systemd/system/systemd-readahead-drop.service"
- install -Dm 644 "units/systemd-readahead-collect.service" "$pkgdir/usr/lib/systemd/system/systemd-readahead-collect.service"
- install -Dm 644 "units/systemd-readahead-replay.service" "$pkgdir/usr/lib/systemd/system/systemd-readahead-replay.service"
- install -Dm 644 "units/systemd-readahead-done.service" "$pkgdir/usr/lib/systemd/system/systemd-readahead-done.service"
- install -Dm 644 "units/systemd-readahead-done.timer" "$pkgdir/usr/lib/systemd/system/systemd-readahead-done.timer"
+ install -Dm 644 "units/systemd-readahead-drop.service" "$pkgdir/usr/lib/systemd/system/"
+ install -Dm 644 "units/systemd-readahead-collect.service" "$pkgdir/usr/lib/systemd/system/"
+ install -Dm 644 "units/systemd-readahead-replay.service" "$pkgdir/usr/lib/systemd/system/"
+ install -Dm 644 "units/systemd-readahead-done.service" "$pkgdir/usr/lib/systemd/system/"
+ install -Dm 644 "units/systemd-readahead-done.timer" "$pkgdir/usr/lib/systemd/system/"
+
+
+ install -d "$pkgdir/usr/share/man/man8/"
# Install manpages and aliases
- install -Dm 644 "man/systemd-readahead-collect.service.8" "$pkgdir/usr/share/man/man8/systemd-readahead-collect.service.8"
- install -Dm 644 "man/systemd-readahead-done.service.8" "$pkgdir/usr/share/man/man8/systemd-readahead-done.service.8"
- install -Dm 644 "man/systemd-readahead-done.timer.8" "$pkgdir/usr/share/man/man8/systemd-readahead-done.timer.8"
- install -Dm 644 "man/systemd-readahead-replay.service.8" "$pkgdir/usr/share/man/man8/systemd-readahead-replay.service.8"
- install -Dm 644 "man/systemd-readahead.8" "$pkgdir/usr/share/man/man8/systemd-readahead.8"
+ install -Dm 644 "man/systemd-readahead-collect.service.8" "$pkgdir/usr/share/man/man8/"
+ install -Dm 644 "man/systemd-readahead-done.service.8" "$pkgdir/usr/share/man/man8/"
+ install -Dm 644 "man/systemd-readahead-done.timer.8" "$pkgdir/usr/share/man/man8/"
+ install -Dm 644 "man/systemd-readahead-replay.service.8" "$pkgdir/usr/share/man/man8/"
+ install -Dm 644 "man/systemd-readahead.8" "$pkgdir/usr/share/man/man8/"
}
diff --git a/systemd-216-fixes.patch b/systemd-216-fixes.patch
new file mode 100644
index 000000000000..6ee153fcdc51
--- /dev/null
+++ b/systemd-216-fixes.patch
@@ -0,0 +1,100 @@
+--
+diff -urN -x '*.Plo' -x '*.la' -x '*.Po' -x '*.a' -x '*.json' -x Makefile -x config.h -x config.log -x '*.status' -x libtool -x '*.in' -x '*.extra' -x libsystemd.sym -x '*.lo' -x '*.gperf' -x '*test*' -x bus-error-mapping.c -x af-from-name.h a/shared/missing.h b/shared/missing.h
+--- a/src/shared/missing.h 2014-08-18 18:12:55.000000000 +0200
++++ b/src/shared/missing.h 2022-03-04 23:58:20.446830463 +0100
+@@ -204,7 +204,7 @@
+ }
+ #endif
+
+-#ifndef HAVE_MEMFD_CREATE
++#if 0
+ static inline int memfd_create(const char *name, uint64_t flags) {
+ return syscall(__NR_memfd_create, name, flags);
+ }
+
+diff -urN -x '*.Plo' -x '*.la' -x '*.Po' -x '*.a' -x '*.json' -x Makefile -x config.h -x config.log -x '*.status' -x libtool -x '*.in' -x '*.extra' -x libsystemd.sym -x '*.lo' -x '*.gperf' -x '*test*' -x bus-error-mapping.c -x af-from-name.h a/libsystemd/sd-bus/bus-error.h b/libsystemd/sd-bus/bus-error.h
+--- a/src/libsystemd/sd-bus/bus-error.h 2014-02-13 03:42:35.000000000 +0100
++++ b/src/libsystemd/sd-bus/bus-error.h 2022-03-05 00:13:20.713402153 +0100
+@@ -32,7 +32,7 @@
+ };
+ typedef struct name_error_mapping name_error_mapping;
+
+-const name_error_mapping* bus_error_mapping_lookup(const char *str, unsigned int len);
++const name_error_mapping* bus_error_mapping_lookup(const char *str, size_t len);
+
+ bool bus_error_is_dirty(sd_bus_error *e);
+
+diff -urN -x '*.Plo' -x '*.la' -x '*.Po' -x '*.a' -x '*.json' -x Makefile -x config.h -x config.log -x '*.status' -x libtool -x '*.in' -x '*.extra' -x libsystemd.sym -x '*.lo' -x '*.gperf' -x '*test*' -x bus-error-mapping.c -x af-from-name.h a/shared/af-list.c b/shared/af-list.c
+--- a/src/shared/af-list.c 2014-03-18 18:05:50.000000000 +0100
++++ b/src/shared/af-list.c 2022-03-05 00:15:09.181996570 +0100
+@@ -25,7 +25,7 @@
+ #include "util.h"
+ #include "af-list.h"
+
+-static const struct af_name* lookup_af(register const char *str, register unsigned int len);
++static const struct af_name* lookup_af(register const char *str, register size_t len);
+
+ #include "af-to-name.h"
+ #include "af-from-name.h"
+
+diff -urN -x '*.Plo' -x '*.la' -x '*.Po' -x '*.a' -x '*.json' -x Makefile -x config.h -x config.log -x '*.status' -x libtool -x '*.in' -x '*.extra' -x libsystemd.sym -x '*.lo' -x '*.gperf' -x '*test*' -x bus-error-mapping.c -x af-from-name.h a/shared/arphrd-list.c b/shared/arphrd-list.c
+--- a/src/shared/arphrd-list.c 2014-08-12 01:54:39.000000000 +0200
++++ b/src/shared/arphrd-list.c 2022-03-05 00:15:33.875793200 +0100
+@@ -26,7 +26,7 @@
+ #include "util.h"
+ #include "arphrd-list.h"
+
+-static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len);
++static const struct arphrd_name* lookup_arphrd(register const char *str, register size_t len);
+
+ #include "arphrd-to-name.h"
+ #include "arphrd-from-name.h"
+
+diff -urN -x '*.Plo' -x '*.la' -x '*.Po' -x '*.a' -x '*.json' -x Makefile -x config.h -x config.log -x '*.status' -x libtool -x '*.in' -x '*.extra' -x libsystemd.sym -x '*.lo' -x '*.gperf' -x '*test*' -x bus-error-mapping.c -x af-from-name.h a/shared/errno-list.c b/shared/errno-list.c
+--- a/src/shared/errno-list.c 2014-03-18 18:05:50.000000000 +0100
++++ b/src/shared/errno-list.c 2022-03-05 00:14:25.211193081 +0100
+@@ -26,7 +26,7 @@
+ #include "errno-list.h"
+
+ static const struct errno_name* lookup_errno(register const char *str,
+- register unsigned int len);
++ register size_t len);
+
+ #include "errno-to-name.h"
+ #include "errno-from-name.h"
+
+diff -urN -x '*.Plo' -x '*.la' -x '*.Po' -x '*.a' -x '*.json' -x Makefile -x config.h -x config.log -x '*.status' -x libtool -x '*.in' -x '*.extra' -x libsystemd.sym -x '*.lo' -x '*.gperf' -x '*test*' -x bus-error-mapping.c -x af-from-name.h a/shared/util.c b/shared/util.c
+--- a/src/shared/util.c 2014-08-20 00:18:14.000000000 +0200
++++ b/src/shared/util.c 2022-03-05 00:19:52.614405844 +0100
+@@ -61,6 +61,7 @@
+ #include <locale.h>
+ #include <sys/personality.h>
+ #include <libgen.h>
++#include <sys/sysmacros.h>
+ #undef basename
+
+ #ifdef HAVE_SYS_AUXV_H
+
+diff -urN -x '*.Plo' -x '*.la' -x '*.Po' -x '*.a' -x '*.json' -x Makefile -x config.h -x config.log -x '*.status' -x libtool -x '*.in' -x '*.extra' -x libsystemd.sym -x '*.lo' -x '*.gperf' -x '*test*' -x bus-error-mapping.c -x af-from-name.h a/libudev/libudev-device.c b/libudev/libudev-device.c
+--- a/src/libudev/libudev-device.c 2014-08-01 18:46:39.000000000 +0200
++++ b/src/libudev/libudev-device.c 2022-03-05 00:21:25.109774234 +0100
+@@ -32,6 +32,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+ #include <linux/sockios.h>
++#include <sys/sysmacros.h>
+
+ #include "libudev.h"
+ #include "libudev-private.h"
+
+diff -urN -x '*.Plo' -x '*.la' -x '*.Po' -x '*.a' -x '*.json' -x Makefile -x config.h -x config.log -x '*.status' -x libtool -x '*.in' -x '*.extra' -x libsystemd.sym -x '*.lo' -x '*.gperf' -x '*test*' -x bus-error-mapping.c -x af-from-name.h a/readahead/readahead-common.c b/readahead/readahead-common.c
+--- a/src/readahead/readahead-common.c 2014-06-23 12:40:38.000000000 +0200
++++ b/src/readahead/readahead-common.c 2022-03-05 00:22:57.995209400 +0100
+@@ -27,6 +27,7 @@
+ #include <fcntl.h>
+ #include <sys/mman.h>
+ #include <unistd.h>
++#include <sys/sysmacros.h>
+
+ #include "log.h"
+ #include "readahead-common.h"