Opened 8 years ago

Closed 8 years ago

#34900 closed submission (fixed)

mythtv-core.25

Reported by: ctreleaven (Craig Treleaven) Owned by: pixilla (Bradley Giesbrecht)
Priority: Normal Milestone:
Component: ports Version: 2.1.1
Keywords: Cc: michaelld (Michael Dickens), pixilla (Bradley Giesbrecht), neverpanic (Clemens Lang)
Port: mythtv-core.25

Description

MythTV is the premiere personal video recorder (PVR) under Linux. Mac OS X has been supported primarily as a frontend. This port aims to also allow OS X to be an easy-to-install and more feature-complete backend server.

This port file, mythtv-core.25, provides the backend server, frontend and ancillary programs (mythtv-setup, mythfilldatabase, etc).

A separate port is in development to provide MythTV plugins. Creatively enough, it will be named mythtv-plugins.25. Another port, which can technically stand on its own may also be developed to install Myth's web frontend, MythWeb (mythweb.25).

Regarding versions, Myth requires that frontend and backends be of the same version: .25 with .25, etc. Upstream continues to support older versions with bug fixes For example, even though development is now focused on pre.26, a bug fix to .23 was committed recently. MythTV users tend to be quite conservative about updating major versions as the MySQL schema is virtually always changed in a new major version. Upgrades are automatic but there is no way to downgrade short of restoring a backup. Any recordings made in the interim then become orphans. Therefore, I feel it is worthwhile to have separate ports for each major version and plan to develop mythtv-core.26, etc when that version is released.

Note that this is my first significant portfile contribution and I had no prior experience with TCL. Many thanks to Michael D and pixilla for mentoring, guidance and code samples. Any errors, awkwardness or other problems are mine along and I would gratefully appreciate corrections and suggestions.

Attachments (6)

files.zip (24.8 KB) - added by ctreleaven (Craig Treleaven) 8 years ago.
patches, applescripts, plist; tabs removed
Portfile (12.1 KB) - added by ctreleaven (Craig Treleaven) 8 years ago.
/opt/local --> ${prefix}
Portfile.2 (12.6 KB) - added by ctreleaven (Craig Treleaven) 8 years ago.
Updated.
files.2.zip (30.1 KB) - added by ctreleaven (Craig Treleaven) 8 years ago.
Updated
files.3.zip (9.1 KB) - added by neverpanic (Clemens Lang) 8 years ago.
Portfile.3 (13.1 KB) - added by neverpanic (Clemens Lang) 8 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 8 years ago by ctreleaven (Craig Treleaven)

BTW, I realize the attached files are formatted with tabs. I can convert to spaces easily enough and re-submit, if desired.

Changed 8 years ago by ctreleaven (Craig Treleaven)

Attachment: files.zip added

patches, applescripts, plist; tabs removed

comment:2 Changed 8 years ago by neverpanic (Clemens Lang)

Cc: cal@… added

Cc Me!

comment:3 Changed 8 years ago by neverpanic (Clemens Lang)

The Portfile hardcodes /opt/local in several places; please replace those with ${prefix}. Also installing the startup item seems to be especially cubersome. MacPorts offers automation for most of the process; see startupitem.* in man portfile.

comment:4 Changed 8 years ago by ctreleaven (Craig Treleaven)

Two occurrences of /opt/local are replaced with ${prefix} in the attached.

Re the launchd plist, I need HOME and PATH environment variables set and I did not see a way to do that with the MacPorts facility. Please let me know if I missed something.

Changed 8 years ago by ctreleaven (Craig Treleaven)

Attachment: Portfile added

/opt/local --> ${prefix}

comment:5 Changed 8 years ago by ctreleaven (Craig Treleaven)

Revised files attached. Hopefully this doesn't screw up a reviewer.

1) Add PYTHONPATH to launched plist to resolve problems with metadatalookup.

2) Add additional applescript to aid stopping and starting the backend.

3) Install Myth's icon in main applescripts so they'll look nice on the dock!

Changed 8 years ago by ctreleaven (Craig Treleaven)

Attachment: Portfile.2 added

Updated.

Changed 8 years ago by ctreleaven (Craig Treleaven)

Attachment: files.2.zip added

Updated

comment:6 Changed 8 years ago by pixilla (Bradley Giesbrecht)

You have a hard coded Users home path in files/Myth_Frontend_Logging.scpt.

comment:7 Changed 8 years ago by ctreleaven (Craig Treleaven)

Whoops, leftover from testing. It should be deleted and the line immediately following uncommented.

comment:8 Changed 8 years ago by neverpanic (Clemens Lang)

Keywords: mythtv pvr multimedia removed

A couple of comments:

  • I have converted all .scpt files to .applescript text files for easier readability and easier patching
  • I've converted all whitespace in the Portfile to spaces, like the modeline says
  • /etc is a symlink to /private/etc on OS X, you don't need to reinplace that into mythconverg_{backup,restore}.pl
  • Does the port not build with llvm-gcc-4.2? apple-gcc-4.2 is really ancient and I'd rather have the port use a different (preferably pre-installed) compiler, if possible
  • Do not reinplace inside ${filespath}; that's the MacPorts repository and these files are subject to change with every sync; run reinplace after copying the file
  • xinstall -c is the default
  • destroot.keepdirs is only necessary for empty directories and should be specified outside any phase
  • The link in /Library/LaunchDaemons should be present in the archive and thus needs to be generated in destroot phase
  • Myth_Frontend_Logging.applescript uses ${applications_dir} and thus must be reinplaced with whatever the user has configured this to. This, too, should not be done in ${filesdir}. I have moved reinplacing the scripts into post-patch phase.

Is mythtv run as root with your plist file? Does mythtv need to run as root? Can we create a new user and setuid() to that user instead?

So far my static analysis of the Portfile. I have attached the Portfile and files directory with my current modifications and will now rebuild qt4-mac with +mysql to start debugging.

Changed 8 years ago by neverpanic (Clemens Lang)

Attachment: files.3.zip added

Changed 8 years ago by neverpanic (Clemens Lang)

Attachment: Portfile.3 added

comment:9 Changed 8 years ago by pixilla (Bradley Giesbrecht)

Owner: changed from macports-tickets@… to pixilla@…

See r96917

comment:10 Changed 8 years ago by pixilla (Bradley Giesbrecht)

Resolution: fixed
Status: newclosed

See r96917

Note: See TracTickets for help on using tickets.