Builds

For discussion of topics specific to MythTV on OSX
User avatar
bill6502
Developer
Posts: 1112
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Builds

Post by bill6502 » Thu Jul 12, 2018 1:53 pm

The path to this is set at compile time and used to find the Perl script (and
other shared things.)

Code: Select all

https://github.com/MythTV/mythtv/blob/fixes/29/mythtv/libs/libmythbase/dbutil.cpp#L226
If the backend is started with loglevel debug, then this will appear in the log. In
my case, /usr/local is the compile time option and /share is under that:

Code: Select all

mythdirs.cpp:208 (InitializeMythDirs) - sharedir          = /usr/local/share/mythtv/

User avatar
pvr4me
Senior
Posts: 628
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Builds

Post by pvr4me » Fri Jul 13, 2018 10:58 am

Thanks. I guess I need to patch the script to find our copy of mysqldump. MacPorts does some gyrations to allow multiple databases/versions to be installed concurrently so mysqldump isn't in the typical place.

Didn't know about the debug output, either.

Craig
The MacPorts guy.

MoisiePants
Junior
Posts: 28
Joined: Sat Jul 23, 2016 11:41 am
Great Britain

Re: Builds

Post by MoisiePants » Sat Jul 14, 2018 8:57 pm

Hi:

I don't think the issue is that it can't find the script (or possibly mysqldump?).

Here's more stuff from the log file - you'll see it tries the Perl script first, and fails.

Code: Select all

2018-07-14 21:41:57.708528 I [54837/775] CoreContext schemawizard.cpp:120 (Compare) - Current MythTV Schema Version (DBSchemaVer): 1307
2018-07-14 21:41:57.714205 E [54837/775] CoreContext storagegroup.cpp:187 (Init) - SG(DB Backups): Unable to find any Storage Group Directories.  Using hardcoded default value of '/mnt/store'
2018-07-14 21:41:57.714268 E [54837/775] CoreContext storagegroup.cpp:704 (FindNextDirMostFree) - SG(DB Backups): FindNextDirMostFree: '/mnt/store' does not exist!
2018-07-14 21:41:57.715816 E [54837/775] CoreContext dbutil.cpp:604 (DoBackup) - Backing up database with script: '/opt/local/share/mythtv/mythconverg_backup.pl'
...
2018-07-14 21:41:58.379269 E [54837/775] CoreContext dbutil.cpp:620 (DoBackup) - DBUtil: Error backing up database: /opt/local/share/mythtv/mythconverg_backup.pl  /tmp/mythtv_db_backup_conf_Tb76mL (127)
2018-07-14 21:41:58.379310 C [54837/775] CoreContext dbutil.cpp:249 (BackupDB) - Script-based database backup failed. Retrying with internal backup.
2018-07-14 21:41:58.382277 E [54837/775] CoreContext storagegroup.cpp:187 (Init) - SG(DB Backups): Unable to find any Storage Group Directories.  Using hardcoded default value of '/mnt/store'
2018-07-14 21:41:58.382298 E [54837/775] CoreContext storagegroup.cpp:704 (FindNextDirMostFree) - SG(DB Backups): FindNextDirMostFree: '/mnt/store' does not exist!
2018-07-14 21:41:58.382919 C [54837/775] CoreContext dbutil.cpp:711 (DoBackup) - Backing up database to file: '/tmp/mythconverg-1307-20180714204158.sql'
2018-07-14 21:41:58.430212 E [54837/775] CoreContext dbutil.cpp:722 (DoBackup) - DBUtil: Error backing up database: 'mysqldump --defaults-extra-file='/tmp/mythtv_db_backup_conf_rrgylj' --host='localhost' --port='3306' --user='mythtv' --add-drop-table --add-locks --allow-keywords --complete-insert --extended-insert --lock-tables --no-create-db --quick 'mythconverg' > '/tmp/mythconverg-1307-20180714204158.sql' 2>/dev/null' (127)
2018-07-14 21:41:58.447649 D [54837/775] CoreContext dbutil.cpp:852 (CountClients) - DBUtil::CountClients() found 1
2018-07-14 21:42:00.629673 E [54837/775] CoreContext main.cpp:585 (main) - Couldn't upgrade database to new schema.

I haven't yet got a debug environment running, but my current guess is that an invalid backup location (as far as macOS is concerned) is being specified. I am seeing a zero byte file being created in /tmp/mythconverg-1307-20180714204158.sql - but would this be created even if it can't find mysqldump?

User avatar
bill6502
Developer
Posts: 1112
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Builds

