Skip to contentSkip to conversation

package/tor: Install default config and systemd .service file

PATCH New Mario Lang 2 participants 2 messages Dec 6, 2017

lore
Share & tools
lore

Mario Lang

author
#0 lore raw

PATCH 1/1 package/tor: Install default config and systemd .service file

---
 package/tor/tor.mk | 12 ++++++++++++
 1 file changed, 12 insertions(+)
package/tor/tor.mk +12 -0
index 6a42dbce53..690772f5c0 100644
@@ -47,4 +47,16 @@ endif
 # uses gnu extensions
 TOR_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
 
+define TOR_INSTALL_CONF
+	$(INSTALL) -D -m 644 $(@D)/src/config/torrc.minimal \
+		$(TARGET_DIR)/etc/tor/torrc
+endef
+
+TOR_POST_INSTALL_TARGET_HOOKS += TOR_INSTALL_CONF
+
+define TOR_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 664 $(@D)/contrib/dist/tor.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/tor.service
+endef
+
 $(eval $(autotools-package))
Signature · 1 line
2.15.0
#1 lore raw

PATCH 1/1 package/tor: Install default config and systemd .service file

Hello,

Quoted 12 lines · Mario Lang
---
 package/tor/tor.mk | 12 ++++++++++++
 1 file changed, 12 insertions(+)
package/tor/tor.mk +0 -0
index 6a42dbce53..690772f5c0 100644
@@ -47,4 +47,16 @@ endif
 # uses gnu extensions
 TOR_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'

package/tor/tor.mk endif · line 58

Quoted 10 lines
package/tor/tor.mk +9 -0
 
+define TOR_INSTALL_CONF
+	$(INSTALL) -D -m 644 $(@D)/src/config/torrc.minimal \
+		$(TARGET_DIR)/etc/tor/torrc
+endef
+
+TOR_POST_INSTALL_TARGET_HOOKS += TOR_INSTALL_CONF
+
+define TOR_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 664 $(@D)/contrib/dist/tor.service \

This 664 mode didn't make much sense to me, we're using 644 everywhere else to install systemd .service files.

So I've fixed that to use 644 instead and applied.

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com