<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=4216&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] finding package for correct version of linux source]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=4216</link>
		<description><![CDATA[The most recent posts in [SOLVED] finding package for correct version of linux source.]]></description>
		<lastBuildDate>Sun, 04 Apr 2021 11:06:19 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] finding package for correct version of linux source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=28790#p28790</link>
			<description><![CDATA[<p>Glenn, the solution I posted looks rather complex, but it&#039;s at least straightforward, to the point where all the grunt work can be reduced to a script of some sort; my weapon of choice is python, but YKMV. The beauty of this is that once everything&#039;s in a script, it doesn&#039;t matter where linux-headers or anything else is on the DVD; the script will find it. But it&#039;s always nice to know a little more about the layout of the DVD, so thanks.</p>]]></description>
			<author><![CDATA[dummy@example.com (Bill Evans)]]></author>
			<pubDate>Sun, 04 Apr 2021 11:06:19 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=28790#p28790</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] finding package for correct version of linux source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=28786#p28786</link>
			<description><![CDATA[<p>you may find the headers linux-headers-4.19.0-9-amd64 and &quot;common&quot; (and other versions) off the Beowulf 3.1 dvd here</p><p>.../pool/DEBIAN/main/l/linux/linux-headers-4.19.0-9-amd64_4.19.118-2_amd64.deb<br />.../pool/DEBIAN/main/l/linux/linux-headers-4.19.0-9-common_4.19.118-2_all.deb</p><p>updated versions here,<br />.../pool/DEBIAN/main/l/linux-latest/linux-headers-amd64_4.19+105+deb10u9_amd64.deb (but not the &quot;common&quot;...)</p><p>linux-images in here (.deb and .udeb)<br />.../pool/DEBIAN/main/l/linux-signed-amd64/</p><p>hope this helps you for next time. All the best</p>]]></description>
			<author><![CDATA[dummy@example.com (GlennW)]]></author>
			<pubDate>Sun, 04 Apr 2021 07:54:32 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=28786#p28786</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] finding package for correct version of linux source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=28785#p28785</link>
			<description><![CDATA[<p>I apologize for my clumsiness. I didn&#039;t make it clear what my overall requirements are. I&#039;ve fulfilled them, and will describe the solution.</p><p>The requirements are these:</p><p>Step alpha:&#160; After doing a stock devuan installation on a system which has Internet access, install a shopping list of packages (and those on which they depend, of course). For me, not all of these are available on the desktop.iso, things like <span class="bbc">clisp</span>, <span class="bbc">valgrind</span>, and <span class="bbc">dos2unix</span>. When the smoke clears, I want directory <span class="bbc">/usr/src</span> to contain <span class="bbc">linux-headers-$(uname -r)</span>; I do not want to see the linux headers for any other version of the system. Just deleting the wrong ones won&#039;t work, because their presence is evidence that I&#039;ve installed something that depends on them, and that needs to be avoided at the outset.</p><p>Step beta:&#160; Repeat all of this on a system which does not have Internet access.</p><p>The solution may have unnecessary steps or other details, but I&#039;ve tested it, and it works.</p><p>During the stock installation in both steps, in the &quot;Choose software to install&quot; menu, I deselected the Devuan desktop environment and added Console productivity.</p><p>A handy command is <span class="bbc">dpkg --list</span>. Each time I used it, I removed all the output except the bare names of the packages which have been installed. To keep output clean, whenever I wanted to install a package, I checked to see whether it was already installed. The other time I used it was near the end of step alpha, to gather all the packages together in preparation for step beta.</p><p>The major discovery in the first step is that one shouldn&#039;t put entries for both the DVD and <span class="bbc">deb.devuan.org</span> in file <span class="bbc">/etc/apt/sources.list</span> at the same time. If you do, it will always go for the later <span class="bbc">linux-headers</span>, even if it doesn&#039;t match what you&#039;re running.&#160; It doesn&#039;t matter which entry comes first in the file; you&#039;ll always get the problematic result.</p><p>Ok, here&#039;s step alpha. Consider doing everything under the <span class="bbc">script</span> command, so you can diagnose problems more easily.</p><p>1. I found that <span class="bbc">/etc/apt/sources.list</span> already referred to the DVD.&#160; I added <span class="bbc"> [trusted=yes] </span> (surrounded by spaces) just after the initial &quot;deb&quot; on the &quot;deb&quot; line. I don&#039;t know whether it&#039;s necessary, but it works.</p><p>2. <span class="bbc">apt-get update</span></p><p>3. For each package in my shopping list, if it hasn&#039;t been installed already while installing prior packages, <span class="bbc">apt-get --yes install this-package-name</span>; don&#039;t worry if you get an error; just keep going.</p><p>4. Change <span class="bbc">/etc/apt/sources.list</span> so that the only entry is <span class="bbc">deb <a href="http://deb.devuan.org/merged" rel="nofollow">http://deb.devuan.org/merged</a> beowulf contrib main non-free</span>; of course, you&#039;ll want to change <span class="bbc">beowulf</span> as necessary.</p><p>5. Make a list of items on the shopping list which have not yet been (successfully) installed.</p><p>6. <span class="bbc">dhclient</span>; just for kicks and grins, go out of your way to delay doing this until just now.</p><p>7. <span class="bbc">apt-get update</span></p><p>8. For each item on this later list, check whether it&#039;s already been installed (perhaps on this step 8); if not, <span class="bbc">apt-get --yes install this-package-name</span>; blow up if an error happens. After each package has been installed, <span class="bbc">ls -l /usr/src</span>. If installing this package has resulted in expanding the content of that directory to include a later <span class="bbc">linux-headers</span>, you have a problem which this whole algorithm won&#039;t solve. Sorry.</p><p>9. Create an empty directory to contain all the packages you&#039;ve installed. Copy into it all of <span class="bbc">/var/cache/apt/archives/*.deb</span>. Those are the packages you installed from the Internet, not from the DVD.</p><p>10. From the list of all installed packages, fish out from the DVD the <span class="bbc">.deb</span> files for all packages not already copied from <span class="bbc">/var/cache/apt/archives/</span>, and copy them into the directory of packages you&#039;re building. I did a one-time check before I set out on this adventure: no package is represented on the DVD with more than one version, and multiple copies of a given package had the same <span class="bbc">md5sum</span>.</p><p>11. <span class="bbc">tar</span> together the <span class="bbc">.deb</span> files you&#039;ve gathered in your new directory.</p><p>12. <span class="bbc">(cd /usr/src; ln -s linux-headers-$(uname -r) linux)</span></p><p>And here&#039;s step beta. Once again, consider doing everything under the <span class="bbc">script</span> command.</p><p>1. After a stock installation as described above, get the tarball of the packages you installed in step alpha.</p><p>2. <span class="bbc">dpkg --recursive --install your-package-directory</span></p><p>3. Using the handy-dandy list of already installed packages, list the names of any packages in your directory which were not successfully installed.&#160; If the list is non-empty, go back to step 2. Rinse and repeat until everything has been installed. If you get to the point where another iteration won&#039;t solve even one problem, then you&#039;re in a situation beyond the scope of this post. Sorry.</p><p>In my case, the following happened:</p><div class="codebox"><pre><code>Selecting previously unselected package gawk.
dpkg: regarding .../gawk_4.2.1+dfsg-1_amd64.deb containing gawk, pre-dependency problem:
 gawk pre-depends on libmpfr6 (&gt;= 3.1.3)
  libmpfr6 is not installed.

dpkg: error processing archive packages.d/gawk_4.2.1+dfsg-1_amd64.deb (--install):
 pre-dependency problem - not installing gawk</code></pre></div><p>... and I didn&#039;t have to scan all the <span class="bbc">script</span> output to find this problem, because at the end of the <span class="bbc">dpkg --recursive</span> command was this:</p><div class="codebox"><pre><code>Errors were encountered while processing:
 packages.d/gawk_4.2.1+dfsg-1_amd64.deb</code></pre></div><p>So I repeated the <span class="bbc">dpkg --recursive</span> command. I could probably have just installed <span class="bbc">gawk</span>, but rerunning everything is a robust recovery that will also work in the future if I ever have more complex dependency problems.</p><p>Anyway, after success:</p><p>4. <span class="bbc">(cd /usr/src; ln -s linux-headers-$(uname -r) linux)</span></p><p>... and Bob&#039;s your uncle.</p>]]></description>
			<author><![CDATA[dummy@example.com (Bill Evans)]]></author>
			<pubDate>Sun, 04 Apr 2021 07:11:27 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=28785#p28785</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] finding package for correct version of linux source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=28518#p28518</link>
			<description><![CDATA[<p>The headers are all you need to compile new drivers. EDIT: and the build-essential package.</p><p>To add the DVD to your sources first copy the image to the root filesystem, create a mountpoint for it and mount the image:</p><div class="codebox"><pre><code># mkdir /usr/local/dvd
# mkdir /dvd
# cp devuan.iso /usr/local/dvd/
# mount /usr/local/dvd/devuan.iso /dvd</code></pre></div><p>Then create an fstab entry so it is mounted at every boot:</p><div class="codebox"><pre><code># grep /dvd /proc/self/mounts &gt;&gt; /etc/fstab</code></pre></div><p>And add it to <span class="bbc">/etc/apt/sources.list</span>:</p><div class="codebox"><pre><code>deb [trusted=yes] file:/dvd beowulf main</code></pre></div><p>You should now be able to install packages from the DVD:</p><div class="codebox"><pre><code># apt update
# apt install linux-headers-amd64 build-essential</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Thu, 25 Mar 2021 18:32:32 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=28518#p28518</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] finding package for correct version of linux source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=28514#p28514</link>
			<description><![CDATA[<p>I have no idea how to access the packages on a Devuan DVD correctly. In the internet there should be instructions how to address such a DVD in the sources.list. I consider this to be the pre-requisite for a successful installation of any package from that DVD. I guess thats missing in your case. Unfortunately I never had to go this path, I can&#039;t help.</p><p>In addition I searched Debian.org for the a package called linux-source. I never came across that. This really exists, its a meta-package that adresses the latest kernel sources, not just the headers. There also is a <span class="bbc">linux-source-4.19</span> meta-package. When the DVD is set up correctly in the sources.list, you should get the matching source for your kernel. </p><p>rolfie</p>]]></description>
			<author><![CDATA[dummy@example.com (rolfie)]]></author>
			<pubDate>Thu, 25 Mar 2021 18:02:11 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=28514#p28514</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] finding package for correct version of linux source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=28512#p28512</link>
			<description><![CDATA[<p>Thanks for the suggestions.</p><p>For the reasons I mentioned, <span class="bbc">apt update</span> isn&#039;t going to work.</p><p>And in case this might be of interest, yes, there is a devuan package named linux-source, and I&#039;m not yet sure that the third party drivers I&#039;m trying to compile will be content with just linux-headers. To find out, obviously I need to install the linux headers. When I tried what you suggested, though, I got:</p><div class="codebox"><pre><code>root@tigress:~# apt install linux-headers-4.19.0-9-amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-headers-4.19.0-9-amd64
E: Couldn&#039;t find any package by glob &#039;linux-headers-4.19.0-9-amd64&#039;
E: Couldn&#039;t find any package by regex &#039;linux-headers-4.19.0-9-amd64&#039;
root@tigress:~# </code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Bill Evans)]]></author>
			<pubDate>Thu, 25 Mar 2021 17:15:38 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=28512#p28512</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] finding package for correct version of linux source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=28511#p28511</link>
			<description><![CDATA[<p>I guess you need to load the kernel headers, afaik there is no linux-source in Devuan. You can either run an <span class="bbc">apt update</span> as suggested by dice and then install <span class="bbc">linux-headers-amd64</span>, or you try <span class="bbc">apt install linux-headers-4.19.0-9-amd64</span> which is outdated by now, but fits to the kernel you use. </p><p>rolfie</p>]]></description>
			<author><![CDATA[dummy@example.com (rolfie)]]></author>
			<pubDate>Thu, 25 Mar 2021 16:27:22 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=28511#p28511</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] finding package for correct version of linux source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=28510#p28510</link>
			<description><![CDATA[<p>My environment involves machines which do not have internet access, and it would be really, really, really handy to be able to use this DVD, and this version of Linux, and its matching source. Is there any way at all that I can get the matching source?</p>]]></description>
			<author><![CDATA[dummy@example.com (Bill Evans)]]></author>
			<pubDate>Thu, 25 Mar 2021 16:24:54 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=28510#p28510</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] finding package for correct version of linux source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=28507#p28507</link>
			<description><![CDATA[<p>To me it sounds like you need to update to that kernel unless i am not understanding what it is you want.</p><p>so just</p><div class="codebox"><pre><code># apt update &amp;&amp; apt dist-upgrade</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Thu, 25 Mar 2021 15:40:09 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=28507#p28507</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] finding package for correct version of linux source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=28505#p28505</link>
			<description><![CDATA[<p>Months ago I downloaded and burned a devuan DVD. When I install it, <span class="bbc">uname -r</span> yields <span class="bbc">4.19.0-9-amd64</span>. (Old, I know.) I&#039;m trying to compile a set of drivers from <a href="http://asterisk.org" rel="nofollow">asterisk.org</a>, and quite understandably they want me to have copy of Linux source which matches the Linux version I&#039;m running. But when I do <span class="bbc">apt-get --yes install linux-source</span>, I get the source for Linux <span class="bbc">4.19.0-14-amd64</span>. How do I get the Linux source that matches the version of Linux that I&#039;m running? I know I could probably work around this by re-burning the DVD, but that means I would probably bump against this problem again later, so I&#039;d like to know how to match up the Linux source I get with the version of Linux I&#039;m running.</p>]]></description>
			<author><![CDATA[dummy@example.com (Bill Evans)]]></author>
			<pubDate>Thu, 25 Mar 2021 15:22:52 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=28505#p28505</guid>
		</item>
	</channel>
</rss>
