removed the install hooks
See also: https://bugs.archlinux.org/task/56853
This commit is contained in:
parent
68ebb46082
commit
c012fdf64e
3 changed files with 53 additions and 1 deletions
3
PKGBUILD
3
PKGBUILD
|
@ -21,7 +21,8 @@ validpgpkeys=('5D38116FA4D3A7CC77E378D37E83610126DCC2E8')
|
|||
|
||||
prepare() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
patch -Np1 -i "${srcdir}/access_process_vm_h.patch"
|
||||
patch -Np1 -i "${srcdir}/stp_remove_install_hooks.patch"
|
||||
autoreconf -i
|
||||
}
|
||||
build() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
|
|
37
stp_remove_install_hooks.patch
Normal file
37
stp_remove_install_hooks.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
diff --git a/stapbpf/Makefile.am b/stapbpf/Makefile.am
|
||||
index a303d25f6..703668362 100644
|
||||
--- a/stapbpf/Makefile.am
|
||||
+++ b/stapbpf/Makefile.am
|
||||
@@ -38,14 +38,4 @@ CLEANFILES =
|
||||
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/staprun/Makefile.am b/staprun/Makefile.am
|
||||
index 4073aa01c..978d115f9 100644
|
||||
--- a/staprun/Makefile.am
|
||||
+++ b/staprun/Makefile.am
|
||||
@@ -68,13 +68,3 @@ CLEANFILES =
|
||||
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
|
|
@ -1,4 +1,18 @@
|
|||
post_install() {
|
||||
getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr
|
||||
getent group stapsys >/dev/null || groupadd -g 157 -r stapsys 2>/dev/null || groupadd -r stapsys
|
||||
getent group stapdev >/dev/null || groupadd -g 158 -r stapdev 2>/dev/null || groupadd -r stapdev
|
||||
|
||||
getent group stapusr >/dev/null && chgrp stapusr /usr/bin/stapbpf
|
||||
chmod 04110 /usr/bin/stapbpf
|
||||
|
||||
getent group stapusr >/dev/null && chgrp stapusr /usr/bin/staprun
|
||||
chmod 04110 /usr/bin/staprun
|
||||
|
||||
echo "CONFIG_DEBUG_INFO is disabled on default. You need to recompile"
|
||||
echo "the kernel with CONFIG_DEBUG_INFO enabled."
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue