From abedef7af7beb0cd56071b435c8c264bd880a6ab Mon Sep 17 00:00:00 2001 From: Martin Habovstiak Date: Fri, 6 Nov 2020 22:05:10 +0100 Subject: [PATCH] Added remir --- Makefile | 4 +-- README.md | 1 + build_rules/remir.yaml | 9 +++++++ docs/user-level.md | 15 +++++++++++ pkg_specs/python3-remir.sps | 6 +++++ pkg_specs/remir.changelog | 5 ++++ pkg_specs/remir.sps | 53 +++++++++++++++++++++++++++++++++++++ pkg_specs/remir.sss | 7 +++++ 8 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 build_rules/remir.yaml create mode 100644 pkg_specs/python3-remir.sps create mode 100644 pkg_specs/remir.changelog create mode 100644 pkg_specs/remir.sps create mode 100644 pkg_specs/remir.sss diff --git a/Makefile b/Makefile index c315fa2..d6bfcf9 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ endif .DELETE_ON_ERROR: -SOURCES=bitcoin bitcoin-rpc-proxy electrs electrum lnd nbxplorer btcpayserver ridetheln selfhost tor-extras thunderhub btc-rpc-explorer lndconnect lnpbp-testkit selfhost-dashboard +SOURCES=bitcoin bitcoin-rpc-proxy electrs electrum lnd nbxplorer btcpayserver ridetheln selfhost tor-extras thunderhub btc-rpc-explorer lndconnect lnpbp-testkit selfhost-dashboard remir include common_vars.mk @@ -39,7 +39,7 @@ clean: include common_rules.mk build-dep: - sudo apt-get build-dep -a $(DEB_ARCH) $(realpath $(BITCOIN_DIR) $(BITCOIN_RPC_PROXY_BUILD_DIR) $(ELECTRS_BUILD_DIR) $(ELECTRUM_BUILD_DIR) $(TOR_EXTRAS_BUILD_DIR) $(LND_BUILD_DIR) $(NBXPLORER_BUILD_DIR) $(BTCPAYSERVER_BUILD_DIR) $(SELFHOST_BUILD_DIR) $(RIDETHELN_BUILD_DIR) $(LNPBP_TESTKIT_BUILD_DIR)) + sudo apt-get build-dep -a $(DEB_ARCH) $(realpath $(BITCOIN_DIR) $(BITCOIN_RPC_PROXY_BUILD_DIR) $(ELECTRS_BUILD_DIR) $(ELECTRUM_BUILD_DIR) $(TOR_EXTRAS_BUILD_DIR) $(LND_BUILD_DIR) $(NBXPLORER_BUILD_DIR) $(BTCPAYSERVER_BUILD_DIR) $(SELFHOST_BUILD_DIR) $(RIDETHELN_BUILD_DIR) $(LNPBP_TESTKIT_BUILD_DIR) $(REMIR_BUILD_DIR)) test: $(TEST_DEPS) diff --git a/README.md b/README.md index f6fad61..213bbf4 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,7 @@ Supported and planned applications - [ ] joinmarket - [ ] joinmarket-mainnet - [x] lnpbp-testkit (framework for testing LNP/BP applications) +- [x] remir (a simple server for controlling IR devices; not freedom related, but why not?) - [ ] translations - [x] all services for regtest - [ ] all services for signet diff --git a/build_rules/remir.yaml b/build_rules/remir.yaml new file mode 100644 index 0000000..373ec94 --- /dev/null +++ b/build_rules/remir.yaml @@ -0,0 +1,9 @@ +pkg_name_upper: REMIR +pkg_name_snake: remir +source_name: remir + +clone_url: https://github.com/Kixunil/remir +git_tag: v$(REMIR_VERSION) +fingerprint: 3D9E81D3CA76CDCBE768C4B4DC6B4F8E60B8CF4C +verify_tag: true +build_system: python3 diff --git a/docs/user-level.md b/docs/user-level.md index fc93206..188f4c5 100644 --- a/docs/user-level.md +++ b/docs/user-level.md @@ -245,3 +245,18 @@ BTC RPC Explorer is a very powerful Bitcoin explorer that uses your own full nod * **You must have a working domain pointing to your node for `selfhost-clearnet` to work!** * `selfhost-clearnet-certbot` is installed by default and **needs a working e-mail address** for receiving **important security notifications**! * `selfhost-clearnet-certbot` will create a TLS certificate for you so that HTTPS works. + +### remir + +#### About + +A simple server for controlling IR-enabled devices. + +#### Usage + +Your device MUST have a LIRC-capable IR transmitter! +I recommend using Raspberry Pi with `lirc_rpi` configured. +Just install the package and either pick a password or let it generate a random one. +The password will also be stored in /var/run/remir/password. +After you've configured LIRC, open your browser using selfhost domain, followed by +`remir` root path (default is `/remir`) followed by slash and the password. diff --git a/pkg_specs/python3-remir.sps b/pkg_specs/python3-remir.sps new file mode 100644 index 0000000..992081b --- /dev/null +++ b/pkg_specs/python3-remir.sps @@ -0,0 +1,6 @@ +name = "python3-remir" +architecture = "all" +summary = "A simple server for controlling IR-enabled devices." +depends = ["${python3:Depends}", "${misc:Depends}", "lirc"] +recommends = ["remir"] +add_files = ["/usr/bin/remir", "/usr/lib/python3.7/dist-packages/remir", "/usr/lib/python3.7/dist-packages/remir-0.1.0.egg-info"] diff --git a/pkg_specs/remir.changelog b/pkg_specs/remir.changelog new file mode 100644 index 0000000..4051a20 --- /dev/null +++ b/pkg_specs/remir.changelog @@ -0,0 +1,5 @@ +remir (0.1.0-1) buster; urgency=medium + + * Added Debian package + + -- Martin Habovstiak Fri, 6 Nov 2020 14:40:50 +0100 diff --git a/pkg_specs/remir.sps b/pkg_specs/remir.sps new file mode 100644 index 0000000..64f4c02 --- /dev/null +++ b/pkg_specs/remir.sps @@ -0,0 +1,53 @@ +name = "remir" +summary = "A simple server for controlling IR-enabled devices. (service package)" +bin_package = "python3-remir" +binary = "/usr/bin/remir" +conf_param = "--conf" +user = { group = true, create = { home = false } } +recommends = ["selfhost"] +extra_triggers = ["/etc/lirc/lircd.conf.d"] +extra_service_config = """ +Restart=always +RuntimeDirectory=remir +""" + +[config."remir.toml"] +format = "toml" + +[config."remir.toml".ivars.password] +type = "string" +default = "" +priority = "high" +summary = "Password to access remir (empty generates random)" +ignore_empty = true + +[config."remir.toml".ivars.port] +type = "bind_port" +default = "8123" +priority = "medium" +summary = "Port for remir to listen on" + +[config."remir.toml".ivars.bind_address] +type = "bind_host" +default = "127.0.0.1" +priority = "medium" +summary = "Address for remir to listen on" +ignore_empty = true + +[config."../selfhost/apps/remir.conf"] +format = "yaml" +external = true +with_header = true + +[config."../selfhost/apps/remir.conf".ivars.root_path] +type = "string" +default = "/remir" +priority = "medium" +summary = "Web prefix of web path to remir" + +[config."../selfhost/apps/remir.conf".evars.remir.port] +name = "port" + +[config."../selfhost/apps/remir.conf".hvars.rewrite] +type = "bool" +constant = "true" diff --git a/pkg_specs/remir.sss b/pkg_specs/remir.sss new file mode 100644 index 0000000..f712b88 --- /dev/null +++ b/pkg_specs/remir.sss @@ -0,0 +1,7 @@ +name = "remir" +section = "net" +build_depends = ["python3-all", "dh-python", "python3-setuptools", "python3-bottle", "python3-toml"] +packages = ["python3-remir", "remir"] +skip_debug_symbols = true +with = ["python3"] +buildsystem = "pybuild"