Post by bill6502 » Sun Jul 15, 2018 1:51 pm

First, I'd create a DB Backups storage group (actually, I'd create the
Storage Directory before that.) You can put the directory anywhere
you've got space, but make sure both your own user and the mythtv
user have write permission. That will get rid of the initial errors.

Next, /opt/local/share/mythtv/mythconverg_backup.pl is probably failing
for the reason Craig mentioned above. If the backend's PATH has the
/opt..... directory that the SQL files live in, then I'd be interested in changing
mythconverg_backup.pl around line 49 (for @d_allowed_paths) to see if
adding the proper /opt... directory there helps.

And, 127 is a normal return for a non-existent command firing on the last attempt to
backup the DB. But you can run it from the command line to prove that's what's
happening. Just replace the --defaults-extra-file='/tmp/mythtv_db_backup_conf_rrgylj'
part with -p so you'll get prompted for the mythtv password.

Code: Select all

mysqldump  --host='localhost' --port='3306' --user='mythtv' -p --add-drop-table --add-locks --allow-keywords --complete-insert --extended-insert --lock-tables --no-create-db --quick 'mythconverg' > /tmp/just_testing.sql
To answer your last question, it's normal for a file to be created, when
output is redirected. True if the command doesn't even exist or if it's
not in your PATH.

MoisiePants
Junior
Posts: 28
Joined: Sat Jul 23, 2016 11:41 am
Great Britain

Re: Builds

Post by MoisiePants » Tue Jul 17, 2018 7:12 pm

Hello:

Ok - it seems I'm something of an arse.

Mythsetup was not crashing due to an error with the pre-schema-upgrade backups failing (well - yes, they were failing - but that wasn't causing a crash).

In fact, Mythsetup was just exiting because I had told it to do so:

It appears that the two screens which offer the choice of:

(1) - Exit or upgrade the database schema, and
(2) - 'Are you sure?' Exit or upgrade?

...do not respond well to keyboard input. They appear to be inconsistent about which is the default option, and how they respond to arrow key input*. And the UI doesn't update in response to keyboard input either.

In my tests, I was using keyboard entry to navigate Mythsetup - and was falling foul of this trap on both 0.28 and 29.1 releases. However, if I use mouse input to upgrade the database, it proceeds as expected (albeit with the database backup failing).

So - Craig and Bill - I'm very sorry to waste your time and brainpower chasing this red herring - but I'm glad I have a better idea of what's going on now.


Thanks,

Pants.


* I haven't exhaustively explored this behaviour - without UI updates, it's rather difficult to see what's going on... ;)

2kvfr800
Newcomer
Posts: 2
Joined: Tue Sep 18, 2018 8:55 pm
United States of America

Re: Builds

Post by 2kvfr800 » Tue Sep 18, 2018 9:15 pm

is there any new status on this build? I'm a newbie and very interested in this.
i was about to install the .28 macports version. but i need support for hauppauge HDPVR 2. does the .28 or .29 version support the hdpvr2? ir do i need to modify a version? i see there is a testing version for linux, but i haven't seen anything for mac.
Thanks guys any help would be appreciated.

User avatar
pvr4me
Senior
Posts: 628
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Builds

Post by pvr4me » Tue Sep 18, 2018 11:56 pm

2kvfr800 wrote:
Tue Sep 18, 2018 9:15 pm
is there any new status on this build? I'm a newbie and very interested in this.
i was about to install the .28 macports version. but i need support for hauppauge HDPVR 2. does the .28 or .29 version support the hdpvr2? ir do i need to modify a version? i see there is a testing version for linux, but i haven't seen anything for mac.
Thanks guys any help would be appreciated.
The Mac OSX versions do not support the HDPVR devices at all. The Silicondust HDHomerun boxes are the primary hardware devices that you can use with OSX.

Craig
The MacPorts guy.

2kvfr800
Newcomer
Posts: 2
Joined: Tue Sep 18, 2018 8:55 pm
United States of America

Re: Builds

Post by 2kvfr800 » Wed Sep 19, 2018 2:39 am

[/quote]The Mac OSX versions do not support the HDPVR devices at all. The Silicondust HDHomerun boxes are the primary hardware devices that you can use with OSX.

Craig
[/quote]

Thanks for the fast reply, are there any MAC PVR programs outside of hauppauge's program that work with HDPVR 2 and Plex?
What is the most versatile and supported capture device for them mac? I have DTV so a HDHomerun really isn't a option for me. I am really wanting the guide and series recording features.

Thanks

Post Reply