Page 3 of 3

Re: Interest in Mythbackend Builds

Posted: Mon Dec 25, 2023 9:37 pm
by pmaloney
I did finally get all the apps to work as executables. I did need to add an rpath to each of them which points to the Qt5 Frameworks. This is okay, but app bundles would be nice.

Some random thoughts...
PKGMGR_INST_PATH in the compile script is used before it's defined. When I disabled app bundles, it was trying to install things in /usr/local instead of my homebrew directory. Simple fix was to swap the 'Build Output Variables' and 'PKGMGR Specific Variables' blocks in the script.

Does the script install XMLTV? I didn't see anything there or in the ansible homebrew main.yaml file (I referenced that to make sure everything was set up correctly). I ultimately just downloaded it from the XMLTV web site and installed it so I could use the SD JSON grabber.

Unfortunately, .33 has one of issues I have with .25 and that is when I'm watching something and get prompted that a recording is about to start and I pick 'switch to recording channel' (whatever it says), it switches to the channel but does not record. In 'Previously Recorded', it looks like it's recording, but nothing is in Media Library. Backend restart is required to clear this.

Because of that last issue, I'm going to stick with .25 for now. With that issue still occurring, there is no reason to switch while SchedulesDirect still supports the old listing format.

I did learn a lot here, though, so I can switch to the new version quickly if I need to.

Cheers and Happy Holidays!

Re: Interest in Mythbackend Builds

Posted: Mon Dec 25, 2023 9:38 pm
by pmaloney
jhoyt wrote:
Sun Dec 24, 2023 3:23 pm
Per the wiki, v33 should be able to upgrade anything from v22 and later:
I exported my .25 db and imported it on my dev machine and started up mythtv-setup.

As the version 1302 changes were being processed, I got a fatal SQL syntax error. I had to update dbcheck.cpp in libmythtv to hard code an ORDER BY argument as the value that was passed was blank. After that was fixed, it looks like it migrated properly. So far, anyway.

Re: Interest in Mythbackend Builds

Posted: Tue Dec 26, 2023 1:08 pm
by jhoyt
pmaloney wrote:
Mon Dec 25, 2023 9:37 pm
I did need to add an rpath to each of them
Would you mind sharing the command you used? I can try to automate that in the compile script.
pmaloney wrote:
Mon Dec 25, 2023 9:37 pm
PKGMGR_INST_PATH in the compile script is used before it's defined. When I disabled app bundles, it was trying to install things in /usr/local instead of my homebrew directory. Simple fix was to swap the 'Build Output Variables' and 'PKGMGR Specific Variables' blocks in the script.
Thanks for note and apologies for the bug. I'll get this fixed shortly. This probably crept in when I moved a bunch of variables around to accommodate the use of homrebrew.
pmaloney wrote:
Mon Dec 25, 2023 9:37 pm
Does the script install XMLTV?
It does not. I've kept the script and ansible playbooks mainly to items required to compile. Looking at it this morning, macports does have xmltv, but homebrew does not.
pmaloney wrote:
Mon Dec 25, 2023 9:37 pm
Unfortunately, .33 has one of issues I have with .25 and that is when I'm watching something and get prompted that a recording is about to start and I pick 'switch to recording channel' (whatever it says), it switches to the channel but does not record. In 'Previously Recorded', it looks like it's recording, but nothing is in Media Library. Backend restart is required to clear this.
When you get the chance, please file an issue report here: https://github.com/MythTV/mythtv/issues

Happy Holidays to you as well!

Re: Interest in Mythbackend Builds

Posted: Tue Dec 26, 2023 1:13 pm
by jhoyt
pmaloney wrote:
Mon Dec 25, 2023 9:38 pm
As the version 1302 changes were being processed, I got a fatal SQL syntax error. I had to update dbcheck.cpp in libmythtv to hard code an ORDER BY argument as the value that was passed was blank. After that was fixed, it looks like it migrated properly. So far, anyway.
This would be another good item to file an issue report on: https://github.com/MythTV/mythtv/issues

Since you've already made the correction, you could alternatively create aa pull request containing the code fix. This would probably be the fastest route to getting it resolved in the official repository.

Unfortunately, I'm not an official dev (just a user that had a macOS problem / need) so I can't commit the changes myself.

Re: Interest in Mythbackend Builds

Posted: Fri Dec 29, 2023 10:58 pm
by pmaloney
jhoyt wrote:
Tue Dec 26, 2023 1:13 pm
pmaloney wrote:
Mon Dec 25, 2023 9:38 pm
As the version 1302 changes were being processed, I got a fatal SQL syntax error. I had to update dbcheck.cpp in libmythtv to hard code an ORDER BY argument as the value that was passed was blank. After that was fixed, it looks like it migrated properly. So far, anyway.
This would be another good item to file an issue report on: https://github.com/MythTV/mythtv/issues

Since you've already made the correction, you could alternatively create aa pull request containing the code fix. This would probably be the fastest route to getting it resolved in the official repository.

Unfortunately, I'm not an official dev (just a user that had a macOS problem / need) so I can't commit the changes myself.
My original change was quick and dirty to make it work for me, but I did find the bug and have a patch for it.

I've worked with GitHub before, but it's been a while. Do I have to create an issue first? I need a branch for a pull request, right? How does that get created?

Thanks!

Re: Interest in Mythbackend Builds

