Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 288022 - Ebuild proposal for media-tv/tvheadend
Summary: Ebuild proposal for media-tv/tvheadend
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement with 1 vote (vote)
Assignee: Leho Kraav (:macmaN @lkraav)
URL: http://www.lonelycoder.com/hts/
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2009-10-07 09:07 UTC by Niels Ole Salscheider
Modified: 2012-08-28 00:12 UTC (History)
14 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild proposal for media-tv/tvheadend (tvheadend.tar.gz,1.50 KB, application/octet-stream)
2009-10-07 09:12 UTC, Niels Ole Salscheider
Details
proposed ebuild (tvheadend-9999.ebuild,1.37 KB, text/plain)
2009-10-07 17:27 UTC, Niels Ole Salscheider
Details
Init script (tvheadend.initd,413 bytes, text/plain)
2009-10-07 17:27 UTC, Niels Ole Salscheider
Details
config file for web interface account (anonaccess,180 bytes, text/plain)
2009-10-07 17:28 UTC, Niels Ole Salscheider
Details
Patch for config directory in /etc (settingspath.patch,725 bytes, text/plain)
2009-10-07 17:29 UTC, Niels Ole Salscheider
Details
ebuild for media-tv/tvheadend-2.6 (tvheadend-2.6.ebuild,1.30 KB, text/plain)
2009-11-30 13:41 UTC, Niels Ole Salscheider
Details
media-tv/tvheadend-2.7 (tvheadend-2.7.ebuild,1.40 KB, text/plain)
2009-12-07 14:43 UTC, Niels Ole Salscheider
Details
use shared ffmpeg library (ffmpeg.patch,2.07 KB, text/plain)
2009-12-17 19:02 UTC, Niels Ole Salscheider
Details
tvheadend-2.7-r1 (tvheadend-2.7-r1.ebuild,1.46 KB, text/plain)
2009-12-17 19:04 UTC, Niels Ole Salscheider
Details
media-tv/tvheadend-2.9 (tvheadend-2.9.ebuild,1.42 KB, text/plain)
2010-01-30 09:30 UTC, Niels Ole Salscheider
Details
Init script (tvheadend.1.initd,431 bytes, text/plain)
2010-01-30 09:31 UTC, Niels Ole Salscheider
Details
use shared ffmpeg library (ffmpeg.1.patch,2.12 KB, text/plain)
2010-01-30 09:36 UTC, Niels Ole Salscheider
Details
tvheadend ebuild (tvheadend-2.10.ebuild,1.53 KB, text/plain)
2010-02-20 13:09 UTC, BT
Details
tvheadend init script (tvheadend.initd,375 bytes, text/plain)
2010-02-20 13:10 UTC, BT
Details
tvheadend conf.d file (tvheadend.confd,360 bytes, text/plain)
2010-02-20 13:11 UTC, BT
Details
tvheadend shared ffmpeg library patch (tvheadend-ffmpeg.patch,2.12 KB, text/plain)
2010-02-20 13:14 UTC, BT
Details
tvheadend ebuild (tvheadend-2.10.ebuild,1.50 KB, text/plain)
2010-02-24 10:31 UTC, BT
Details
tvheadend conf.d file (tvheadend.confd,356 bytes, text/plain)
2010-02-24 10:31 UTC, BT
Details
tvheadend-2.11 ebuild (tvheadend-2.11.ebuild,1.62 KB, text/plain)
2010-06-23 11:13 UTC, BT
Details
tvheadend svn ebuild (tvheadend-9999.ebuild,1.65 KB, text/plain)
2010-06-24 03:30 UTC, BT
Details
tvheadend-2.11 ebuild (tvheadend-2.11.ebuild,1.66 KB, text/plain)
2010-07-12 09:03 UTC, BT
Details
tvheadend svn ebuild (tvheadend-9999.ebuild,1.69 KB, text/plain)
2010-07-12 09:04 UTC, BT
Details
tvheadend svn ebuild (tvheadend-9999.ebuild,1.67 KB, text/plain)
2010-10-19 08:04 UTC, BT
Details
tvheadend svn ebuild (tvheadend-9999.ebuild,1.79 KB, text/plain)
2010-10-30 00:14 UTC, BT
Details
tvheadend-2.11 ebuild (tvheadend-2.11.ebuild,1.68 KB, text/plain)
2010-10-31 00:45 UTC, BT
Details
tvheadend-2.12 ebuild (tvheadend-2.12.ebuild,1.69 KB, text/plain)
2010-12-12 01:38 UTC, BT
Details
tvheadend live ebuild (tvheadend-9999.ebuild,1.72 KB, text/plain)
2011-01-05 08:02 UTC, BT
Details
tvheadend live ebuild (tvheadend-9999.ebuild,1.74 KB, text/plain)
2011-01-18 10:53 UTC, BT
Details
tvheadend-9999.ebuild (tvheadend-9999.ebuild,2.24 KB, text/plain)
2011-08-23 08:30 UTC, Marc Perrudin
Details
tvheadend-9999.ebuild (tvheadend-9999.ebuild,1.41 KB, text/plain)
2012-04-24 09:12 UTC, BT
Details
tvheadend-9999.ebuild (tvheadend-9999.ebuild,1.45 KB, text/plain)
2012-07-31 02:15 UTC, BT
Details
tvheadend-2.12.ebuild (tvheadend-2.12.ebuild,1.73 KB, text/plain)
2012-07-31 10:08 UTC, BT
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Niels Ole Salscheider 2009-10-07 09:07:09 UTC
This is an ebuild proposal for tvheadend (http://www.lonelycoder.com/hts/).

It is an live ebuild since tvheadend-2.5 does not support s2api. I will create a regular ebuild once tvheadend-2.6 is released.

Reproducible: Always
Comment 1 Niels Ole Salscheider 2009-10-07 09:12:13 UTC
Created attachment 206290 [details]
Ebuild proposal for media-tv/tvheadend
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2009-10-07 17:22:39 UTC
Please attach things uncompressed.
Comment 3 Niels Ole Salscheider 2009-10-07 17:27:09 UTC
Created attachment 206342 [details]
proposed ebuild
Comment 4 Niels Ole Salscheider 2009-10-07 17:27:37 UTC
Created attachment 206344 [details]
Init script
Comment 5 Niels Ole Salscheider 2009-10-07 17:28:13 UTC
Created attachment 206345 [details]
config file for web interface account
Comment 6 Niels Ole Salscheider 2009-10-07 17:29:35 UTC
Created attachment 206346 [details]
Patch for config directory in /etc
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2009-10-07 18:23:36 UTC
Tvheadend
Combined DVB reciever, Digital Video Recorder and Showtime streaming server for Linux.

Want to record two TV-shows while watching the third? Then Tvheadend is for you.

Configured and administred thru a modern web interface.
Comment 8 Niels Ole Salscheider 2009-11-30 13:41:33 UTC
Created attachment 211587 [details]
ebuild for media-tv/tvheadend-2.6

Tvheadend 2.6 has been released yesterday.
Comment 9 Niels Ole Salscheider 2009-12-07 14:43:21 UTC
Created attachment 212348 [details]
media-tv/tvheadend-2.7

Ebuild for media-tv/tvheadend-2.7
Comment 10 Niels Ole Salscheider 2009-12-17 19:02:41 UTC
Created attachment 213314 [details]
use shared ffmpeg library
Comment 11 Niels Ole Salscheider 2009-12-17 19:04:26 UTC
Created attachment 213315 [details]
tvheadend-2.7-r1

Tvheadend should use the shared ffmpeg library.

Is there any chance to get this ebuild into the portage tree or at least into an overlay?
Comment 12 egon2003 2009-12-29 16:58:13 UTC
This ebuild works great for me.
Comment 13 chrulri 2009-12-29 20:13:11 UTC
works for me too :-)
Comment 14 Niels Ole Salscheider 2010-01-30 09:30:21 UTC
Created attachment 217903 [details]
media-tv/tvheadend-2.9

