summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorideal2018-12-19 10:20:49 +0800
committerideal2018-12-19 10:20:49 +0800
commit26c9b294a24a204da600a1db8aed4f102dbf29c9 (patch)
tree85b6c8e58e6ed71c3b1615efb57bda142b91c375
parent8e1f0be7193641fc742c247fbe75e86e73e9abd1 (diff)
downloadaur-26c9b294a24a204da600a1db8aed4f102dbf29c9.tar.gz
remove install exec hook to fix build error if systemtap is not previously installed
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD13
-rw-r--r--remove-install-exec-hook.patch76
3 files changed, 89 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 250d4fcbc4ea..25dd68fbe49a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = systemtap-git
pkgdesc = provides infrastructure to simplify the gathering of information about the running Linux system.
- pkgver = 4.0.83.gaacee6563
+ pkgver = 4.0.84.g68bd23fd0
pkgrel = 1
url = http://sourceware.org/systemtap/
install = systemtap.install
@@ -20,7 +20,9 @@ pkgbase = systemtap-git
provides = systemtap=4.0
conflicts = systemtap
source = git+git://sourceware.org/git/systemtap.git
+ source = remove-install-exec-hook.patch
md5sums = SKIP
+ md5sums = 6db56245ab316134c9a487e16ea52084
pkgname = systemtap-git
diff --git a/PKGBUILD b/PKGBUILD
index f7e87e7973bf..4ae9c8229dbc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Maintainer: Shang Yuanchun <idealities@gmail.com>
pkgname=systemtap-git
-pkgver=4.0.83.gaacee6563
+pkgver=4.0.84.g68bd23fd0
pkgrel=1
pkgdesc="provides infrastructure to simplify the gathering of information about the running Linux system."
url="http://sourceware.org/systemtap/"
@@ -15,8 +15,10 @@ provides=(systemtap=4.0)
conflicts=(systemtap)
_gitroot=git://sourceware.org/git/systemtap.git
_gitname=systemtap
-source=("git+$_gitroot")
-md5sums=('SKIP')
+source=("git+$_gitroot"
+ remove-install-exec-hook.patch)
+md5sums=('SKIP'
+ '6db56245ab316134c9a487e16ea52084')
install=systemtap.install
pkgver() {
@@ -24,6 +26,11 @@ pkgver() {
git describe | sed 's/release-//;s/-/./g'
}
+prepare() {
+ cd "$srcdir/$_gitname"
+ patch -p1 -i "$srcdir"/remove-install-exec-hook.patch
+}
+
build() {
cd "$srcdir/$_gitname"
msg "Starting make..."
diff --git a/remove-install-exec-hook.patch b/remove-install-exec-hook.patch
new file mode 100644
index 000000000000..84534b3a50e6
--- /dev/null
+++ b/remove-install-exec-hook.patch
@@ -0,0 +1,76 @@
+diff --git a/stapbpf/Makefile.am b/stapbpf/Makefile.am
+index fa2035dab..43dc35ab3 100644
+--- a/stapbpf/Makefile.am
++++ b/stapbpf/Makefile.am
+@@ -39,13 +39,4 @@ BUILT_SOURCES += git_version.stamp
+ git_version.stamp ../git_version.h:
+ $(MAKE) -C .. $(notdir $@)
+
+-# Why the "id -u" condition? This way, an unprivileged user can run
+-# make install, and have "sudo stap ...." or "sudo stapbpf ...." work later.
+-install-exec-hook:
+- if [ `id -u` -eq 0 ]; then \
+- getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr; \
+- getent group stapusr >/dev/null \
+- && chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \
+- && chmod 04110 "$(DESTDIR)$(bindir)/stapbpf"; \
+- fi
+ endif
+diff --git a/stapbpf/Makefile.in b/stapbpf/Makefile.in
+index f7f20b6ee..e00b239b6 100644
+--- a/stapbpf/Makefile.in
++++ b/stapbpf/Makefile.in
+@@ -845,16 +845,6 @@ uninstall-man: uninstall-man8
+ @HAVE_BPF_DECLS_TRUE@git_version.stamp ../git_version.h:
+ @HAVE_BPF_DECLS_TRUE@ $(MAKE) -C .. $(notdir $@)
+
+-# Why the "id -u" condition? This way, an unprivileged user can run
+-# make install, and have "sudo stap ...." or "sudo stapbpf ...." work later.
+-@HAVE_BPF_DECLS_TRUE@install-exec-hook:
+-@HAVE_BPF_DECLS_TRUE@ if [ `id -u` -eq 0 ]; then \
+-@HAVE_BPF_DECLS_TRUE@ getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr; \
+-@HAVE_BPF_DECLS_TRUE@ getent group stapusr >/dev/null \
+-@HAVE_BPF_DECLS_TRUE@ && chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \
+-@HAVE_BPF_DECLS_TRUE@ && chmod 04110 "$(DESTDIR)$(bindir)/stapbpf"; \
+-@HAVE_BPF_DECLS_TRUE@ fi
+-
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
+diff --git a/staprun/Makefile.am b/staprun/Makefile.am
+index 73ddc41ff..d8779f634 100644
+--- a/staprun/Makefile.am
++++ b/staprun/Makefile.am
+@@ -73,12 +73,3 @@ BUILT_SOURCES += git_version.stamp
+ git_version.stamp ../git_version.h:
+ $(MAKE) -C .. $(notdir $@)
+
+-
+-# Why the "id -u" condition? This way, an unprivileged user can run
+-# make install, and have "sudo stap ...." or "sudo staprun ...." work later.
+-install-exec-hook:
+- if [ `id -u` -eq 0 ]; then \
+- getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr; \
+- getent group stapusr >/dev/null && chgrp stapusr "$(DESTDIR)$(bindir)/staprun"; \
+- chmod 04110 "$(DESTDIR)$(bindir)/staprun"; \
+- fi
+diff --git a/staprun/Makefile.in b/staprun/Makefile.in
+index 6cb3966a5..f9da649d4 100644
+--- a/staprun/Makefile.in
++++ b/staprun/Makefile.in
+@@ -1158,15 +1158,6 @@ uninstall-man: uninstall-man8
+ git_version.stamp ../git_version.h:
+ $(MAKE) -C .. $(notdir $@)
+
+-# Why the "id -u" condition? This way, an unprivileged user can run
+-# make install, and have "sudo stap ...." or "sudo staprun ...." work later.
+-install-exec-hook:
+- if [ `id -u` -eq 0 ]; then \
+- getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr; \
+- getent group stapusr >/dev/null && chgrp stapusr "$(DESTDIR)$(bindir)/staprun"; \
+- chmod 04110 "$(DESTDIR)$(bindir)/staprun"; \
+- fi
+-
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT: