Bug 282541 - net/teddycloud: update to 0.6.2
Summary: net/teddycloud: update to 0.6.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Matthias Fechner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-04 15:06 UTC by Matthias Fechner
Modified: 2024-11-05 06:59 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (freebsd)


Attachments
Update to 0.6.2 (5.60 KB, patch)
2024-11-04 15:06 UTC, Matthias Fechner
no flags Details | Diff
updated patch to 0.6.2 (10.40 KB, patch)
2024-11-04 18:16 UTC, Matthias Fechner
no flags Details | Diff
Update to 0.6.2 (12.13 KB, patch)
2024-11-04 20:32 UTC, Matthias Fechner
no flags Details | Diff
Fixed update to teddycloud 0.6.2 (2.39 KB, patch)
2024-11-04 21:36 UTC, Michael Pape
no flags Details | Diff
Fixed update to teddycloud 0.6.2 (2.43 KB, patch)
2024-11-04 21:57 UTC, Michael Pape
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Fechner freebsd_committer freebsd_triage 2024-11-04 15:06:15 UTC
Created attachment 254934 [details]
Update to 0.6.2
Comment 1 Matthias Fechner freebsd_committer freebsd_triage 2024-11-04 15:07:14 UTC
Can you please test the attached update to latest version 0.6.2 if it is working and if it would be ok if I would commit it?
Comment 2 Matthias Fechner freebsd_committer freebsd_triage 2024-11-04 15:20:39 UTC
There are build failures:
https://pkg.fechner.net/build.html?mastername=141amd64-cicd&build=2024-11-04_17h16m06s

I will try to ask upstream.
Comment 3 Matthias Fechner freebsd_committer freebsd_triage 2024-11-04 15:25:42 UTC
Created issue upstream:
https://github.com/toniebox-reverse-engineering/teddycloud/issues/237
Comment 4 Matthias Fechner freebsd_committer freebsd_triage 2024-11-04 18:16:10 UTC
Created attachment 254942 [details]
updated patch to 0.6.2

With this patch compilation is now fine.
I can currently not test if it runs correctly, so would be nice if you can do a functional test.
Comment 5 Matthias Fechner freebsd_committer freebsd_triage 2024-11-04 18:33:33 UTC
Fix in teddycloud is provided upstream here:
https://github.com/toniebox-reverse-engineering/teddycloud/pull/238
Comment 6 Matthias Fechner freebsd_committer freebsd_triage 2024-11-04 18:46:45 UTC
It compiles now fine:
https://pkg.fechner.net/data/141amd64-cicd/2024-11-04_20h11m54s/logs/teddycloud-0.6.2.log
Comment 7 Michael Pape 2024-11-04 20:16:04 UTC
I have runtime issues with the build. At the moment I'm looking at "This sanitizer is not compatible with enabled ASLR and binaries compiled with PIE". The upstream Makefile has a NO_SANITIZERS option, but setting that results in a linker error. I'll keep trying, but might take a few days.
Comment 8 Matthias Fechner freebsd_committer freebsd_triage 2024-11-04 20:32:30 UTC
Created attachment 254945 [details]
Update to 0.6.2

I see currently some problems with executing the binary:
teddycloud
This sanitizer is not compatible with enabled ASLR and binaries compiled with PIE

If I disable the sanitizers, compilation fails:
MAKE_ARGS+=   NO_SANITIZERS=1

Maybe you have a idea how to fix that?
Comment 9 Michael Pape 2024-11-04 20:37:51 UTC
(In reply to Matthias Fechner from comment #8)

I'm confused, but I just assume you saw the same issues I did and didn't read my comment. I think the sanitiser implies pthreads to be linke, so NO_SANITIZERS fails to link due to the missing library. I'm trying to patch the Makefile right now to get this to build as expected.
Comment 10 Michael Pape 2024-11-04 20:53:16 UTC
Got it to build and run. Produces a warning stating that frontend and backend have different versions. I'll see if I can fix that.
Comment 11 Michael Pape 2024-11-04 21:36:40 UTC
Created attachment 254948 [details]
Fixed update to teddycloud 0.6.2
Comment 12 Michael Pape 2024-11-04 21:53:42 UTC
Comment on attachment 254948 [details]
Fixed update to teddycloud 0.6.2

diff --git a/net/teddycloud/Makefile b/net/teddycloud/Makefile
index 1b925fbdaf7b..0d0ccd8ed1a6 100644
--- a/net/teddycloud/Makefile
+++ b/net/teddycloud/Makefile
@@ -42,7 +42,8 @@ GH_TAGNAME=	v1.7.15-33-gacc7623:cJSON \
 
 USE_RC_SUBR=	teddycloudd
 MAKE_ENV+=	CONFIG_RUNTIME_BASE_PATH=${PREFIX}/etc/teddycloud \
-		RUNTIME_BASE_PATH=${PREFIX}/share/teddycloud
+		RUNTIME_BASE_PATH=${PREFIX}/share/teddycloud \
+		NO_SANITIZERS=1
 # This did reliably fail due to some unknown deps when using parallel build
 MAKE_JOBS_UNSAFE=	yes
 ALL_TARGET=	preinstall
diff --git a/net/teddycloud/files/patch-Makefile b/net/teddycloud/files/patch-Makefile
index 058b213b8b82..599b4a863de0 100644
--- a/net/teddycloud/files/patch-Makefile
+++ b/net/teddycloud/files/patch-Makefile
@@ -11,9 +11,36 @@
 -build_gitTag:=${shell git name-rev --tags --name-only $(build_gitSha)}
 +build_gitDirty:=0
 +build_gitDateTime:="2024-10-26 18:14:34 +0000"
-+build_gitShortSha:=203f12d
++build_gitShortSha:=203f12d3
 +build_gitSha:=203f12d3d357d16268b83c7bdedb332820b9e87a
 +build_gitTag:=tc_v0.6.2
  build_platform:=$(PLATFORM)
  build_os:="$(OS)"
  
+@@ -70,12 +70,12 @@ endif
+ 	CFLAGS_VERSION+=-DBUILD_VERSION=\"${build_version}\" 
+ endif
+ 
+-web_gitDirty:=${shell cd $(WEB_SRC_DIR) && git diff --quiet && echo '0' || echo '1'}
+-web_gitDateTime:="${shell cd $(WEB_SRC_DIR) && git log -1 --format=%ai}"
+-web_gitShortSha:=${shell cd $(WEB_SRC_DIR) && git rev-parse --short HEAD}
+-web_gitSha:=${shell cd $(WEB_SRC_DIR) && git rev-parse HEAD}
+-web_gitTag:=${shell cd $(WEB_SRC_DIR) && git name-rev --tags --name-only $(web_gitSha)}
+-web_gitTagPrefix:=$(firstword $(subst _, ,$(web_gitTag)))
++web_gitDirty:=0
++web_gitDateTime:="2024-10-26 06:25:22 +0200"
++web_gitShortSha:=e4d9fc1
++web_gitSha:=e4d9fc19e493933c2020be2d40ee5de2f07d7eef
++web_gitTag:=tcw_v0.6.2
++web_gitTagPrefix:=tcw
+ web_version:=vX.X.X
+ CFLAGS_VERSION+=-DWEB_GIT_IS_DIRTY=${web_gitDirty} -DWEB_GIT_DATETIME=\"${web_gitDateTime}\" -DWEB_RAW_DATETIME=\"${web_rawDateTime}\" -DWEB_GIT_SHORT_SHA=\"${web_gitShortSha}\" -DWEB_GIT_SHA=\"${web_gitSha}\" -DWEB_GIT_TAG=\"${web_gitTag}\"
+ ifeq ($(web_gitTagPrefix),tcw)
+@@ -153,6 +153,7 @@ CFLAGS_linux += -DFFMPEG_DECODING
+ endif
+ CFLAGS_linux += -ggdb
+ CFLAGS_linux += -DFFMPEG_DECODING
++LFLAGS_linux += -pthread -lm
+ 
+ # for now enable extensive error checking
+ # Add flags for extensive error checking if NO_SANITIZERS is not set to 1
Comment 13 Michael Pape 2024-11-04 21:55:33 UTC
Comment on attachment 254948 [details]
Fixed update to teddycloud 0.6.2

diff --git a/net/teddycloud/Makefile b/net/teddycloud/Makefile
index 1b925fbdaf7b..0d0ccd8ed1a6 100644
--- a/net/teddycloud/Makefile
+++ b/net/teddycloud/Makefile
@@ -42,7 +42,8 @@ GH_TAGNAME=	v1.7.15-33-gacc7623:cJSON \
 
 USE_RC_SUBR=	teddycloudd
 MAKE_ENV+=	CONFIG_RUNTIME_BASE_PATH=${PREFIX}/etc/teddycloud \
-		RUNTIME_BASE_PATH=${PREFIX}/share/teddycloud
+		RUNTIME_BASE_PATH=${PREFIX}/share/teddycloud \
+		NO_SANITIZERS=1
 # This did reliably fail due to some unknown deps when using parallel build
 MAKE_JOBS_UNSAFE=	yes
 ALL_TARGET=	preinstall
diff --git a/net/teddycloud/files/patch-Makefile b/net/teddycloud/files/patch-Makefile
index 058b213b8b82..599b4a863de0 100644
--- a/net/teddycloud/files/patch-Makefile
+++ b/net/teddycloud/files/patch-Makefile
@@ -11,9 +11,36 @@
 -build_gitTag:=${shell git name-rev --tags --name-only $(build_gitSha)}
 +build_gitDirty:=0
 +build_gitDateTime:="2024-10-26 18:14:34 +0000"
-+build_gitShortSha:=203f12d
++build_gitShortSha:=203f12d3
 +build_gitSha:=203f12d3d357d16268b83c7bdedb332820b9e87a
 +build_gitTag:=tc_v0.6.2
  build_platform:=$(PLATFORM)
  build_os:="$(OS)"
  
+@@ -70,12 +70,12 @@ endif
+ 	CFLAGS_VERSION+=-DBUILD_VERSION=\"${build_version}\" 
+ endif
+ 
+-web_gitDirty:=${shell cd $(WEB_SRC_DIR) && git diff --quiet && echo '0' || echo '1'}
+-web_gitDateTime:="${shell cd $(WEB_SRC_DIR) && git log -1 --format=%ai}"
+-web_gitShortSha:=${shell cd $(WEB_SRC_DIR) && git rev-parse --short HEAD}
+-web_gitSha:=${shell cd $(WEB_SRC_DIR) && git rev-parse HEAD}
+-web_gitTag:=${shell cd $(WEB_SRC_DIR) && git name-rev --tags --name-only $(web_gitSha)}
+-web_gitTagPrefix:=$(firstword $(subst _, ,$(web_gitTag)))
++web_gitDirty:=0
++web_gitDateTime:="2024-10-26 06:25:22 +0200"
++web_gitShortSha:=e4d9fc1
++web_gitSha:=e4d9fc19e493933c2020be2d40ee5de2f07d7eef
++web_gitTag:=tcw_v0.6.2
++web_gitTagPrefix:=tcw
+ web_version:=vX.X.X
+ CFLAGS_VERSION+=-DWEB_GIT_IS_DIRTY=${web_gitDirty} -DWEB_GIT_DATETIME=\"${web_gitDateTime}\" -DWEB_RAW_DATETIME=\"${web_rawDateTime}\" -DWEB_GIT_SHORT_SHA=\"${web_gitShortSha}\" -DWEB_GIT_SHA=\"${web_gitSha}\" -DWEB_GIT_TAG=\"${web_gitTag}\"
+ ifeq ($(web_gitTagPrefix),tcw)
+@@ -153,6 +153,7 @@ CFLAGS_linux += -DFFMPEG_DECODING
+ endif
+ CFLAGS_linux += -ggdb
+ CFLAGS_linux += -DFFMPEG_DECODING
++LFLAGS_linux += -pthread -lm
+ 
+ # for now enable extensive error checking
+ # Add flags for extensive error checking if NO_SANITIZERS is not set to 1
Comment 14 Michael Pape 2024-11-04 21:57:22 UTC
Created attachment 254949 [details]
Fixed update to teddycloud 0.6.2
Comment 15 Michael Pape 2024-11-04 22:03:43 UTC
Patch builds now and is running successfully.
Upstream PR to address linker errors: https://github.com/toniebox-reverse-engineering/teddycloud/pull/242
Comment 16 commit-hook freebsd_committer freebsd_triage 2024-11-05 06:56:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=753f37087249da4f51266d10e1b7de53cc98bc64

commit 753f37087249da4f51266d10e1b7de53cc98bc64
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2024-11-04 15:02:48 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2024-11-05 06:51:40 +0000

    net/teddycloud: update to 0.6.2

    Thanks to Michael (maintainer) for fixing the linker issue, see also here:
    https://github.com/toniebox-reverse-engineering/teddycloud/pull/242

    The next release of teddycloud will include all necessary modifications, so patches
    can be removed from ports with a newer release.

    Changes:        https://github.com/toniebox-reverse-engineering/teddycloud/releases

    PR:             282541
    Approved by:    freebsd@pe82.de (maintainer)

 net/teddycloud/Makefile                            | 28 ++++++++----
 net/teddycloud/distinfo                            | 26 +++++------
 net/teddycloud/files/patch-Makefile                | 48 +++++++++++++++++---
 ...patch-src_cyclone_common_compiler__port.h (new) | 11 +++++
 net/teddycloud/pkg-message (new)                   | 27 +++++++++++
 net/teddycloud/pkg-plist                           | 52 ++++++++++++++++++----
 6 files changed, 156 insertions(+), 36 deletions(-)
Comment 17 Matthias Fechner freebsd_committer freebsd_triage 2024-11-05 06:59:53 UTC
(In reply to Michael Pape from comment #15)
Thanks a lot Michael for the lib fix.
I added a short instruction that is display if the teddycloud is installed the first time. This can maybe be finetuned a little bit more.

I also prepared configurations that will make the Makefile patch with the next teddycloud version obsolete.