diff options
author | LRN <lrn1986@gmail.com> | 2012-07-30 10:59:26 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2012-07-30 10:59:26 +0000 |
commit | f3fb4969509ae44e879e84c9e132b5f48230cb0a (patch) | |
tree | 19fb2119c4ab2b1426dba241561e99b43fcee8df | |
parent | 8ee36d32db928bb8ae6f5289a77ace2e8b120b50 (diff) | |
download | gnunet-f3fb4969509ae44e879e84c9e132b5f48230cb0a.tar.gz gnunet-f3fb4969509ae44e879e84c9e132b5f48230cb0a.zip |
Do not run install commands from makefiles directly
-rw-r--r-- | src/dns/Makefile.am | 6 | ||||
-rw-r--r-- | src/dns/install-dns-helper.sh | 9 | ||||
-rw-r--r-- | src/exit/Makefile.am | 3 | ||||
-rw-r--r-- | src/exit/install-exit-helper.sh | 5 | ||||
-rw-r--r-- | src/gns/nss/Makefile.am | 12 | ||||
-rw-r--r-- | src/gns/nss/install-nss-plugin.sh | 7 | ||||
-rw-r--r-- | src/nat/Makefile.am | 3 | ||||
-rw-r--r-- | src/nat/install-nat-helper.sh | 6 | ||||
-rw-r--r-- | src/transport/Makefile.am | 3 | ||||
-rw-r--r-- | src/transport/install-wlan-helper.sh | 5 | ||||
-rw-r--r-- | src/vpn/Makefile.am | 3 | ||||
-rw-r--r-- | src/vpn/install-vpn-helper.sh | 5 |
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 = \ | |||
18 | if LINUX | 18 | if LINUX |
19 | HIJACKBIN = gnunet-helper-dns | 19 | HIJACKBIN = gnunet-helper-dns |
20 | install-exec-hook: | 20 | install-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 | ||
26 | else | 22 | else |
27 | install-exec-hook: | 23 | install-exec-hook: |
28 | endif | 24 | endif |
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 = \ | |||
18 | if LINUX | 18 | if LINUX |
19 | EXITBIN = gnunet-helper-exit | 19 | EXITBIN = gnunet-helper-exit |
20 | install-exec-hook: | 20 | install-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 | ||
23 | else | 22 | else |
24 | install-exec-hook: | 23 | install-exec-hook: |
25 | endif | 24 | endif |
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) | |||
51 | libnss_gns6_la_CFLAGS=$(libnss_gns_la_CFLAGS) -DNSS_IPV6_ONLY=1 | 51 | libnss_gns6_la_CFLAGS=$(libnss_gns_la_CFLAGS) -DNSS_IPV6_ONLY=1 |
52 | libnss_gns6_la_LDFLAGS=$(libnss_gns_la_LDFLAGS) | 52 | libnss_gns6_la_LDFLAGS=$(libnss_gns_la_LDFLAGS) |
53 | 53 | ||
54 | if !MINGW | ||
54 | install-data-hook: | 55 | install-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 | ||
58 | uninstall-hook: | 58 | uninstall-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) |
60 | else | ||
61 | install-data-hook: | ||
62 | |||
63 | uninstall-hook: | ||
64 | |||
65 | endif | ||
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 | |||
23 | NATSERVER = gnunet-helper-nat-server.c | 23 | NATSERVER = gnunet-helper-nat-server.c |
24 | NATCLIENT = gnunet-helper-nat-client.c | 24 | NATCLIENT = gnunet-helper-nat-client.c |
25 | install-exec-hook: | 25 | install-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 | ||
28 | else | 27 | else |
29 | install-exec-hook: | 28 | install-exec-hook: |
30 | endif | 29 | endif |
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 | ||
48 | if LINUX | 48 | if LINUX |
49 | install-exec-hook: | 49 | install-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 | ||
52 | else | 51 | else |
53 | install-exec-hook: | 52 | install-exec-hook: |
54 | endif | 53 | endif |
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 = \ | |||
18 | if LINUX | 18 | if LINUX |
19 | VPNBIN = gnunet-helper-vpn | 19 | VPNBIN = gnunet-helper-vpn |
20 | install-exec-hook: | 20 | install-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 | ||
23 | else | 22 | else |
24 | install-exec-hook: | 23 | install-exec-hook: |
25 | endif | 24 | endif |
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 | ||