Compare commits

...
Sign in to create a new pull request.

55 commits

Author SHA1 Message Date
Damian Wrobel
1af5c15c4d Update to 3.0.0 (rhbz#2490161)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2026-08-07 10:41:18 +02:00
Fedora Release Engineering
545cf2ea8b Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:52:56 +00:00
Damian Wrobel
68a3b62e53 Update to 2.0.0 (rhbz#2443681)
Signed-off-by: Damian Wrobel <D.Wrobel@adbglobal.com>
2026-03-02 11:42:36 +01:00
Damian Wrobel
226b05fab6 Update to 1.20.0 (rhbz#2433637)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2026-02-03 18:39:55 +01:00
Fedora Release Engineering
e6f71125b1 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 20:19:07 +00:00
Fedora Release Engineering
773e5518bc Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 20:29:51 +00:00
Damian Wrobel
e7c546532d Update to 1.19.0 (rhbz#2354241)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2025-05-21 20:40:23 +02:00
Damian Wrobel
3f6b58ad6e Fix FTBFS on F42. 2025-01-21 21:39:21 +01:00
Fedora Release Engineering
23858a7520 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 15:10:09 +00:00
Damian Wrobel
9b6e5844f0 Update to 1.18.0 (rhbz#2329228)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2024-12-05 18:06:07 +01:00
Damian Wrobel
320d36602b Rebuilt for updated license tag
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2024-10-07 11:07:13 +02:00
Miroslav Suchý
f2c6206530 Migrate to SPDX license
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4

If there will be no comments in two weeks, I will merge this.
2024-10-07 08:52:15 +00:00
Damian Wrobel
ac6f546060 Update to 1.17.1 (rhbz#2307772)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2024-09-12 18:40:36 +02:00
Fedora Release Engineering
efda44696d Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 09:28:07 +00:00
Damian Wrobel
38890123d9 Rebuild for rtl-sdr-2.0 (rhbz#2273601) 2024-04-05 12:45:31 +02:00
Damian Wrobel
761ab10e3b Update to 1.16.1 (rhbz#2264357) - add sources 2024-02-27 17:09:41 +01:00
Damian Wrobel
f00899b3e3 Update to 1.16.1 (rhbz#2264357)
- Switch to use pkgconfig for BuildRequires
- Specify Require for rtl-wmbus which supports needed -f option
2024-02-27 17:05:41 +01:00
Fedora Release Engineering
2f22595eb7 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 09:00:21 +00:00
Damian Wrobel
a2bfc72fbd Update to 1.14.0 (rhbz#2219146)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2023-07-07 16:58:09 +02:00
Damian Wrobel
bb859fe9eb Update to 1.13.0 (rhbz#2196040)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2023-05-08 09:04:39 +02:00
Damian Wrobel
cefdcb84ad Update to 1.12.0 (rhbz#2177567)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2023-03-13 10:25:28 +01:00
Fedora Release Engineering
c60568a56a Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 06:55:30 +00:00
Damian Wrobel
a06a099562 Update to 1.11.0 (rhbz#2156910) 2023-01-13 11:57:41 +01:00
Damian Wrobel
b55ac2975a Update to 1.10.1 (rhbz#2151407) 2022-12-09 16:03:28 +01:00
Damian Wrobel
bd01d3f03b Update to 1.9.0 (rhbz#2124324)
Drop patch merged upstream

Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2022-09-14 18:51:12 +02:00
Damian Wrobel
61f5e60d22 Fix FTBFS on F37 2022-07-26 08:49:41 +02:00
Fedora Release Engineering
eaf4671761 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 12:32:47 +00:00
Damian Wrobel
6b0bf3bc61 Update change log 2022-06-27 15:18:28 +02:00
Damian Wrobel
0980e3eace Update to 1.8.0 (rhbz#2101195)
Update spec file.
2022-06-27 15:08:21 +02:00
Damian Wrobel
dc4e482d06 Update to 1.8.0 (rhbz#2101195) 2022-06-27 13:04:34 +02:00
Damian Wrobel
9dcdf78959 Update to 1.7.0 2022-06-20 09:06:44 +02:00
Fedora Release Engineering
06ae6eaeaf - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 04:35:33 +00:00
Damian Wrobel
b208aabdf3 Update to 1.6.0 (rhbz#2020903) 2022-01-04 15:14:34 +01:00
Damian Wrobel
c6b7ae4cdf Update to 1.5.0 (rhbz#2020903) 2021-11-09 21:32:19 +01:00
Damian Wrobel
2dcf2cbbf8 Update to 1.4.1 2021-08-31 15:44:00 +02:00
Damian Wrobel
fcf6b34b86 Update to the latest snapshot (fixes compilation errors) 2021-08-13 21:13:36 +02:00
Damian Wrobel
57e99347d2 Update to 1.4.0 (#1991762) 2021-08-12 19:19:58 +02:00
Fedora Release Engineering
9fa65bc0ab - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 21:03:38 +00:00
Damian Wrobel
23a01ea8e0 Update to 1.3.0 (#1936290) 2021-06-01 00:10:54 +02:00
3a5bc05208 Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
2021-03-02 16:12:01 +01:00
Damian Wrobel
a7f0300285 Update sources file 2021-02-22 16:25:22 +01:00
Damian Wrobel
cd350966c8 Update to 1.1.0 (#1922583)
- Remove duplicate BR for make.
2021-02-22 15:59:55 +01:00
Fedora Release Engineering
4c405ac5f5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 23:35:56 +00:00
Tom Stellard
140e65bbd3 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-09 00:58:07 +00:00
Damian Wrobel
6b8646adc0 Update to the latest available version
- Switch (as per upstream) to non template unit file
2020-12-29 17:30:49 +01:00
Damian Wrobel
c6b823c2b6 Allows to build non-released versions in copr 2020-11-02 21:27:00 +01:00
Damian Wrobel
037c27401b Update to the latest available version 2020-09-08 19:04:47 +02:00
Damian Wrobel
5fd964ecaf Update to the latest available version 2020-08-31 14:26:02 +02:00
Fedora Release Engineering
949fddeaef - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 14:14:42 +00:00
Damian Wrobel
c612abc4f2 Update to the latest available version 2020-07-01 22:19:18 +02:00
Damian Wrobel
fe6c56d021 Add missing ncurses-devel BR 2020-05-25 21:56:31 +02:00
Damian Wrobel
ea8f2efcf4 Update to the latest available version 2020-05-25 21:48:01 +02:00
Damian Wrobel
29354e8690 Update to the latest available version 2020-04-23 10:31:15 +02:00
Damian Wrobel
d646a1281c Update to the latest available version 2020-04-03 18:54:58 +02:00
Damian Wrobel
20124f7b76 Update to the latest available version
- Drop patches upstream merged
2020-03-24 22:49:37 +01:00
10 changed files with 262 additions and 373 deletions

29
.gitignore vendored
View file

@ -1 +1,30 @@
/wmbusmeters-0.9.27.tar.gz
/wmbusmeters-0.9.28.tar.gz
/wmbusmeters-0.9.29.tar.gz
/wmbusmeters-0.9.30.tar.gz
/wmbusmeters-0.9.31.tar.gz
/wmbusmeters-0.9.32.tar.gz
/wmbusmeters-0.9.35.tar.gz
/wmbusmeters-0.9.36.tar.gz
/wmbusmeters-1.0.4.tar.gz
/wmbusmeters-1.1.0.tar.gz
/wmbusmeters-1.3.0.tar.gz
/wmbusmeters-1.4.0.tar.gz
/wmbusmeters-8dd3e87c44ecb2e3fc46f7bc6df9ea6195c8b988.tar.gz
/wmbusmeters-1.4.1.tar.gz
/wmbusmeters-1.5.0.tar.gz
/wmbusmeters-1.6.0.tar.gz
/wmbusmeters-1.8.0.tar.gz
/wmbusmeters-1.9.0.tar.gz
/wmbusmeters-1.10.1.tar.gz
/wmbusmeters-1.11.0.tar.gz
/wmbusmeters-1.12.0.tar.gz
/wmbusmeters-1.13.0.tar.gz
/wmbusmeters-1.14.0.tar.gz
/wmbusmeters-1.16.1.tar.gz
/wmbusmeters-1.17.1.tar.gz
/wmbusmeters-1.18.0.tar.gz
/wmbusmeters-1.19.0.tar.gz
/wmbusmeters-1.20.0.tar.gz
/wmbusmeters-2.0.0.tar.gz
/wmbusmeters-3.0.0.tar.gz

View file

@ -1 +1 @@
SHA512 (wmbusmeters-0.9.27.tar.gz) = 4c5845805c0ba3fefdc65c8aec8ca2433a9722c6e9d82b7bfad5e717309d4066a77402b3ada4242ec774edd25f11f348843c56c05737dac0bcea6d125c067eee
SHA512 (wmbusmeters-3.0.0.tar.gz) = 5ba9eaa132c5bfe23faa901d481af1ff84b9ce222434b489dfe205d6532370818606d461d1d51ede1fc58423086a54690151a51adc4eb0db74d5156a91d7d9e1

View file

@ -1,45 +0,0 @@
From d840804b31a632cf1e984d949897836a5395b031 Mon Sep 17 00:00:00 2001
From: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Date: Mon, 2 Mar 2020 10:07:04 +0100
Subject: [PATCH] Fix accessing empty string
Fixes the following crash:
(gdb) bt
#0 0x00005555555738d0 in abort@plt ()
#1 0x0000555555589888 in std::__replacement_assert (__file=<optimized out>, __line=<optimized out>, __function=<optimized out>, __condition=<optimized out>) at /usr/include/c++/9/x86_64-redhat-linux/bits/c++config.h:2533
#2 0x00005555555d1e37 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::front (this=0x7ffff7a226d0) at /usr/include/c++/9/bits/basic_string.h:1123
#3 0x00005555555ce8c5 in doesIdMatchExpression (id=..., match=...) at src/util.cc:513
#4 0x00005555555cea92 in doesIdMatchExpressions (id=..., mes=...) at src/util.cc:560
#5 0x000055555558aa56 in MeterCommonImplementation::isTelegramForMe (this=0x555555661c28, t=0x7ffff7a227b0) at src/meters.cc:188
#6 0x000055555558c0e0 in MeterCommonImplementation::handleTelegram (this=0x555555661c28, input_frame=...) at src/meters.cc:289
#7 0x000055555558c87a in MeterCommonImplementation::<lambda(std::vector<unsigned char, std::allocator<unsigned char> >)>::operator() (__closure=<optimized out>, input_frame=...) at /usr/include/c++/9/bits/stl_algobase.h:465
#8 std::_Function_handler<bool(std::vector<unsigned char, std::allocator<unsigned char> >), MeterCommonImplementation::MeterCommonImplementation(WMBus*, MeterInfo&, MeterType, int)::<lambda(std::vector<unsigned char, std::allocator<unsigned char> >)> >::_M_invoke(const std::_Any_data &, std::vector<unsigned char, std::allocator<unsigned char> > &&) (__functor=..., __args#0=...) at /usr/include/c++/9/bits/std_function.h:285
#9 0x00005555555da01f in std::function<bool (std::vector<unsigned char, std::allocator<unsigned char> >)>::operator()(std::vector<unsigned char, std::allocator<unsigned char> >) const (__args#0=..., this=0x7ffff7a22c70) at /usr/include/c++/9/bits/std_function.h:685
#10 WMBusCommonImplementation::handleTelegram (this=this@entry=0x555555661b40, frame=...) at src/wmbus.cc:3328
#11 0x00005555555fbf7b in WMBusRTLWMBUS::processSerialData (this=0x555555661ad0) at /usr/include/c++/9/bits/stl_algobase.h:465
#12 0x00005555555cb001 in std::function<void ()>::operator()() const (this=<optimized out>) at /usr/include/c++/9/bits/std_function.h:685
#13 SerialCommunicationManagerImp::eventLoop (this=0x5555556617c0) at src/serial.cc:795
#14 0x00007ffff7f554e2 in ?? ()
#15 0x0000000000000000 in ?? ()
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
---
src/util.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util.cc b/src/util.cc
index bcacb16..22f7b31 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -510,7 +510,7 @@ bool doesIdMatchExpression(string id, string match)
}
bool wildcard_used = false;
- if (match.front() == '*')
+ if (match.length() && match.front() == '*')
{
wildcard_used = true;
match.erase(0,1);
--
2.24.1

View file

@ -1,66 +0,0 @@
From a8562de6c0a5d80332a83b92f88b48688beabd39 Mon Sep 17 00:00:00 2001
From: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Date: Fri, 28 Feb 2020 18:20:22 +0100
Subject: [PATCH] Fix compilation error on gcc 10.x
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes the following compilation error:
In file included from src/config.h:21,
from src/cmdline.h:21,
from src/cmdline.cc:18:
src/units.h:42:11: error: extended character ° is not valid in an identifier
42 | X(C,c,°C,Temperature,"celsius") \
| ^
src/units.h:43:11: error: extended character ° is not valid in an identifier
43 | X(F,f,°F,Temperature,"fahrenheit") \
| ^
make: *** [Makefile:93: build/cmdline.o] Error 1
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
---
src/units.h | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/units.h b/src/units.h
index a1c0384..ac0c7ce 100644
--- a/src/units.h
+++ b/src/units.h
@@ -33,19 +33,19 @@
X(Time,Hour) \
#define LIST_OF_UNITS \
- X(KWH,kwh,kWh,Energy,"kilo Watt hour") \
- X(GJ,gj,GJ,Energy,"Giga Joule") \
- X(M3,m3,m3,Volume,"cubic meter") \
- X(L,l,l,Volume,"litre") \
- X(KW,kw,kW,Power,"kilo Watt") \
- X(M3H,m3h,m3/h,Flow,"cubic meters per hour") \
- X(C,c,°C,Temperature,"celsius") \
- X(F,f,°F,Temperature,"fahrenheit") \
- X(RH,rh,RH,RelativeHumidity,"relative humidity") \
- X(HCA,hca,hca,HCA,"heat cost allocation") \
- X(TXT,txt,txt,Text,"text") \
- X(Second,s,s,Time,"second") \
- X(Hour,h,h,Time,"hour")
+ X(KWH,kwh,"kWh",Energy,"kilo Watt hour") \
+ X(GJ,gj,"GJ",Energy,"Giga Joule") \
+ X(M3,m3,"m3",Volume,"cubic meter") \
+ X(L,l,"l",Volume,"litre") \
+ X(KW,kw,"kW",Power,"kilo Watt") \
+ X(M3H,m3h,"m3/h",Flow,"cubic meters per hour") \
+ X(C,c,"°C",Temperature,"celsius") \
+ X(F,f,"°F",Temperature,"fahrenheit") \
+ X(RH,rh,"RH",RelativeHumidity,"relative humidity") \
+ X(HCA,hca,"hca",HCA,"heat cost allocation") \
+ X(TXT,txt,"txt",Text,"text") \
+ X(Second,s,"s",Time,"second") \
+ X(Hour,h,"h",Time,"hour")
enum class Unit
{
--
2.24.1

View file

@ -0,0 +1,31 @@
From e74ab687e5d424dfbb498373dd7e086f098ac203 Mon Sep 17 00:00:00 2001
From: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Date: Mon, 25 Jul 2022 18:17:02 +0200
Subject: [PATCH] Fix compilation error on gcc 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes the following error:
src/util.cc: In function bool enableLogfile(std::string, bool):
src/util.cc:379:22: error: time was not declared in this scope; did you mean utimes?
379 | time_t now = time(NULL);
| ^~~~
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
---
src/util.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/util.cc b/src/util.cc
index d1d16c23..2d57602a 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -31,6 +31,7 @@
#include<stddef.h>
#include<string.h>
#include<string>
+#include<time.h>
#include<errno.h>
#include<sys/stat.h>
#include<sys/time.h>

View file

@ -1,203 +0,0 @@
From 7d74511dcb26381f5cab0b6c5be15cd6d4126b63 Mon Sep 17 00:00:00 2001
From: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Date: Sun, 1 Mar 2020 20:41:19 +0100
Subject: [PATCH] Make easier to packaging wmbumeters for linux
Makefile:
- Allow to disable stripping of executables as this prevents from
properly creating debug information sub packages,
- Don't invoke any git commands when building from released
tarball. Moreover, when creating an rpm package with additional
patches then the created git repository is the one in which rpm
applies patches and not the original one.
- Allow to pass CXXFLAGS and LDFLAGS as distributions requires all
packages to be compiled with the same set of flags.
- Support to override DESTDIR when installing files.
- Allow to pass additional arguments (EXTRA_INSTALL_OPTION)
for install.sh script from Makefile.
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
---
Makefile | 27 ++++++++++++++++-----------
install.sh | 30 +++++++++++++++---------------
uninstall.sh | 6 +++---
3 files changed, 34 insertions(+), 29 deletions(-)
diff --git a/Makefile b/Makefile
index 290e753..5f5671f 100644
--- a/Makefile
+++ b/Makefile
@@ -20,14 +20,16 @@
# make DEBUG=true
# make DEBUG=true HOST=arm
+DESTDIR?=/
+
ifeq "$(HOST)" "arm"
CXX=arm-linux-gnueabihf-g++
- STRIP=arm-linux-gnueabihf-strip
+ STRIP?=arm-linux-gnueabihf-strip
BUILD=build_arm
DEBARCH=armhf
else
CXX=g++
- STRIP=strip
+ STRIP?=strip
#--strip-unneeded --remove-section=.comment --remove-section=.note
BUILD=build
DEBARCH=amd64
@@ -47,10 +49,10 @@ endif
$(shell mkdir -p $(BUILD))
-COMMIT_HASH:=$(shell git log --pretty=format:'%H' -n 1)
-TAG:=$(shell git describe --tags)
-CHANGES:=$(shell git status -s | grep -v '?? ')
-TAG_COMMIT_HASH:=$(shell git show-ref --tags | grep $(TAG) | cut -f 1 -d ' ')
+COMMIT_HASH?=$(shell git log --pretty=format:'%H' -n 1)
+TAG?=$(shell git describe --tags)
+CHANGES?=$(shell git status -s | grep -v '?? ')
+TAG_COMMIT_HASH?=$(shell git show-ref --tags | grep $(TAG) | cut -f 1 -d ' ')
ifeq ($(COMMIT),$(TAG_COMMIT))
# Exactly on the tagged commit. The version is the tag!
@@ -81,7 +83,10 @@ endif
$(info Building $(VERSION))
-CXXFLAGS := $(DEBUG_FLAGS) -fPIC -fmessage-length=0 -std=c++11 -Wall -Wno-unused-function -I$(BUILD)
+CXXFLAGS ?= $(DEBUG_FLAGS) -fPIC -fmessage-length=0 -std=c++11 -Wall -Wno-unused-function
+CXXFLAGS += -I$(BUILD)
+
+LDFLAGS ?= $(DEBUG_LDFLAGS)
$(BUILD)/%.o: src/%.cc $(wildcard src/%.h)
$(CXX) $(CXXFLAGS) $< -c -E > $@.src
@@ -139,7 +144,7 @@ all: $(BUILD)/wmbusmeters $(BUILD)/testinternals
dist: wmbusmeters_$(DEBVERSION)_$(DEBARCH).deb
install: $(BUILD)/wmbusmeters
- @./install.sh $(BUILD)/wmbusmeters /
+ @./install.sh $(BUILD)/wmbusmeters $(DESTDIR) $(EXTRA_INSTALL_OPTIONS)
uninstall:
@./uninstall.sh /
@@ -162,7 +167,7 @@ wmbusmeters_$(DEBVERSION)_$(DEBARCH).deb:
$(BUILD)/main.o: $(BUILD)/short_manual.h
$(BUILD)/wmbusmeters: $(METER_OBJS) $(BUILD)/main.o $(BUILD)/short_manual.h
- $(CXX) -o $(BUILD)/wmbusmeters $(METER_OBJS) $(BUILD)/main.o $(DEBUG_LDFLAGS) -lpthread
+ $(CXX) -o $(BUILD)/wmbusmeters $(METER_OBJS) $(BUILD)/main.o $(LDFLAGS) -lpthread
$(BUILD)/short_manual.h: README.md
echo 'R"MANUAL(' > $(BUILD)/short_manual.h
@@ -172,10 +177,10 @@ $(BUILD)/short_manual.h: README.md
echo ')MANUAL";' >> $(BUILD)/short_manual.h
$(BUILD)/testinternals: $(METER_OBJS) $(BUILD)/testinternals.o
- $(CXX) -o $(BUILD)/testinternals $(METER_OBJS) $(BUILD)/testinternals.o $(DEBUG_LDFLAGS) -lpthread
+ $(CXX) -o $(BUILD)/testinternals $(METER_OBJS) $(BUILD)/testinternals.o $(LDFLAGS) -lpthread
$(BUILD)/fuzz: $(METER_OBJS) $(BUILD)/fuzz.o
- $(CXX) -o $(BUILD)/fuzz $(METER_OBJS) $(BUILD)/fuzz.o $(DEBUG_LDFLAGS) -lpthread
+ $(CXX) -o $(BUILD)/fuzz $(METER_OBJS) $(BUILD)/fuzz.o $(LDFLAGS) -lpthread
clean:
rm -rf build/* build_arm/* build_debug/* build_arm_debug/* *~
diff --git a/install.sh b/install.sh
index 2a1b12a..966f389 100755
--- a/install.sh
+++ b/install.sh
@@ -205,34 +205,34 @@ fi
####################################################################
##
-## Create /etc/systemd/system/wmbusmeters.service
+## Create /lib/systemd/system/wmbusmeters.service
##
SYSTEMD_NEEDS_RELOAD=false
-if [ -f "$ROOT"/etc/systemd/system/wmbusmeters.service ]
+if [ -f "$ROOT"/lib/systemd/system/wmbusmeters.service ]
then
- echo systemd: removing "$ROOT"/etc/systemd/system/wmbusmeters.service
+ echo systemd: removing "$ROOT"/lib/systemd/system/wmbusmeters.service
echo systemd: backup stored here: ~/old.wmbusmeters.service.backup
- cp "$ROOT"/etc/systemd/system/wmbusmeters.service ~/old.wmbusmeters@.service.backup
- rm "$ROOT"/etc/systemd/system/wmbusmeters.service
+ cp "$ROOT"/lib/systemd/system/wmbusmeters.service ~/old.wmbusmeters@.service.backup
+ rm "$ROOT"/lib/systemd/system/wmbusmeters.service
SYSTEMD_NEEDS_RELOAD=true
fi
-if [ -f "$ROOT"/etc/systemd/system/wmbusmeters@.service ]
+if [ -f "$ROOT"/lib/systemd/system/wmbusmeters@.service ]
then
- echo systemd: removing "$ROOT"/etc/systemd/system/wmbusmeters@.service
+ echo systemd: removing "$ROOT"/lib/systemd/system/wmbusmeters@.service
echo systemd: backup stored here: ~/old.wmbusmeters@.service.backup
- cp "$ROOT"/etc/systemd/system/wmbusmeters@.service ~/old.wmbusmeters@.service.backup
- rm "$ROOT"/etc/systemd/system/wmbusmeters@.service
+ cp "$ROOT"/lib/systemd/system/wmbusmeters@.service ~/old.wmbusmeters@.service.backup
+ rm "$ROOT"/lib/systemd/system/wmbusmeters@.service
SYSTEMD_NEEDS_RELOAD=true
fi
-if [ ! -f "$ROOT"/etc/systemd/system/wmbusmeters@.service ]
+if [ ! -f "$ROOT"/lib/systemd/system/wmbusmeters@.service ]
then
- mkdir -p "$ROOT"/etc/systemd/system/
+ mkdir -p "$ROOT"/lib/systemd/system/
# Create service file
- cat <<EOF > "$ROOT"/etc/systemd/system/wmbusmeters@.service
+ cat <<EOF > "$ROOT"/lib/systemd/system/wmbusmeters@.service
[Unit]
Description="wmbusmeters service on %I"
After=network.target
@@ -265,9 +265,9 @@ PIDFile=/var/run/wmbusmeters/wmbusmeters-%i.pid
WantedBy=multi-user.target
EOF
- echo systemd: installed "$ROOT"/etc/systemd/system/wmbusmeters@.service
+ echo systemd: installed "$ROOT"/lib/systemd/system/wmbusmeters@.service
else
- echo systemd: "$ROOT"/etc/systemd/system/wmbusmeters@.service unchanged
+ echo systemd: "$ROOT"/lib/systemd/system/wmbusmeters@.service unchanged
fi
@@ -308,7 +308,7 @@ fi
if [ "$SYSTEMD_NEEDS_RELOAD" = "true" ]
then
- D=$(diff "$ROOT"/etc/systemd/system/wmbusmeters@.service ~/old.wmbusmeters@.service.backup)
+ D=$(diff "$ROOT"/lib/systemd/system/wmbusmeters@.service ~/old.wmbusmeters@.service.backup)
if [ "$D" != "" ]
then
echo
diff --git a/uninstall.sh b/uninstall.sh
index 5030027..4b62f93 100755
--- a/uninstall.sh
+++ b/uninstall.sh
@@ -52,10 +52,10 @@ then
echo conf dir: removed "$ROOT"/etc/wmbusmeters.d
fi
-if [ -f "$ROOT"/etc/systemd/system/wmbusmeters.service ]
+if [ -f "$ROOT"/lib/systemd/system/wmbusmeters.service ]
then
- rm "$ROOT"/etc/systemd/system/wmbusmeters.service
- echo systemd: removed "$ROOT"/etc/systemd/system/wmbusmeters.service
+ rm "$ROOT"/lib/systemd/system/wmbusmeters.service
+ echo systemd: removed "$ROOT"/lib/systemd/system/wmbusmeters.service
fi
if [ -f "$ROOT"/etc/udev/rules.d/99-wmbus-usb-serial.rules ]
--
2.24.1

View file

@ -1,26 +0,0 @@
From 21463d51e68c887ac5f78fa75229b1e72df8c8f6 Mon Sep 17 00:00:00 2001
From: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Date: Tue, 3 Mar 2020 10:21:33 +0100
Subject: [PATCH] Make wmbusmeters.d directory accessible for the owner
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
---
install.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/install.sh b/install.sh
index 966f389..34929bb 100755
--- a/install.sh
+++ b/install.sh
@@ -197,7 +197,7 @@ if [ ! -d "$ROOT"/etc/wmbusmeters.d ]
then
# Create the configuration directory
mkdir -p "$ROOT"/etc/wmbusmeters.d
- chmod -R 655 "$ROOT"/etc/wmbusmeters.d
+ chmod -R 755 "$ROOT"/etc/wmbusmeters.d
echo conf dir: created "$ROOT"/etc/wmbusmeters.d
else
echo conf dir: "$ROOT"/etc/wmbusmeters.d unchanged
--
2.24.1

View file

@ -1,4 +1,4 @@
loglevel=debug
device=auto
device=auto:c1,t1
logtelegrams=true
format=json

View file

@ -1,5 +1,5 @@
[Unit]
Description="wmbusmeters service on %I"
Description="wmbusmeters service"
Documentation=https://github.com/weetmuts/wmbusmeters
Documentation=man:wmbusmeters(1)
After=network.target
@ -7,8 +7,8 @@ After=network.target
[Service]
Type=forking
ExecStartPre=/bin/mkdir -p /run/wmbusmeters
ExecStart=/usr/sbin/wmbusmetersd --device='%I' /run/wmbusmeters/wmbusmeters-%i.pid
PIDFile=/run/wmbusmeters/wmbusmeters-%i.pid
ExecStart=/usr/bin/wmbusmetersd /run/wmbusmeters/wmbusmeters.pid
PIDFile=/run/wmbusmeters/wmbusmeters.pid
[Install]
WantedBy=multi-user.target

View file

@ -1,40 +1,40 @@
%global with_tag 1
Name: wmbusmeters
%global forgeurl https://github.com/weetmuts/%{name}
%global tag 0.9.27
%global the_binary rtl_wmbus
%if %{with_tag}
%global tag 3.0.0
Version: %{tag}
%else
%global date 20210813
%global commit 8dd3e87c44ecb2e3fc46f7bc6df9ea6195c8b988
Version: 1.4.0
%endif
%forgemeta
Release: 6%{?dist}
Release: 1%{?dist}
Summary: Read the wireless mbus protocol to acquire utility meter readings
License: GPLv3+
License: GPL-3.0-or-later
Url: %{forgeurl}
Source0: %{forgesource}
# Default configuration file
# Stores all logs in journald
Source1: %{name}.conf
Source1: file://%{name}.conf
# Systemd service file
Source2: %{name}@.service
# Upstream reference: https://github.com/weetmuts/wmbusmeters/pull/87
Patch0: %{name}-Make-easier-to-packaging-wmbumeters-for-linux.patch
# Fixes compilation error on gcc >= 10.x
# Upstream reference: https://github.com/weetmuts/wmbusmeters/pull/85
Patch1: %{name}-Fix-compilation-error-on-gcc-10.x.patch
# Fixes crash
# Upstream reference: https://github.com/weetmuts/wmbusmeters/pull/86
Patch2: %{name}-Fix-accessing-empty-string.patch
# Make wmbusmeters.d directory accessible for the owner
# Upstream reference: https://github.com/weetmuts/wmbusmeters/pull/88
Patch3: %{name}-Make-wmbusmeters.d-directory-accessible-for-the-owne.patch
Source2: file://%{name}.service
BuildRequires: /usr/bin/git
BuildRequires: /usr/bin/make
BuildRequires: gcc-c++
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(ncurses)
BuildRequires: pkgconfig(librtlsdr)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(libxml-2.0)
Requires: /usr/bin/rtl_wmbus
Requires: rtl-wmbus >= 0-18
%description
@ -46,18 +46,24 @@ inserted into a database or stored in a log file.
%prep
%forgeautosetup -S git
# For https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
# Unfortunately other distros does not have similar plan so we cannot
# upstream the change for now.
sed -i 's#/sbin#/bin#g' scripts/install_binaries.sh
%configure
%build
%set_build_flags
%{make_build} STRIP=true COMMIT_HASH="" TAG=%{version} COMMIT=%{version} \
TAG_COMMIT=%{version} CHANGES=""
TAG_COMMIT=%{version}%{distprefix} CHANGES=""
%install
%set_build_flags
%{make_install} STRIP=true COMMIT_HASH="" TAG=%{version} COMMIT=%{version} \
TAG_COMMIT=%{version} CHANGES="" \
DESTDIR=%{buildroot} EXTRA_INSTALL_OPTIONS="--no-adduser --no-udev-rules"
DESTDIR=%{buildroot} EXTRA_INSTALL_OPTIONS="--no-adduser"
# We are using journald
rm -rf %{buildroot}%{_sysconfdir}/logrotate.d/
@ -68,36 +74,199 @@ install -m 0755 -d %{buildroot}/%{_rundir}/%{name}/
# Fix systemd unit dir location
mv %{buildroot}/lib %{buildroot}/%{_prefix}
# We are installing template version
rm -f %{buildroot}%{_unitdir}/%{name}.service
# Install default configuration file
install -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}.conf
# Install systemd service file
install -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}@.service
install -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
%files
%license LICENSE
%doc README.md CHANGES HowToAddaNewMeter.txt
%doc README.md CHANGES
%dir %{_sysconfdir}/%{name}.d/
%config(noreplace) %{_sysconfdir}/%{name}.conf
%{_sbindir}/wmbusmetersd
%{_bindir}/wmbusmetersd
%{_bindir}/%{name}
%{_unitdir}/%{name}@.service
%{_unitdir}/%{name}.service
%{_mandir}/man1/%{name}*
%ghost %{_rundir}/%{name}/
%post
%systemd_post %{name}@\*.service
%systemd_post %{name}.service
%preun
%systemd_preun %{name}@\*.service
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}@\*.service
%systemd_postun_with_restart %{name}.service
%changelog
* Thu Aug 06 2026 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 3.0.0-1
- Update to 3.0.0 (rhbz#2490161)
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Mon Mar 02 2026 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 2.0.0-1
- Update to 2.0.0 (rhbz#2443681)
* Tue Feb 03 2026 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.20.0-1
- Update to 1.20.0 (rhbz#2433637)
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Wed May 21 2025 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.19.0-1
- Update to 1.19.0 (rhbz#2354241)
* Tue Jan 21 2025 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.18.0-3
- Fix FTBFS on F42.
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Dec 05 2024 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.18.0-1
- Update to 1.18.0 (rhbz#2329228)
* Mon Oct 07 2024 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.17.1-2
- Rebuilt for updated license tag
* Thu Sep 12 2024 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.17.1-1
- Update to 1.17.1 (rhbz#2307772)
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Apr 05 2024 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.16.1-2
- Rebuild for rtl-sdr-2.0 (rhbz#2273601)
* Fri Feb 23 2024 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.16.1-1
- Update to 1.16.1 (rhbz#2264357)
- Switch to use pkgconfig for BuildRequires
- Specify Require for rtl-wmbus which supports needed -f option
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 07 2023 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.14.0-1
- Update to 1.14.0 (rhbz#2219146)
* Mon May 08 2023 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.13.0-1
- Update to 1.13.0 (rhbz#2196040)
* Mon Mar 13 2023 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.12.0-1
- Update to 1.12.0 (rhbz#2177567)
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jan 13 2023 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.11.0-1
- Update to 1.11.0 (rhbz#2156910)
* Fri Dec 09 2022 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.10.1-1
- Update to 1.10.1 (rhbz#2151407)
* Wed Sep 14 2022 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.9.0-1
- Update to 1.9.0 (rhbz#2124324)
- Drop patch merged upstream
* Tue Jul 26 2022 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.8.0-4
- Fix FTBFS on F37
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 27 2022 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.8.0-2
- Update to 1.8.0 (rhbz#2101195)
- Update change log
* Mon Jun 27 2022 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.8.0-1
- Update to 1.7.0 (rhbz#2101195)
* Wed Apr 06 2022 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.7.0-1
- Update to 1.7.0 (rhbz#2069461)
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Jan 04 2022 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.6.0-1
- Update to 1.6.0 (rhbz#2020903)
* Tue Nov 09 2021 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.5.0-1
- Update to 1.5.0 (rhbz#2020903)
* Tue Aug 31 2021 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.4.1-1
- Update to 1.4.1
* Fri Aug 13 2021 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.4.0-2
- Update to the latest snapshot (fixes compilation errors)
* Thu Aug 12 2021 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.4.0-1
- Update to 1.4.0 (#1991762)
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon May 31 2021 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.3.0-1
- Update to 1.3.0 (#1936290)
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.0-6
- Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
* Mon Feb 22 2021 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.1.0-5
- Update to 1.1.0 (#1922583),
- Remove duplicate BR for make.
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Dec 22 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.0.4-2
- Switch (as per upstream) to non template unit file
* Mon Dec 07 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 1.0.4-1
- Update to the latest available version
* Sat Oct 31 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.36-2
- Allows to build non-released versions
* Tue Sep 08 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.36-1
- Update to the latest available version
* Mon Aug 31 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.35-1
- Update to the latest available version
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.32-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 01 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.32-1
- Update to the latest available version
* Mon May 25 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.31-2
- Add missing ncurses-devel BR
* Mon May 25 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.31-1
- Update to the latest available version
* Thu Apr 23 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.30-1
- Update to the latest available version
* Fri Apr 03 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.29-1
- Update to the latest available version
* Tue Mar 24 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.28-1
- Update to the latest available version
- Drop patches upstream merged
* Mon Mar 23 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.27-6
- Remove -v from the forgemeta
- Remove instead of exclude logrotate.d directory