tvheadend-2.9 has been released
Comment 15 Niels Ole Salscheider 2010-01-30 09:31:02 UTC
Created attachment 217904 [details]
Init script
Comment 16 Niels Ole Salscheider 2010-01-30 09:36:37 UTC
Created attachment 217906 [details]
use shared ffmpeg library
Comment 17 gentoo_rob 2010-02-04 23:29:59 UTC
tvheadend version bumps to 2.10
Comment 18 chrulri 2010-02-04 23:42:19 UTC
just rename tvheadend-2.9.ebuild to tvheadend-2.10.ebuild
it works for me.

with version 2.10 live tv works again with my pvr250 tv tuner and xbmc 9.11
Comment 19 BT 2010-02-20 13:09:35 UTC
Created attachment 220447 [details]
tvheadend ebuild

This is my take on an ebuild for Tvheadend. It's largely based on Niels work so most of the credit goes to him.

I've essentially just cleaned up the ebuild and streamlined a couple things. Niels ebuild still works great so you can continue to use it if you wish.

Changes include:

- The anonaccess file is no longer required. It's auto generated by the init script with -C option.
- Added a conf.d file to allow users to specify an alternate Tvheadend user, group and config path.
- The init script now uses the pid to stop the tvheadend process.
- Various cosmetic changes including a tweaked ebuild description.

Note: If you intend to use my ebuild and have Niels ebuild already installed, it's best to start from a clean slate. Since I've made some changes to the Tvheadend user/group, you should uninstall Tvheadend and delete everything in and including /etc/tvheadend. Remove any existing Tvheadend user, group and init script as well.
Comment 20 BT 2010-02-20 13:10:40 UTC
Created attachment 220449 [details]
tvheadend init script
Comment 21 BT 2010-02-20 13:11:02 UTC
Created attachment 220451 [details]
tvheadend conf.d file
Comment 22 BT 2010-02-20 13:14:28 UTC
Created attachment 220453 [details]
tvheadend shared ffmpeg library patch

This is identical to Niels patch. I have just renamed it since my ebuild uses the "standard" patch naming scheme.
Comment 23 BT 2010-02-23 07:12:54 UTC
I have noticed a strange behavior when Tvheadend is started during boot. Tvheadend starts but it's unable to access my TV card.

/var/log/messages

tvheadend[2325]: dvb: Unable to open /dev/dvb/adapter0/frontend0 -- Permission denied
tvheadend[2325]: v4l: Unable to open /dev/video0 -- Permission denied
tvheadend[2325]: CSA: Using SSE2 128bit parallel descrambling
tvheadend[2325]: START: HTS Tvheadend version 2.10 started, running as PID:2325 UID:103 GID:1009, settings located in '/etc/tvheadend'

I'm using the ebuild and init script I posted, so Tvheadend is being run as the "tvheadend" user and group. The "tvheadend" user is in the "video" group so Tvheadend should have the necessary permissions.

Interestingly when I restart the init script once the system has finished booting, Tvheadend has no problem accessing my TV card and works as expected.

I was able to get it work during boot when started as the "video" group. I think this points to a problem with the way Tvheadend drops it's privileges.

Can anyone else confirm this issue? If so I will post a an updated ebuild and conf.d file.
Comment 24 Niels Ole Salscheider 2010-02-23 10:29:58 UTC
Same problem here; changing the group back to "video" solves it. The documentation says:

In order for Tvheadend to control video adapters on the system it must be granted access to those devices. Most systems have a 'video' group with write access to the video adapter devices. When Tvheadend is started as a daemon (if Tvheadend is installed from a distribution package this is most likely the way it is) it will change its primary group to 'video' in order to access these groups. If your system is configured in a different way you can either change the group membership of the video adapters (/dev/dvb, etc) or reconfigure the Tvheadend start up parameters.

It works on amd64, too; if you update the ebuild, you can add ~amd64...
Comment 25 BT 2010-02-23 10:41:19 UTC
(In reply to comment #24)
I did read that part of the docs but as I mentioned it works fine after restarting the init script once the system has booted. It evens works when I start Tvheadend as a daemon manually in a terminal with my user/group. This issue only happens during boot.

I will update the ebuild shortly and add ~amd64. I must have inadvertently removed it. Thanks for the feedback.
Comment 26 BT 2010-02-24 10:31:16 UTC
Created attachment 220949 [details]
tvheadend ebuild

This ebuild no longer creates the "tvheadend" group. Instead it sets the initial group to "video". This along with the updated conf.d file gives Tvheadend the necessary permissions during boot.

If you have used my previous ebuild you should run the following to get the install to a correct state.

# /etc/init.d/tvheadend stop
# gpasswd -d tvheadend video
# usermod -g video tvheadend
# groupdel tvheadend
# chown -R tvheadend:video /etc/tvheadend
Comment 27 BT 2010-02-24 10:31:43 UTC
Created attachment 220951 [details]
tvheadend conf.d file
Comment 28 Niels Ole Salscheider 2010-03-27 10:44:22 UTC
Tvheadend 2.11 has been released. It is enough to rename the ebuild.
Comment 29 BT 2010-06-23 11:13:25 UTC
Created attachment 236313 [details]
tvheadend-2.11 ebuild

Changes include:

- Moved epatch into src_prepare().
- added dodoc for changelog and readme.
- added sed in src_prepare() to set the version.

To elaborate on the last change, previously the makefile would call support/version.sh. This script uses subversion or git to determine the version/revision during build.

If for example git wasn't installed, Portage would display a bunch of QA messages regarding the 'git' command missing. If git was installed then a bunch of 'fatal: Not a git repository: .git' messages would result in the build output.

As far as I can tell calling support/version.sh is really only needed when building from svn or git which this ebuild does not do. So by setting the version manually it avoids the subversion and git dependencies.
Comment 30 BT 2010-06-24 00:24:36 UTC
I just received some good news from the tvheadend dev regarding the ffmpeg dependency. After making a request to allow the use of the system ffmpeg, he went one better and removed the ffmpeg dep entirely.

He had plans to remove the ffmpeg dep at some point in the future but I didn't expect it to happen so quickly. This means that for 2.12 we no longer need ffmpeg and therefore we also don't need the patch to use the system ffmpeg.
Comment 31 BT 2010-06-24 03:30:08 UTC
Created attachment 236363 [details]
tvheadend svn ebuild

This ebuild hasn't been keyworded since it's an svn ebuild, so you will need to add the following to package.keywords. Adjust the category name to match the name you have in your local overlay.

media-tv/tvheadend **
Comment 32 BT 2010-07-12 09:03:53 UTC
Created attachment 238409 [details]
tvheadend-2.11 ebuild

Changes include:

- Added DEPEND to RDEPEND
- Added xmltv use flag and dependency to RDEPEND
Comment 33 BT 2010-07-12 09:04:52 UTC
Created attachment 238413 [details]
tvheadend svn ebuild

Changes include:

- Added DEPEND to RDEPEND
- Added xmltv use flag and dependency to RDEPEND
Comment 34 BT 2010-10-19 08:04:08 UTC
Created attachment 251217 [details]
tvheadend svn ebuild

Changes include:

- Use emake install
Comment 35 BT 2010-10-30 00:14:34 UTC
Created attachment 252533 [details]
tvheadend svn ebuild

Changes include:

- Remove pre-stripped files
Comment 36 BT 2010-10-31 00:45:45 UTC
Created attachment 252627 [details]
tvheadend-2.11 ebuild

Changes include:

- Cosmetic changes only
Comment 37 BT 2010-12-12 01:38:28 UTC
Created attachment 256934 [details]
tvheadend-2.12 ebuild

Version bump.
Comment 38 BT 2011-01-05 08:02:27 UTC
Created attachment 258901 [details]
tvheadend live ebuild 

Transition live ebuild to git.
Comment 39 BT 2011-01-18 10:53:21 UTC
Created attachment 260125 [details]
tvheadend live ebuild

Set the build version.
Comment 40 Marc Perrudin 2011-08-23 08:30:14 UTC
Created attachment 284323 [details]
tvheadend-9999.ebuild

Thanks for the ebuilds, they are very helpful.

Here is the modified version I use. I've just added the man page and merged the 2 ebuilds.
Comment 41 Kyle Sanderson 2011-08-31 06:03:01 UTC
Any update on this?
Comment 42 Leho Kraav (:macmaN @lkraav) 2011-08-31 09:21:38 UTC
i am running with tvheadend-9999.ebuild now with no apparent issues, thanks for the work guys.
Comment 43 BT 2012-04-24 09:12:29 UTC
Created attachment 309907 [details]
tvheadend-9999.ebuild

Changes:
- Use git-2 eclass
- Depend on virtual/linuxtv-dvb-headers
- Depend on dev-libs/openssl
- Don't install ChangeLog as it no longer exists
- Let build system install man page
- Build system no longer pre-strips files
- Build system no longer uses SVN to set the version number
Comment 44 Travis Hansen 2012-06-07 04:15:47 UTC
I've added this to my personal overlay available here:

http://anon-git.one-gear.com/?p=chaos.git;a=summary

I've added '--datadir=/usr/share/tvheadend' to configure to keep /usr/share from being polluted directly.

Thanks to those who already did all the work!
Comment 45 jamatik 2012-07-31 01:31:54 UTC
repository moved to git://github.com/tvheadend/tvheadend.git
Comment 46 BT 2012-07-31 02:15:36 UTC
Created attachment 319802 [details]
tvheadend-9999.ebuild

Changes:

- Update git repository (Thanks to jamatik)
- Add '--datadir=/usr/share/tvheadend' to prevent '/usr/share' pollution (Thanks to Travis Hansen)
Comment 47 Ben de Groot (RETIRED) gentoo-dev 2012-07-31 08:20:57 UTC
We can get this committed to the portage tree, if someone is willing to step up and be responsible for this package as proxy maintainer. See http://www.gentoo.org/proj/en/qa/proxy-maintainers/index.xml
Comment 48 Leho Kraav (:macmaN @lkraav) 2012-07-31 08:22:45 UTC
I use tvheadend as my primary DVB-T backend. I'll adopt this as my first package baby. What do I have to do?
Comment 49 Ben de Groot (RETIRED) gentoo-dev 2012-07-31 09:15:45 UTC
(In reply to comment #48)
> I use tvheadend as my primary DVB-T backend. I'll adopt this as my first
> package baby. What do I have to do?

I will be your committer.

The page I linked to mentions: "Bugs about the package will be directed toward you (and also your Commiter). However as Proxy-Maintainer you are responsible for responding to the bugs with patches/comments/etc. Be prepared to do this."

Also let me know whenever there is something to commit, like a new version. You can open new bugs for that, so we can keep track of things.

Now, for some reason the ebuild attachment for the 2.12 release was obsoleted, so we need a working ebuild for either the latest release or a snapshot (which are preferred over live ebuilds in the portage tree).
Comment 50 BT 2012-07-31 10:06:33 UTC
(In reply to comment #49)
> Now, for some reason the ebuild attachment for the 2.12 release was
> obsoleted, so we need a working ebuild for either the latest release or a
> snapshot (which are preferred over live ebuilds in the portage tree).

I believe I obsoleted my 2.12 ebuild because Marc Perrudin in comment 40 merged the 2.12 and 9999 ebuilds into one. I will post the current 2.12 ebuild I have in my local overlay.
Comment 51 BT 2012-07-31 10:08:10 UTC
Created attachment 319842 [details]
tvheadend-2.12.ebuild
Comment 52 Ben de Groot (RETIRED) gentoo-dev 2012-08-25 12:40:17 UTC
Now that I'm back from holiday, I have committed this:

+*tvheadend-2.12 (25 Aug 2012)
+
+  25 Aug 2012; Ben de Groot <yngwin@gentoo.org> +files/tvheadend.confd,
+  +files/tvheadend.initd, +metadata.xml, +tvheadend-2.12.ebuild:
+  Initial commit. Ebuild developed by users in bug #288022. Will be proxy-
+  maintained by Leho Kraav.

Please let me know if there are any changes to be committed (especially a better description for the xmltv useflag). If you use github, you can send me pull requests at https://github.com/yngwin/proxy-maint
Comment 53 BT 2012-08-28 00:08:30 UTC
I don't know how I missed this but version 3.0[1] has been out for almost 3 weeks. This makes the 2.12 ebuild obsolete before it was even committed to the tree. I'm not sure if Leo Kraav is working on an ebuild but I will create an ebuild for 3.0 and file a version bump in a new bug.

[1] https://www.lonelycoder.com/redmine/projects/tvheadend/news
Comment 54 Leho Kraav (:macmaN @lkraav) 2012-08-28 00:12:41 UTC
Haven't managed to do anything yet so go for it. I have my hands full going from x86 to amd64. It's going to take a bit to settle this.