Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MythTV won't recompile: how to proceed?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
jamtat
Apprentice
Apprentice


Joined: 09 Aug 2003
Posts: 162

PostPosted: Fri Feb 05, 2016 9:35 pm    Post subject: Reply with quote

danomac wrote:
There's really no right or wrong way to deal with this - just be aware that running `emerge --depclean` can remove kernel sources, including the sources for the kernel in use.

I discovered this once I started investigating further according to wankykootiepooper's (this guy deserves some kind of award for coming up with the most non-masculine-sounding user name in computer forum history, doesn't he?) suggestions that this is precisely the scenario I am now facing. Namely, that sources for my currently-running kernel got removed by an emerge --depclean I'd been advised by my system to run. Further, so far as I can gather from the bit of research I've conducted to date, the sources for my kernel are no longer available from Gentoo (it's not listed in the "available versions" column at https://packages.gentoo.org/packages/sys-kernel/gentoo-sources). So it looks like the step of running a command like emerge --noreplace sys-kernel/gentoo-sources:3.18.7 will be inapplicable for my scenario: I've lost the opportunity to do that, correct?

I'm now trying to determine how much of an impact absence of my running kernel's sources will have on future operation of this machine. As I said, it's doubtful I'll be needing them in order to recompile the kernel--that being a task I'm aiming to defer for as long as will be possible and one that, should it eventually happen, will almost certainly involve a newer kernel and sources. But won't compilation of some other package or utility depend on having sources from the currently-running kernel available?

And, on a more MythTV-related note, I forgot to ask about why the system required that the -theora flag needed to be set in order for the newer MythTV to compile this time? I don't anticipate needing to view any ogg theora videos on this machine in the near future. But it is a video format that I could bump into at some point in the future.
Back to top
View user's profile Send private message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 881
Location: Vancouver, BC

PostPosted: Sat Feb 06, 2016 2:28 am    Post subject: Reply with quote

jamtat wrote:
Further, so far as I can gather from the bit of research I've conducted to date, the sources for my kernel are no longer available from Gentoo (it's not listed in the "available versions" column at https://packages.gentoo.org/packages/sys-kernel/gentoo-sources). So it looks like the step of running a command like emerge --noreplace sys-kernel/gentoo-sources:3.18.7 will be inapplicable for my scenario: I've lost the opportunity to do that, correct?


Unfortunately it will only work on a package that's installed. So yes, you've lost the opportunity to do that.

jamtat wrote:

I'm now trying to determine how much of an impact absence of my running kernel's sources will have on future operation of this machine. As I said, it's doubtful I'll be needing them in order to recompile the kernel--that being a task I'm aiming to defer for as long as will be possible and one that, should it eventually happen, will almost certainly involve a newer kernel and sources. But won't compilation of some other package or utility depend on having sources from the currently-running kernel available?


Yes and no. Some packages do check the kernel configuration and will fail if it sees required kernel options are not set. Then you're buggered, you'll have to install and build a newer version.

In your case, I see that 3.18.25-r1 is stable:

Code:

$ eshowkw gentoo-sources
Keywords for sys-kernel/gentoo-sources:
             |                                 | u            | 
             | a a   a         n   p r     s   | n            | 
             | l m   r h i m m i   p i s   p   | u s          | r
             | p d a m p a 6 i o p c s 3   a x | s l          | e
             | h 6 r 6 p 6 8 p s p 6 c 9 s r 8 | e o          | p
             | a 4 m 4 a 4 k s 2 c 4 v 0 h c 6 | d t          | o
-------------+---------------------------------+--------------+-------
  3.4.110    | ~ ~ ~ o ~ ~ o o o ~ ~ o ~ ~ ~ ~ | o 3.4.110    | gentoo
-------------+---------------------------------+--------------+-------
 3.4.9999    | o o o o o o o o o o o o o o o o | o 3.4.9999   | gentoo
-------------+---------------------------------+--------------+-------
  3.10.95    | + + + o + + o ~ o + + o ~ ~ + + | o 3.10.95    | gentoo
-------------+---------------------------------+--------------+-------
  3.12.52-r1 | + + + o + + o ~ o + + o ~ ~ + + | o 3.12.52-r1 | gentoo
-------------+---------------------------------+--------------+-------
3.12.9999    | o o o o o o o o o o o o o o o o | o 3.12.9999  | gentoo
-------------+---------------------------------+--------------+-------
  3.14.58-r1 | + + + ~ + + o ~ o + + o ~ ~ + + | o 3.14.58-r1 | gentoo
-------------+---------------------------------+--------------+-------
  3.14.59    | ~ ~ ~ ~ ~ ~ o ~ o ~ ~ o ~ ~ ~ ~ | o 3.14.59    | gentoo
-------------+---------------------------------+--------------+-------
  3.18.25-r1 | ~ + ~ ~ - ~ o ~ o ~ ~ o ~ ~ ~ ~ | o 3.18.25-r1 | gentoo  <---- HERE!
-------------+---------------------------------+--------------+-------
    4.0.4    | ~ ~ ~ ~ - ~ o ~ o ~ ~ o ~ ~ ~ ~ | o 4.0.4      | gentoo
-------------+---------------------------------+--------------+-------
    4.0.9    | + + + ~ - + o ~ o + + o ~ ~ + + | o 4.0.9      | gentoo
-------------+---------------------------------+--------------+-------
[I]4.1.12    | + + ~ ~ - + o ~ o + + o ~ ~ + + | o 4.1.12     | gentoo
-------------+---------------------------------+--------------+-------
   4.1.15-r1 | ~ + ~ ~ - ~ o ~ o ~ ~ o ~ ~ ~ ~ | o 4.1.15-r1  | gentoo
-------------+---------------------------------+--------------+-------
   4.1.16    | ~ ~ ~ ~ - ~ o ~ o ~ ~ o ~ ~ ~ ~ | o 4.1.16     | gentoo
-------------+---------------------------------+--------------+-------
    4.3.3-r1 | ~ ~ ~ ~ - ~ o ~ o ~ ~ o ~ ~ ~ ~ | o 4.3.3-r1   | gentoo
-------------+---------------------------------+--------------+-------
    4.3.4    | ~ ~ ~ ~ - ~ o ~ o ~ ~ o ~ ~ ~ ~ | o 4.3.4      | gentoo
-------------+---------------------------------+--------------+-------
    4.4.0-r1 | ~ ~ ~ ~ - ~ o ~ o ~ ~ o ~ ~ ~ ~ | o 4.4.0-r1   | gentoo


So what I would do in this case is `emerge sys-kernel/gentoo-sources:3.18.25-r1` to pull in the most recent of that version. It'll have the most recent bugfixes and security patches applied to it. After that, use `eselect kernel list` to list the kernels, and `eselect kernel set x` to select the new version. Because the kernel is the same version, all you'd have to do is `cp /usr/src/<oldversion>/.config /usr/src/linux` and `make oldconfig`. It'll notify you of any changes to the kernel and ask for input. Then build as normal.

Once that's all done don't forget to protect the kernel in portage. The tricky part is to remember to check `emerge -p --depclean` before doing it after a world update. Assuming there's sources to be removed, it'll tell you what versions are protected. It's up to you to check every time to make sure it doesn't remove kernel sources you want to keep.

jamtat wrote:

And, on a more MythTV-related note, I forgot to ask about why the system required that the -theora flag needed to be set in order for the newer MythTV to compile this time? I don't anticipate needing to view any ogg theora videos on this machine in the near future. But it is a video format that I could bump into at some point in the future.


I have it built with the theora flag. It could be that something is missing in the nomultilib profile that caused you to have to unset it.
Back to top
View user's profile Send private message
jamtat
Apprentice
Apprentice


Joined: 09 Aug 2003
Posts: 162

PostPosted: Mon Feb 08, 2016 3:40 pm    Post subject: Reply with quote

Thanks for those great instructions for recompiling the kernel, danomac. Not too wild about doing that since the current kernel's been working well for me since I set up this system. But doing as you've suggested does seem the sensible way to proceed.

One thing I wanted to ask about is the r1 ending of the recommended kernel. Does that mean it's a release candidate or something?

Finally, I'm not quite certain I understand how to protect the kernel sources, i.e., how to ensure that they do not get removed from the system in the future. If, after downloading the sources and recompiling the kernel, I will run the command emerge --noreplace sys-kernel/gentoo-sources:3.18.25-r1, are there yet further steps I will be needing to take in order to ensure that the sources do not get removed? Like, by carefully examining the output of emerge --depclean (or emerge -p --depclean) and confirming that the kernel sources are excluded? If I will be needing to do the latter, then what will have been the point of running the emerge --noreplace sys-kernel/gentoo-sources:3.18.25-r1 command?
Back to top
View user's profile Send private message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 881
Location: Vancouver, BC

PostPosted: Thu Feb 11, 2016 12:25 am    Post subject: Reply with quote

jamtat wrote:
One thing I wanted to ask about is the r1 ending of the recommended kernel. Does that mean it's a release candidate or something?


In this context, -r1 means revision 1. It could be some patches made it in to fix something or something in the ebuild itself was fixed that was important enough to warrant a version bump. Generally speaking these are gentoo-specific and have nothing to do with a package's versioning upstream.

jamtat wrote:

Finally, I'm not quite certain I understand how to protect the kernel sources, i.e., how to ensure that they do not get removed from the system in the future. If, after downloading the sources and recompiling the kernel, I will run the command emerge --noreplace sys-kernel/gentoo-sources:3.18.25-r1, are there yet further steps I will be needing to take in order to ensure that the sources do not get removed? Like, by carefully examining the output of emerge --depclean (or emerge -p --depclean) and confirming that the kernel sources are excluded? If I will be needing to do the latter, then what will have been the point of running the emerge --noreplace sys-kernel/gentoo-sources:3.18.25-r1 command?


Whenever you run a depclean, always run `emerge -p --depclean` first. It'll tell you what it's going to remove and what versions are protected and won't be removed. This is just a check afterward to make damn sure it isn't going to remove something you want to keep (most cases it's kernel sources.) The `emerge --noreplace` command is supposed to protect it, I just make sure it does. Call me paranoid. :wink: As you've discovered, once something is cleaned and doesn't exist in portage anymore... you can't reinstall it easily. I always check the depclean first (mostly looking to see what kernels it wants to remove.) In my experience, even though I've got it mostly down pat, sometimes I forget to run `emerge --noreplace` and I correct that first.
Back to top
View user's profile Send private message
jamtat
Apprentice
Apprentice


Joined: 09 Aug 2003
Posts: 162

PostPosted: Mon Nov 14, 2016 1:44 am    Post subject: Reply with quote

It might seem pretty lame for a Gentoo user to admit but, being truthful, I must confess that only today did I finally succeed in compiling a new kernel for the Gentoo system I installed about a year and a half ago. I'll describe in a separate post problems I encountered and what I did to resolve them, but first I need to ask about a "kernel pinning" (I think that's Ubuntu-speak) technique I ran across in an old Gentoo forum posting and ask whether the directives are still valid.

At https://forums.gentoo.org/viewtopic-t-33534.html it is stated that the way to cause a certain kernel version to remain on the system and, equally importantly to me, to prevent new kernel sources from being pulled in, is to add something like >sys-kernel/gentoo-sources-2.6.11 (in my case, probably more like gentoo-sources-3.18.25-r1) to /etc/portage/package.mask. So, are those 11-year-old directives still valid?

LATER EDIT: decided to do some preliminary analysis on introducing the package.mask change and discovered something I'd run across previously on this Gentoo system--namely the documentation's (shared by the author of the old post I referenced) assumption that package.mask is a file. On my system the referenced item is a directory (with a few files under it already), not a file. The package masking directives at the https://wiki.gentoo.org/wiki/Knowledge_Base:Masking_a_package wiki page offer the example echo ">x11-drivers/ati-drivers-12.6_beta_pre897" >> /etc/portage/package.mask, a command that will not work on a system like mine, which will expect a file name at the end of that command rather than a directory name. And that situation, in turn, raises the question of, if the line specified is to go in a file under that directory, how is that file to be named? This is a fundamental unclarity I've encountered already more than once under Gentoo.
Back to top
View user's profile Send private message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 881
Location: Vancouver, BC

PostPosted: Wed Nov 23, 2016 6:06 pm    Post subject: Reply with quote

As per my previous post in this thread, if you want to protect 3.18.25-r1:

Code:

$ emerge --noreplace sys-kernel/gentoo-sources:3.18.25-r1


Masking prevents packages from being installed on your machine, not prevents existing packages from being removed.

As for the second, if package.[mask|unmask|keywords|use] is a directory the files are processed in alphabetical order. So you can create whatever name of a file you want.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum