aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2012-07-30 10:59:26 +0000
committerLRN <lrn1986@gmail.com>2012-07-30 10:59:26 +0000
commitf3fb4969509ae44e879e84c9e132b5f48230cb0a (patch)
tree19fb2119c4ab2b1426dba241561e99b43fcee8df /src
parent8ee36d32db928bb8ae6f5289a77ace2e8b120b50 (diff)
downloadgnunet-f3fb4969509ae44e879e84c9e132b5f48230cb0a.tar.gz
gnunet-f3fb4969509ae44e879e84c9e132b5f48230cb0a.zip
Do not run install commands from makefiles directly
Diffstat (limited to 'src')
-rw-r--r--src/dns/Makefile.am6
-rw-r--r--src/dns/install-dns-helper.sh9
-rw-r--r--src/exit/Makefile.am3
-rw-r--r--src/exit/install-exit-helper.sh5
-rw-r--r--src/gns/nss/Makefile.am12
-rw-r--r--src/gns/nss/install-nss-plugin.sh7
-rw-r--r--src/nat/Makefile.am3
-rw-r--r--src/nat/install-nat-helper.sh6
-rw-r--r--src/transport/Makefile.am3
-rw-r--r--src/transport/install-wlan-helper.sh5
-rw-r--r--src/vpn/Makefile.am3
-rw-r--r--src/vpn/install-vpn-helper.sh5
12 files changed, 51 insertions, 16 deletions
diff --git a/src/dns/Makefile.am b/src/dns/Makefile.am
index ed000aa19..59395700a 100644
--- a/src/dns/Makefile.am
+++ b/src/dns/Makefile.am
@@ -18,11 +18,7 @@ pkgcfg_DATA = \
18if LINUX 18if LINUX
19HIJACKBIN = gnunet-helper-dns 19HIJACKBIN = gnunet-helper-dns
20install-exec-hook: 20install-exec-hook:
21 $(SUDO_BINARY) chown root $(bindir)/gnunet-helper-dns || true 21 $(top_srcdir)/src/dns/install-dns-helper.sh $(SUDO_BINARY) $(bindir) $(GNUNETDNS_GROUP) || true
22 $(SUDO_BINARY) chgrp $(GNUNETDNS_GROUP) $(bindir)/gnunet-helper-dns || true
23 $(SUDO_BINARY) chmod 4750 $(bindir)/gnunet-helper-dns || true
24 $(SUDO_BINARY) chown gnunet:$(GNUNETDNS_GROUP) $(bindir)/gnunet-service-dns || true
25 $(SUDO_BINARY) chmod 2750 $(bindir)/gnunet-service-dns || true
26else 22else
27install-exec-hook: 23install-exec-hook:
28endif 24endif
diff --git a/src/dns/install-dns-helper.sh b/src/dns/install-dns-helper.sh
new file mode 100644
index 000000000..ac42e1f29
--- /dev/null
+++ b/src/dns/install-dns-helper.sh
@@ -0,0 +1,9 @@
1#!/bin/bash
2# $1 - sudo binary
3# $2 - bindir
4# $3 - gnunetdns group
5$1 chown root $2/gnunet-helper-dns || true
6$1 chgrp $3 $2/gnunet-helper-dns || true
7$1 chmod 4750 $2/gnunet-helper-dns || true
8$1 chown gnunet:$3 $2/gnunet-service-dns || true
9$1 chmod 2750 $2/gnunet-service-dns || true
diff --git a/src/exit/Makefile.am b/src/exit/Makefile.am
index 5a047a13a..b0b36c661 100644
--- a/src/exit/Makefile.am
+++ b/src/exit/Makefile.am
@@ -18,8 +18,7 @@ dist_pkgcfg_DATA = \
18if LINUX 18if LINUX
19EXITBIN = gnunet-helper-exit 19EXITBIN = gnunet-helper-exit
20install-exec-hook: 20install-exec-hook:
21 $(SUDO_BINARY) chown root:root $(bindir)/gnunet-helper-exit || true 21 $(top_srcdir)/src/exit/install-exit-helper.sh $(SUDO_BINARY) $(bindir) || true
22 $(SUDO_BINARY) chmod u+s $(bindir)/gnunet-helper-exit || true
23else 22else
24install-exec-hook: 23install-exec-hook:
25endif 24endif
diff --git a/src/exit/install-exit-helper.sh b/src/exit/install-exit-helper.sh
new file mode 100644
index 000000000..afe37ec5e
--- /dev/null
+++ b/src/exit/install-exit-helper.sh
@@ -0,0 +1,5 @@
1#!/bin/bash
2# $1 - sudo binary
3# $2 - bindir
4$1 chown root:root $2/gnunet-helper-exit || true
5$1 chmod u+s $2/gnunet-helper-exit || true
diff --git a/src/gns/nss/Makefile.am b/src/gns/nss/Makefile.am
index 5e8ab5a2e..7caeaa971 100644
--- a/src/gns/nss/Makefile.am
+++ b/src/gns/nss/Makefile.am
@@ -51,9 +51,15 @@ libnss_gns6_la_SOURCES=$(libnss_gns_la_SOURCES)
51libnss_gns6_la_CFLAGS=$(libnss_gns_la_CFLAGS) -DNSS_IPV6_ONLY=1 51libnss_gns6_la_CFLAGS=$(libnss_gns_la_CFLAGS) -DNSS_IPV6_ONLY=1
52libnss_gns6_la_LDFLAGS=$(libnss_gns_la_LDFLAGS) 52libnss_gns6_la_LDFLAGS=$(libnss_gns_la_LDFLAGS)
53 53
54if !MINGW
54install-data-hook: 55install-data-hook:
55 $(SUDO_BINARY) $(SHELL) $(top_builddir)/libtool --finish $(nssdir) 56 $(top_srcdir)/src/gns/nss/install-nss-plugin.sh $(SUDO_BINARY) $(SHELL) $(top_builddir) $(nssdir)
56 $(SUDO_BINARY) rm -f $(nssdir)/libnss_gns.la $(nssdir)/libnss_gns4.la $(nssdir)/libnss_gns6.la
57 57
58uninstall-hook: 58uninstall-hook:
59 $(SUDO_BINARY) rm -f $(nssdir)/libnss_gns.so.2 $(nssdir)/libnss_gns4.so.2 $(nssdir)/libnss_gns6.so.2 59 $(top_srcdir)/src/gns/nss/uninstall-nss-plugin.sh $(SUDO_BINARY) $(nssdir)
60else
61install-data-hook:
62
63uninstall-hook:
64
65endif
diff --git a/src/gns/nss/install-nss-plugin.sh b/src/gns/nss/install-nss-plugin.sh
new file mode 100644
index 000000000..978a3bc67
--- /dev/null
+++ b/src/gns/nss/install-nss-plugin.sh
@@ -0,0 +1,7 @@
1#!/bin/bash
2# $1 - sudo binary
3# $2 - shell
4# $3 - top_builddir
5# $4 - nssdir
6$1 $2 $3/libtool --finish $4
7$1 rm -f $4/libnss_gns.la $4/libnss_gns4.la $4/libnss_gns6.la
diff --git a/src/nat/Makefile.am b/src/nat/Makefile.am
index ed3a1545a..e706a3a00 100644
--- a/src/nat/Makefile.am
+++ b/src/nat/Makefile.am
@@ -23,8 +23,7 @@ NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
23NATSERVER = gnunet-helper-nat-server.c 23NATSERVER = gnunet-helper-nat-server.c
24NATCLIENT = gnunet-helper-nat-client.c 24NATCLIENT = gnunet-helper-nat-client.c
25install-exec-hook: 25install-exec-hook:
26 $(SUDO_BINARY) chown root:root $(bindir)/gnunet-helper-nat-server $(bindir)/gnunet-helper-nat-client $(nattest) || true 26 $(top_srcdir)/src/nat/install-nat-helper.sh $(SUDO_BINARY) $(bindir) $(nattest) || true
27 $(SUDO_BINARY) chmod u+s $(bindir)/gnunet-helper-nat-server $(bindir)/gnunet-helper-nat-client $(nattest) || true
28else 27else
29install-exec-hook: 28install-exec-hook:
30endif 29endif
diff --git a/src/nat/install-nat-helper.sh b/src/nat/install-nat-helper.sh
new file mode 100644
index 000000000..158c9fb15
--- /dev/null
+++ b/src/nat/install-nat-helper.sh
@@ -0,0 +1,6 @@
1#!/bin/bash
2# $1 - sudo binary
3# $2 - bindir
4# $3 - nattest
5$1 chown root:root $2/gnunet-helper-nat-server $2/gnunet-helper-nat-client $3 || true
6$1 chmod u+s $2/gnunet-helper-nat-server $2/gnunet-helper-nat-client $3 || true
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index 7fc679b20..afbd10932 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -47,8 +47,7 @@ endif
47 47
48if LINUX 48if LINUX
49install-exec-hook: 49install-exec-hook:
50 $(SUDO_BINARY) chown root:root $(bindir)/gnunet-helper-transport-wlan || true 50 $(top_srcdir)/src/transport/install-wlan-helper.sh $(SUDO_BINARY) $(bindir) || true
51 $(SUDO_BINARY) chmod u+s $(bindir)/gnunet-helper-transport-wlan || true
52else 51else
53install-exec-hook: 52install-exec-hook:
54endif 53endif
diff --git a/src/transport/install-wlan-helper.sh b/src/transport/install-wlan-helper.sh
new file mode 100644
index 000000000..30258b8ce
--- /dev/null
+++ b/src/transport/install-wlan-helper.sh
@@ -0,0 +1,5 @@
1#!/bin/bash
2# $1 - sudo binary
3# $2 - bindir
4$1 chown root:root $2/gnunet-helper-transport-wlan || true
5$1 chmod u+s $2/gnunet-helper-transport-wlan || true
diff --git a/src/vpn/Makefile.am b/src/vpn/Makefile.am
index efd61d775..2826028e8 100644
--- a/src/vpn/Makefile.am
+++ b/src/vpn/Makefile.am
@@ -18,8 +18,7 @@ pkgcfg_DATA = \
18if LINUX 18if LINUX
19VPNBIN = gnunet-helper-vpn 19VPNBIN = gnunet-helper-vpn
20install-exec-hook: 20install-exec-hook:
21 $(SUDO_BINARY) chown root:root $(bindir)/gnunet-helper-vpn || true 21 $(top_srcdir)/src/nat/install-vpn-helper.sh $(SUDO_BINARY) $(bindir) || true
22 $(SUDO_BINARY) chmod u+s $(bindir)/gnunet-helper-vpn || true
23else 22else
24install-exec-hook: 23install-exec-hook:
25endif 24endif
diff --git a/src/vpn/install-vpn-helper.sh b/src/vpn/install-vpn-helper.sh
new file mode 100644
index 000000000..fbef41c7e
--- /dev/null
+++ b/src/vpn/install-vpn-helper.sh
@@ -0,0 +1,5 @@
1#!/bin/bash
2# $1 - sudo binary
3# $2 - bindir
4$1 chown root:root $2/gnunet-helper-vpn || true
5$1 chmod u+s $2/gnunet-helper-vpn || true