Posted: Fri Dec 29, 2023 11:13 pm
by jhoyt
No need to submit an issue if you're going to create a pull request. Basically you fork the code into your own account (there's a button in the upper right that says "fork" at https://github.com/MythTV/mythtv. Clone your repo, make change, verify the changes, then commit and finally push back to github.

Once you've got everything pushed to github, go back to your fork where you should see a "Contribute" button. Click that and follow the prompts to make a Pull request. Since you'd like this fix to be applied to both master and fixes/33, make sure to note that in the PR test that way whomever picks up the PR knows to apply then cherry-pick the commit onto both branches.

BTW - I have a PR open already to correct the compile script here: https://github.com/MythTV/packaging/pull/174
In the process of fixing the variable issue, I cleaned up some hard codes so that if someone wanted to generate a loop fixing the other app bundles they could more easily.

Re: Interest in Mythbackend Builds

Posted: Sat Dec 30, 2023 5:49 am
by pmaloney
I understand ask for both branches in PR but, in my forked repo, do I do the fix in master or fixes/33 or does it not matter which? Making the changes in fixes/33 would make testing easier.
Thanks, Patrick

Re: Interest in Mythbackend Builds

Posted: Sat Dec 30, 2023 9:08 am
by pmaloney
I created the PR for the schema update issue. Here are answers to other questions:
jhoyt wrote:
Tue Dec 26, 2023 1:08 pm
pmaloney wrote:
Mon Dec 25, 2023 9:37 pm
I did need to add an rpath to each of them
Would you mind sharing the command you used? I can try to automate that in the compile script.

Code: Select all

for i in myth*; do install_name_tool -add_rpath "/Users/mythtv/Documents/homebrew/opt/qt@5/Frameworks" $i; done
Needs to point to Qt5 Frameworks. I run this in the output bin directory. It errors out on a couple of perl scripts, but that's fine.
jhoyt wrote:
Tue Dec 26, 2023 1:08 pm
pmaloney wrote:
Mon Dec 25, 2023 9:37 pm
Does the script install XMLTV?
It does not. I've kept the script and ansible playbooks mainly to items required to compile. Looking at it this morning, macports does have xmltv, but homebrew does not.
I installed it from the XMLTV web site.
jhoyt wrote:
Tue Dec 26, 2023 1:08 pm
pmaloney wrote:
Mon Dec 25, 2023 9:37 pm
Unfortunately, .33 has one of issues I have with .25 and that is when I'm watching something and get prompted that a recording is about to start and I pick 'switch to recording channel' (whatever it says), it switches to the channel but does not record. In 'Previously Recorded', it looks like it's recording, but nothing is in Media Library. Backend restart is required to clear this.
When you get the chance, please file an issue report here: https://github.com/MythTV/mythtv/issues
I'll poke around in the code first and see if I can narrow it down.

Re: Interest in Mythbackend Builds

Posted: Mon Jan 01, 2024 4:50 pm
by jhoyt
pmaloney wrote:
Sat Dec 30, 2023 9:08 am

Code: Select all

for i in myth*; do install_name_tool -add_rpath "/Users/mythtv/Documents/homebrew/opt/qt@5/Frameworks" $i; done
Needs to point to Qt5 Frameworks. I run this in the output bin directory. It errors out on a couple of perl scripts, but that's fine.
Thank you - I think I figured out the issue. The rebaselibs functions was failing in some cases. I've fixed that and added your rpath fix as it "shouldn't" hurt anything else.

My apologies that it took so long to look into it. My homebrew system has an issue where homebrew's QT was looking for MacOSSDK14.0, but it wasn't symlinked on my system. Apparently when Apple pushed out SDK 14.2 they symlinked to 14 and 14.1, and 14.2, but not 14.0.

Once my local tests complete, I'll be testing the fix on the gihub runner, then update the PR's I opened last week.

Happy New Year!

Re: Interest in Mythbackend Builds

Posted: Wed Jan 10, 2024 5:08 pm
by pmaloney
I created another pull request: https://github.com/MythTV/mythtv/pull/842

More changes to dbcheck.cpp to fix additional SQL errors migrating from .25 to .33 that did not cause the process to terminate. Now migrates cleanly and default recording template gets created.

UPDATE: Merged into master and fixes/33

Re: Interest in Mythbackend Builds

Posted: Wed Jan 10, 2024 5:39 pm
by pmaloney
Using exes only, I've got everything (exes, libs, Qt Frameworks/plugins) rebased so I can rename the homebrew directory and move app prefix anywhere and it still "works".

However, when the backend tries to run mythfilldatabase and the frontend tries to access files in the 'share' directory, they are both using an absolute path with the original build prefix. Any simple solution to make those relative?

-Patrick

Re: Interest in Mythbackend Builds

Posted: Sun Jan 14, 2024 8:01 pm
by jhoyt
pmaloney wrote:
Wed Jan 10, 2024 5:39 pm
Using exes only, I've got everything (exes, libs, Qt Frameworks/plugins) rebased so I can rename the homebrew directory and move app prefix anywhere and it still "works".

However, when the backend tries to run mythfilldatabase and the frontend tries to access files in the 'share' directory, they are both using an absolute path with the original build prefix. Any simple solution to make those relative?
I believe those get hard coded in configure process via the --runprefix flag

In the compile script, runprefix gets set to the INSTALL_DIR input.

The simpliest solution is probably to set the INSTALL_DIR to the location where you would like the mythtv package to be installed and don't move it :)

Code: Select all

--custom-install-dir=INSTALL_DIR