mirror of
git://slackware.nl/current.git
synced 2024-12-26 09:58:59 +01:00
Thu Jul 25 02:39:18 UTC 2024
Well folks, we have some more interesting stuff in /testing now. Our good friend LuckyCyborg posted a while back about our trials with GRUB2, and that we were banging our heads against a wall for no reason trying to bend GRUB2 with our 09_slackware_linux grub.d script instead of changing our kernel/initrd naming scheme to vmlinux-6.10.1-generic and initrd-6.10.1-generic.img. And, as is often the case, our friend is exactly correct. Once we stopped trying to swim against the current, GRUB2 started behaving as it should. The updates in /testing change the kernel naming scheme thusly, and modify the geninitrd script in the mkinitrd package to also use this naming scheme. And, of course, 09_slackware_linux is removed from GRUB2, and the 10_linux script is only lightly modified. Because lilo and elilo work with the symlinks to the kernel and initrd, they shouldn't care anout this change. We've probably got 6.9.11 coming tomorrow. Unless I hear that I should stop the presses on this change, it's likely that those kernels will be updated using the new naming scheme and the mkinitrd and grub updates will be moved into the main tree from /testing. We'll stick with 6.9 in the main tree for now because I'm still encountering suspend failure with the 6.10 kernel here. Enjoy! :-) a/kernel-firmware-20240723_b37d247-noarch-1.txz: Upgraded. ap/mpg123-1.32.6-x86_64-2.txz: Rebuilt. l/libxml2-2.13.3-x86_64-1.txz: Upgraded. This update fixes a security issue: Fix XXE protection in downstream code. For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-40896 (* Security fix *) l/mozilla-nss-3.102.1-x86_64-1.txz: Upgraded. l/nodejs-20.16.0-x86_64-1.txz: Upgraded. l/python-importlib_metadata-8.2.0-x86_64-1.txz: Upgraded. l/v4l-utils-1.28.1-x86_64-1.txz: Upgraded. n/c-ares-1.32.3-x86_64-1.txz: Upgraded. n/curl-8.9.0-x86_64-1.txz: Upgraded. n/htdig-3.2.0b6-x86_64-10.txz: Rebuilt. Patch XSS vulnerability. Thanks to jayjwa. Get this out of cgi-bin. Thanks to LuckyCyborg. For more information, see: https://www.cve.org/CVERecord?id=CVE-2007-6110 (* Security fix *) n/libtirpc-1.3.5-x86_64-1.txz: Upgraded. extra/fltk/fltk-1.3.9-x86_64-2.txz: Rebuilt. extra/tigervnc/tigervnc-1.13.1-x86_64-6.txz: Rebuilt. Not sure why 1.14.0 isn't compiling, but we'll rebuild this for now. testing/packages/grub-2.12-x86_64-12.txz: Upgraded. Remove 09_slackware_linux. 10_linux: don't rename Slackware ;-) This should configure the renamed kernel/initrd perfectly. Perhaps 10_linux should no longer accept initrd.gz as a valid name? For now it is accepted to avoid disrupting existing workflows. testing/packages/kernel-generic-6.10.1-x86_64-1.txz: Upgraded. testing/packages/kernel-headers-6.10.1-x86-1.txz: Upgraded. testing/packages/kernel-huge-6.10.1-x86_64-1.txz: Upgraded. testing/packages/kernel-modules-6.10.1-x86_64-1.txz: Upgraded. testing/packages/kernel-source-6.10.1-noarch-1.txz: Upgraded. testing/packages/mkinitrd-1.4.11-x86_64-35.txz: Upgraded. geninitrd: create initrd with initrd-version-name.img filename. Make compat symlinks by default. Always add LVM (I've seen it mistakenly skipped... if we can get to the bottom of that then we'll stop always adding it) Add /etc/default/geninitrd for configuration.
This commit is contained in:
parent
c9ced48b11
commit
b75837013c
78 changed files with 76842 additions and 246 deletions
|
@ -11,9 +11,81 @@
|
|||
<description>Tracking Slackware development in git.</description>
|
||||
<language>en-us</language>
|
||||
<id xmlns="http://www.w3.org/2005/Atom">urn:uuid:c964f45e-6732-11e8-bbe5-107b4450212f</id>
|
||||
<pubDate>Tue, 23 Jul 2024 18:54:25 GMT</pubDate>
|
||||
<lastBuildDate>Tue, 23 Jul 2024 20:49:55 GMT</lastBuildDate>
|
||||
<pubDate>Thu, 25 Jul 2024 02:39:18 GMT</pubDate>
|
||||
<lastBuildDate>Thu, 25 Jul 2024 04:11:32 GMT</lastBuildDate>
|
||||
<generator>maintain_current_git.sh v 1.17</generator>
|
||||
<item>
|
||||
<title>Thu, 25 Jul 2024 02:39:18 GMT</title>
|
||||
<pubDate>Thu, 25 Jul 2024 02:39:18 GMT</pubDate>
|
||||
<link>https://git.slackware.nl/current/tag/?h=20240725023918</link>
|
||||
<guid isPermaLink="false">20240725023918</guid>
|
||||
<description>
|
||||
<![CDATA[<pre>
|
||||
Well folks, we have some more interesting stuff in /testing now.
|
||||
Our good friend LuckyCyborg posted a while back about our trials with
|
||||
GRUB2, and that we were banging our heads against a wall for no reason
|
||||
trying to bend GRUB2 with our 09_slackware_linux grub.d script instead
|
||||
of changing our kernel/initrd naming scheme to vmlinux-6.10.1-generic
|
||||
and initrd-6.10.1-generic.img. And, as is often the case, our friend is
|
||||
exactly correct. Once we stopped trying to swim against the current, GRUB2
|
||||
started behaving as it should.
|
||||
The updates in /testing change the kernel naming scheme thusly, and modify
|
||||
the geninitrd script in the mkinitrd package to also use this naming
|
||||
scheme. And, of course, 09_slackware_linux is removed from GRUB2, and the
|
||||
10_linux script is only lightly modified.
|
||||
Because lilo and elilo work with the symlinks to the kernel and initrd,
|
||||
they shouldn't care anout this change.
|
||||
We've probably got 6.9.11 coming tomorrow. Unless I hear that I should stop
|
||||
the presses on this change, it's likely that those kernels will be updated
|
||||
using the new naming scheme and the mkinitrd and grub updates will be moved
|
||||
into the main tree from /testing.
|
||||
We'll stick with 6.9 in the main tree for now because I'm still encountering
|
||||
suspend failure with the 6.10 kernel here.
|
||||
Enjoy! :-)
|
||||
a/kernel-firmware-20240723_b37d247-noarch-1.txz: Upgraded.
|
||||
ap/mpg123-1.32.6-x86_64-2.txz: Rebuilt.
|
||||
l/libxml2-2.13.3-x86_64-1.txz: Upgraded.
|
||||
This update fixes a security issue:
|
||||
Fix XXE protection in downstream code.
|
||||
For more information, see:
|
||||
https://www.cve.org/CVERecord?id=CVE-2024-40896
|
||||
(* Security fix *)
|
||||
l/mozilla-nss-3.102.1-x86_64-1.txz: Upgraded.
|
||||
l/nodejs-20.16.0-x86_64-1.txz: Upgraded.
|
||||
l/python-importlib_metadata-8.2.0-x86_64-1.txz: Upgraded.
|
||||
l/v4l-utils-1.28.1-x86_64-1.txz: Upgraded.
|
||||
n/c-ares-1.32.3-x86_64-1.txz: Upgraded.
|
||||
n/curl-8.9.0-x86_64-1.txz: Upgraded.
|
||||
n/htdig-3.2.0b6-x86_64-10.txz: Rebuilt.
|
||||
Patch XSS vulnerability. Thanks to jayjwa.
|
||||
Get this out of cgi-bin. Thanks to LuckyCyborg.
|
||||
For more information, see:
|
||||
https://www.cve.org/CVERecord?id=CVE-2007-6110
|
||||
(* Security fix *)
|
||||
n/libtirpc-1.3.5-x86_64-1.txz: Upgraded.
|
||||
extra/fltk/fltk-1.3.9-x86_64-2.txz: Rebuilt.
|
||||
extra/tigervnc/tigervnc-1.13.1-x86_64-6.txz: Rebuilt.
|
||||
Not sure why 1.14.0 isn't compiling, but we'll rebuild this for now.
|
||||
testing/packages/grub-2.12-x86_64-12.txz: Upgraded.
|
||||
Remove 09_slackware_linux.
|
||||
10_linux: don't rename Slackware ;-)
|
||||
This should configure the renamed kernel/initrd perfectly.
|
||||
Perhaps 10_linux should no longer accept initrd.gz as a valid name?
|
||||
For now it is accepted to avoid disrupting existing workflows.
|
||||
testing/packages/kernel-generic-6.10.1-x86_64-1.txz: Upgraded.
|
||||
testing/packages/kernel-headers-6.10.1-x86-1.txz: Upgraded.
|
||||
testing/packages/kernel-huge-6.10.1-x86_64-1.txz: Upgraded.
|
||||
testing/packages/kernel-modules-6.10.1-x86_64-1.txz: Upgraded.
|
||||
testing/packages/kernel-source-6.10.1-noarch-1.txz: Upgraded.
|
||||
testing/packages/mkinitrd-1.4.11-x86_64-35.txz: Upgraded.
|
||||
geninitrd: create initrd with initrd-version-name.img filename.
|
||||
Make compat symlinks by default.
|
||||
Always add LVM (I've seen it mistakenly skipped... if we can get to the
|
||||
bottom of that then we'll stop always adding it)
|
||||
Add /etc/default/geninitrd for configuration.
|
||||
</pre>]]>
|
||||
</description>
|
||||
</item>
|
||||
<item>
|
||||
<title>Tue, 23 Jul 2024 18:54:25 GMT</title>
|
||||
<pubDate>Tue, 23 Jul 2024 18:54:25 GMT</pubDate>
|
||||
|
|
|
@ -1,3 +1,67 @@
|
|||
Thu Jul 25 02:39:18 UTC 2024
|
||||
Well folks, we have some more interesting stuff in /testing now.
|
||||
Our good friend LuckyCyborg posted a while back about our trials with
|
||||
GRUB2, and that we were banging our heads against a wall for no reason
|
||||
trying to bend GRUB2 with our 09_slackware_linux grub.d script instead
|
||||
of changing our kernel/initrd naming scheme to vmlinux-6.10.1-generic
|
||||
and initrd-6.10.1-generic.img. And, as is often the case, our friend is
|
||||
exactly correct. Once we stopped trying to swim against the current, GRUB2
|
||||
started behaving as it should.
|
||||
The updates in /testing change the kernel naming scheme thusly, and modify
|
||||
the geninitrd script in the mkinitrd package to also use this naming
|
||||
scheme. And, of course, 09_slackware_linux is removed from GRUB2, and the
|
||||
10_linux script is only lightly modified.
|
||||
Because lilo and elilo work with the symlinks to the kernel and initrd,
|
||||
they shouldn't care anout this change.
|
||||
We've probably got 6.9.11 coming tomorrow. Unless I hear that I should stop
|
||||
the presses on this change, it's likely that those kernels will be updated
|
||||
using the new naming scheme and the mkinitrd and grub updates will be moved
|
||||
into the main tree from /testing.
|
||||
We'll stick with 6.9 in the main tree for now because I'm still encountering
|
||||
suspend failure with the 6.10 kernel here.
|
||||
Enjoy! :-)
|
||||
a/kernel-firmware-20240723_b37d247-noarch-1.txz: Upgraded.
|
||||
ap/mpg123-1.32.6-x86_64-2.txz: Rebuilt.
|
||||
l/libxml2-2.13.3-x86_64-1.txz: Upgraded.
|
||||
This update fixes a security issue:
|
||||
Fix XXE protection in downstream code.
|
||||
For more information, see:
|
||||
https://www.cve.org/CVERecord?id=CVE-2024-40896
|
||||
(* Security fix *)
|
||||
l/mozilla-nss-3.102.1-x86_64-1.txz: Upgraded.
|
||||
l/nodejs-20.16.0-x86_64-1.txz: Upgraded.
|
||||
l/python-importlib_metadata-8.2.0-x86_64-1.txz: Upgraded.
|
||||
l/v4l-utils-1.28.1-x86_64-1.txz: Upgraded.
|
||||
n/c-ares-1.32.3-x86_64-1.txz: Upgraded.
|
||||
n/curl-8.9.0-x86_64-1.txz: Upgraded.
|
||||
n/htdig-3.2.0b6-x86_64-10.txz: Rebuilt.
|
||||
Patch XSS vulnerability. Thanks to jayjwa.
|
||||
Get this out of cgi-bin. Thanks to LuckyCyborg.
|
||||
For more information, see:
|
||||
https://www.cve.org/CVERecord?id=CVE-2007-6110
|
||||
(* Security fix *)
|
||||
n/libtirpc-1.3.5-x86_64-1.txz: Upgraded.
|
||||
extra/fltk/fltk-1.3.9-x86_64-2.txz: Rebuilt.
|
||||
extra/tigervnc/tigervnc-1.13.1-x86_64-6.txz: Rebuilt.
|
||||
Not sure why 1.14.0 isn't compiling, but we'll rebuild this for now.
|
||||
testing/packages/grub-2.12-x86_64-12.txz: Upgraded.
|
||||
Remove 09_slackware_linux.
|
||||
10_linux: don't rename Slackware ;-)
|
||||
This should configure the renamed kernel/initrd perfectly.
|
||||
Perhaps 10_linux should no longer accept initrd.gz as a valid name?
|
||||
For now it is accepted to avoid disrupting existing workflows.
|
||||
testing/packages/kernel-generic-6.10.1-x86_64-1.txz: Upgraded.
|
||||
testing/packages/kernel-headers-6.10.1-x86-1.txz: Upgraded.
|
||||
testing/packages/kernel-huge-6.10.1-x86_64-1.txz: Upgraded.
|
||||
testing/packages/kernel-modules-6.10.1-x86_64-1.txz: Upgraded.
|
||||
testing/packages/kernel-source-6.10.1-noarch-1.txz: Upgraded.
|
||||
testing/packages/mkinitrd-1.4.11-x86_64-35.txz: Upgraded.
|
||||
geninitrd: create initrd with initrd-version-name.img filename.
|
||||
Make compat symlinks by default.
|
||||
Always add LVM (I've seen it mistakenly skipped... if we can get to the
|
||||
bottom of that then we'll stop always adding it)
|
||||
Add /etc/default/geninitrd for configuration.
|
||||
+--------------------------+
|
||||
Tue Jul 23 18:54:25 UTC 2024
|
||||
Hey folks, we got a new glibc and are beginning the process of baking the new
|
||||
default compile flags into the toolchain, the graphics stack, and whatever else
|
||||
|
|
318
FILELIST.TXT
318
FILELIST.TXT
|
@ -1,20 +1,21 @@
|
|||
Tue Jul 23 19:33:16 UTC 2024
|
||||
Thu Jul 25 02:44:56 UTC 2024
|
||||
|
||||
Here is the file list for this directory. If you are using a
|
||||
mirror site and find missing or extra files in the disk
|
||||
subdirectories, please have the archive administrator refresh
|
||||
the mirror.
|
||||
|
||||
drwxr-xr-x 12 root root 4096 2024-07-23 19:02 .
|
||||
drwxr-xr-x 12 root root 4096 2024-07-25 02:39 .
|
||||
-rw-r--r-- 1 root root 1133358 2024-07-24 22:43 ./:wq
|
||||
-rw-r--r-- 1 root root 5767 2022-02-02 22:44 ./ANNOUNCE.15.0
|
||||
-rw-r--r-- 1 root root 16617 2022-02-02 23:27 ./CHANGES_AND_HINTS.TXT
|
||||
-rw-r--r-- 1 root root 1154829 2024-07-23 19:02 ./CHECKSUMS.md5
|
||||
-rw-r--r-- 1 root root 195 2024-07-23 19:02 ./CHECKSUMS.md5.asc
|
||||
-rw-r--r-- 1 root root 1154829 2024-07-23 19:33 ./CHECKSUMS.md5
|
||||
-rw-r--r-- 1 root root 195 2024-07-23 19:33 ./CHECKSUMS.md5.asc
|
||||
-rw-r--r-- 1 root root 17976 1994-06-10 02:28 ./COPYING
|
||||
-rw-r--r-- 1 root root 35147 2007-06-30 04:21 ./COPYING3
|
||||
-rw-r--r-- 1 root root 19573 2016-06-23 20:08 ./COPYRIGHT.TXT
|
||||
-rw-r--r-- 1 root root 616 2006-10-02 04:37 ./CRYPTO_NOTICE.TXT
|
||||
-rw-r--r-- 1 root root 1132271 2024-07-23 19:33 ./ChangeLog.txt
|
||||
-rw-r--r-- 1 root root 1135626 2024-07-25 02:39 ./ChangeLog.txt
|
||||
drwxr-xr-x 3 root root 4096 2013-03-20 22:17 ./EFI
|
||||
drwxr-xr-x 2 root root 4096 2024-07-18 19:17 ./EFI/BOOT
|
||||
-rw-r--r-- 1 root root 1200128 2024-06-23 18:50 ./EFI/BOOT/bootx64.efi
|
||||
|
@ -25,9 +26,9 @@ drwxr-xr-x 2 root root 4096 2024-07-18 19:17 ./EFI/BOOT
|
|||
-rwxr-xr-x 1 root root 2504 2019-07-05 18:54 ./EFI/BOOT/make-grub.sh
|
||||
-rw-r--r-- 1 root root 10722 2013-09-21 19:02 ./EFI/BOOT/osdetect.cfg
|
||||
-rw-r--r-- 1 root root 1273 2013-08-12 21:08 ./EFI/BOOT/tools.cfg
|
||||
-rw-r--r-- 1 root root 1511563 2024-07-23 19:02 ./FILELIST.TXT
|
||||
-rw-r--r-- 1 root root 1511563 2024-07-23 19:33 ./FILELIST.TXT
|
||||
-rw-r--r-- 1 root root 1572 2012-08-29 18:27 ./GPG-KEY
|
||||
-rw-r--r-- 1 root root 913369 2024-07-23 19:01 ./PACKAGES.TXT
|
||||
-rw-r--r-- 1 root root 913372 2024-07-25 02:44 ./PACKAGES.TXT
|
||||
-rw-r--r-- 1 root root 8034 2022-02-02 03:36 ./README.TXT
|
||||
-rw-r--r-- 1 root root 3629 2024-07-18 19:02 ./README.initrd
|
||||
-rw-r--r-- 1 root root 34114 2023-12-11 20:35 ./README_CRYPT.TXT
|
||||
|
@ -39,12 +40,12 @@ drwxr-xr-x 2 root root 4096 2024-07-18 19:17 ./EFI/BOOT
|
|||
-rw-r--r-- 1 root root 17294 2008-12-08 18:13 ./SPEAK_INSTALL.TXT
|
||||
-rw-r--r-- 1 root root 57187 2022-02-01 19:37 ./Slackware-HOWTO
|
||||
-rw-r--r-- 1 root root 8700 2022-01-26 05:44 ./UPGRADE.TXT
|
||||
drwxr-xr-x 16 root root 4096 2024-07-23 19:00 ./extra
|
||||
-rw-r--r-- 1 root root 45934 2024-07-23 19:00 ./extra/CHECKSUMS.md5
|
||||
-rw-r--r-- 1 root root 195 2024-07-23 19:00 ./extra/CHECKSUMS.md5.asc
|
||||
-rw-r--r-- 1 root root 57020 2024-07-23 18:59 ./extra/FILE_LIST
|
||||
-rw-r--r-- 1 root root 150091 2024-07-23 18:59 ./extra/MANIFEST.bz2
|
||||
-rw-r--r-- 1 root root 34901 2024-07-23 18:59 ./extra/PACKAGES.TXT
|
||||
drwxr-xr-x 16 root root 4096 2024-07-25 02:43 ./extra
|
||||
-rw-r--r-- 1 root root 45934 2024-07-25 02:43 ./extra/CHECKSUMS.md5
|
||||
-rw-r--r-- 1 root root 195 2024-07-25 02:43 ./extra/CHECKSUMS.md5.asc
|
||||
-rw-r--r-- 1 root root 57020 2024-07-25 02:43 ./extra/FILE_LIST
|
||||
-rw-r--r-- 1 root root 153553 2024-07-25 02:43 ./extra/MANIFEST.bz2
|
||||
-rw-r--r-- 1 root root 34901 2024-07-25 02:43 ./extra/PACKAGES.TXT
|
||||
-rw-r--r-- 1 root root 149 2002-02-09 00:18 ./extra/README.TXT
|
||||
drwxr-xr-x 2 root root 20480 2020-05-26 20:38 ./extra/aspell-word-lists
|
||||
-rw-r--r-- 1 root root 171 2016-06-06 20:10 ./extra/aspell-word-lists/aspell-af-0.50_0-x86_64-5.txt
|
||||
|
@ -336,10 +337,10 @@ drwxr-xr-x 2 root root 4096 2024-07-23 18:59 ./extra/emacs-regular-build
|
|||
-rw-r--r-- 1 root root 456 2024-07-21 02:57 ./extra/emacs-regular-build/emacs-29.4-x86_64-2_regular.txt
|
||||
-rw-r--r-- 1 root root 44063204 2024-07-21 02:57 ./extra/emacs-regular-build/emacs-29.4-x86_64-2_regular.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-21 02:57 ./extra/emacs-regular-build/emacs-29.4-x86_64-2_regular.txz.asc
|
||||
drwxr-xr-x 2 root root 4096 2023-12-10 20:14 ./extra/fltk
|
||||
-rw-r--r-- 1 root root 490 2023-12-10 20:02 ./extra/fltk/fltk-1.3.9-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 951996 2023-12-10 20:02 ./extra/fltk/fltk-1.3.9-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 163 2023-12-10 20:02 ./extra/fltk/fltk-1.3.9-x86_64-1.txz.asc
|
||||
drwxr-xr-x 2 root root 4096 2024-07-25 02:43 ./extra/fltk
|
||||
-rw-r--r-- 1 root root 490 2024-07-24 21:07 ./extra/fltk/fltk-1.3.9-x86_64-2.txt
|
||||
-rw-r--r-- 1 root root 950144 2024-07-24 21:07 ./extra/fltk/fltk-1.3.9-x86_64-2.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 21:07 ./extra/fltk/fltk-1.3.9-x86_64-2.txz.asc
|
||||
drwxr-xr-x 2 root root 4096 2019-10-18 18:38 ./extra/getty-ps
|
||||
-rw-r--r-- 1 root root 510 2018-04-13 13:04 ./extra/getty-ps/getty-ps-2.1.0b-x86_64-4.txt
|
||||
-rw-r--r-- 1 root root 61992 2018-04-13 13:04 ./extra/getty-ps/getty-ps-2.1.0b-x86_64-4.txz
|
||||
|
@ -527,9 +528,9 @@ drwxr-xr-x 2 root root 4096 2024-03-30 18:00 ./extra/source/brltty
|
|||
-rwxr-xr-x 1 root root 720 2021-10-02 19:06 ./extra/source/brltty/dump.dos.windows.android.stuff.sh
|
||||
-rw-r--r-- 1 root root 814 2018-02-27 06:13 ./extra/source/brltty/slack-desc
|
||||
lrwxrwxrwx 1 root root 20 2024-02-14 21:29 ./extra/source/emacs-regular-build -> ../../source/e/emacs
|
||||
drwxr-xr-x 2 root root 4096 2023-12-10 20:01 ./extra/source/fltk
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 21:07 ./extra/source/fltk
|
||||
-rw-r--r-- 1 root root 4017285 2023-12-09 14:02 ./extra/source/fltk/fltk-1.3.9-source.tar.lz
|
||||
-rwxr-xr-x 1 root root 5160 2022-09-06 18:32 ./extra/source/fltk/fltk.SlackBuild
|
||||
-rwxr-xr-x 1 root root 4763 2024-07-24 21:07 ./extra/source/fltk/fltk.SlackBuild
|
||||
-rw-r--r-- 1 root root 746 2021-05-17 18:13 ./extra/source/fltk/fltk.fltk-config.in.diff.gz
|
||||
-rw-r--r-- 1 root root 68 2021-11-21 19:54 ./extra/source/fltk/fltk.url
|
||||
-rw-r--r-- 1 root root 942 2019-02-19 19:21 ./extra/source/fltk/slack-desc
|
||||
|
@ -564,7 +565,7 @@ drwxr-xr-x 2 root root 4096 2024-01-31 20:37 ./extra/source/sendmail
|
|||
-rw-r--r-- 1 root root 386 2023-06-08 04:08 ./extra/source/sendmail/site.config.m4
|
||||
-rw-r--r-- 1 root root 959 2018-02-27 06:13 ./extra/source/sendmail/slack-desc.sendmail
|
||||
-rw-r--r-- 1 root root 1045 2018-02-27 06:13 ./extra/source/sendmail/slack-desc.sendmail-cf
|
||||
drwxr-xr-x 3 root root 4096 2024-05-12 18:27 ./extra/source/tigervnc
|
||||
drwxr-xr-x 3 root root 4096 2024-07-24 22:00 ./extra/source/tigervnc
|
||||
-rw-r--r-- 1 root root 590 2015-08-25 10:53 ./extra/source/tigervnc/10-libvnc.conf
|
||||
-rw-r--r-- 1 root root 485 2024-04-06 16:40 ./extra/source/tigervnc/doinst.sh.gz
|
||||
drwxr-xr-x 3 root root 4096 2023-03-21 19:43 ./extra/source/tigervnc/patches
|
||||
|
@ -580,8 +581,8 @@ drwxr-xr-x 2 root root 4096 2023-03-21 19:39 ./extra/source/tigervnc/patch
|
|||
-rw-r--r-- 1 root root 1293 2023-03-21 19:43 ./extra/source/tigervnc/patches/xserver211.patch.gz
|
||||
-rw-r--r-- 1 root root 930 2018-07-26 17:46 ./extra/source/tigervnc/slack-desc
|
||||
-rw-r--r-- 1 root root 1542246 2023-02-28 15:11 ./extra/source/tigervnc/tigervnc-1.13.1.tar.lz
|
||||
-rwxr-xr-- 1 root root 8915 2024-05-12 18:26 ./extra/source/tigervnc/tigervnc.SlackBuild
|
||||
-rw-r--r-- 1 root root 4957972 2024-04-03 20:54 ./extra/source/tigervnc/xorg-server-21.1.12.tar.xz
|
||||
-rwxr-xr-- 1 root root 8749 2024-07-24 21:58 ./extra/source/tigervnc/tigervnc.SlackBuild
|
||||
-rw-r--r-- 1 root root 4963952 2024-04-12 17:22 ./extra/source/tigervnc/xorg-server-21.1.13.tar.xz
|
||||
drwxr-xr-x 2 root root 4096 2022-09-06 18:32 ./extra/source/xf86-video-fbdev
|
||||
-rw-r--r-- 1 root root 875 2018-02-27 06:13 ./extra/source/xf86-video-fbdev/slack-desc
|
||||
-rw-r--r-- 1 root root 261644 2018-05-30 16:33 ./extra/source/xf86-video-fbdev/xf86-video-fbdev-0.5.0.tar.xz
|
||||
|
@ -597,11 +598,11 @@ drwxr-xr-x 2 root root 4096 2024-06-26 19:07 ./extra/source/xv
|
|||
-rw-r--r-- 1 root root 4201802 2024-06-26 06:09 ./extra/source/xv/xv-5.2.0.tar.lz
|
||||
-rwxr-xr-x 1 root root 4176 2023-05-28 18:06 ./extra/source/xv/xv.SlackBuild
|
||||
-rw-r--r-- 1 root root 38 2023-05-28 17:57 ./extra/source/xv/xv.url
|
||||
drwxr-xr-x 2 root root 4096 2024-04-05 20:12 ./extra/tigervnc
|
||||
drwxr-xr-x 2 root root 4096 2024-07-25 02:43 ./extra/tigervnc
|
||||
-rw-r--r-- 1 root root 0 2015-12-15 08:03 ./extra/tigervnc/the_fltk_package_must_also_be_installed
|
||||
-rw-r--r-- 1 root root 474 2024-04-05 17:08 ./extra/tigervnc/tigervnc-1.13.1-x86_64-5.txt
|
||||
-rw-r--r-- 1 root root 1453956 2024-04-05 17:08 ./extra/tigervnc/tigervnc-1.13.1-x86_64-5.txz
|
||||
-rw-r--r-- 1 root root 195 2024-04-05 17:08 ./extra/tigervnc/tigervnc-1.13.1-x86_64-5.txz.asc
|
||||
-rw-r--r-- 1 root root 474 2024-07-24 21:58 ./extra/tigervnc/tigervnc-1.13.1-x86_64-6.txt
|
||||
-rw-r--r-- 1 root root 1461420 2024-07-24 21:58 ./extra/tigervnc/tigervnc-1.13.1-x86_64-6.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 21:58 ./extra/tigervnc/tigervnc-1.13.1-x86_64-6.txz.asc
|
||||
drwxr-xr-x 2 root root 4096 2022-08-08 23:32 ./extra/xf86-video-fbdev
|
||||
-rw-r--r-- 1 root root 411 2022-08-08 21:55 ./extra/xf86-video-fbdev/xf86-video-fbdev-0.5.0-x86_64-2.txt
|
||||
-rw-r--r-- 1 root root 11132 2022-08-08 21:55 ./extra/xf86-video-fbdev/xf86-video-fbdev-0.5.0-x86_64-2.txz
|
||||
|
@ -662,13 +663,13 @@ drwxr-xr-x 2 root root 4096 2022-02-03 07:02 ./patches
|
|||
-rw-r--r-- 1 root root 575 2022-02-03 07:02 ./patches/FILE_LIST
|
||||
-rw-r--r-- 1 root root 14 2022-02-03 07:02 ./patches/MANIFEST.bz2
|
||||
-rw-r--r-- 1 root root 224 2022-02-03 07:02 ./patches/PACKAGES.TXT
|
||||
drwxr-xr-x 17 root root 4096 2024-07-23 19:02 ./slackware64
|
||||
-rw-r--r-- 1 root root 356297 2024-07-23 19:02 ./slackware64/CHECKSUMS.md5
|
||||
-rw-r--r-- 1 root root 195 2024-07-23 19:02 ./slackware64/CHECKSUMS.md5.asc
|
||||
-rw-r--r-- 1 root root 441226 2024-07-23 19:00 ./slackware64/FILE_LIST
|
||||
-rw-r--r-- 1 root root 4706878 2024-07-23 19:00 ./slackware64/MANIFEST.bz2
|
||||
drwxr-xr-x 17 root root 4096 2024-07-25 02:44 ./slackware64
|
||||
-rw-r--r-- 1 root root 356306 2024-07-25 02:44 ./slackware64/CHECKSUMS.md5
|
||||
-rw-r--r-- 1 root root 195 2024-07-25 02:44 ./slackware64/CHECKSUMS.md5.asc
|
||||
-rw-r--r-- 1 root root 441233 2024-07-25 02:43 ./slackware64/FILE_LIST
|
||||
-rw-r--r-- 1 root root 4702905 2024-07-25 02:43 ./slackware64/MANIFEST.bz2
|
||||
lrwxrwxrwx 1 root root 15 2009-08-23 23:34 ./slackware64/PACKAGES.TXT -> ../PACKAGES.TXT
|
||||
drwxr-xr-x 2 root root 32768 2024-07-23 19:00 ./slackware64/a
|
||||
drwxr-xr-x 2 root root 32768 2024-07-25 02:43 ./slackware64/a
|
||||
-rw-r--r-- 1 root root 327 2022-02-15 18:16 ./slackware64/a/aaa_base-15.1-x86_64-2.txt
|
||||
-rw-r--r-- 1 root root 10720 2022-02-15 18:16 ./slackware64/a/aaa_base-15.1-x86_64-2.txz
|
||||
-rw-r--r-- 1 root root 163 2022-02-15 18:16 ./slackware64/a/aaa_base-15.1-x86_64-2.txz.asc
|
||||
|
@ -833,9 +834,9 @@ drwxr-xr-x 2 root root 32768 2024-07-23 19:00 ./slackware64/a
|
|||
-rw-r--r-- 1 root root 461 2023-12-16 19:21 ./slackware64/a/kbd-2.6.4-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 1332488 2023-12-16 19:21 ./slackware64/a/kbd-2.6.4-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 163 2023-12-16 19:21 ./slackware64/a/kbd-2.6.4-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 422 2024-07-18 16:39 ./slackware64/a/kernel-firmware-20240718_058deb9-noarch-1.txt
|
||||
-rw-r--r-- 1 root root 335731288 2024-07-18 16:39 ./slackware64/a/kernel-firmware-20240718_058deb9-noarch-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-18 16:39 ./slackware64/a/kernel-firmware-20240718_058deb9-noarch-1.txz.asc
|
||||
-rw-r--r-- 1 root root 422 2024-07-24 18:24 ./slackware64/a/kernel-firmware-20240723_b37d247-noarch-1.txt
|
||||
-rw-r--r-- 1 root root 335718356 2024-07-24 18:24 ./slackware64/a/kernel-firmware-20240723_b37d247-noarch-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 18:24 ./slackware64/a/kernel-firmware-20240723_b37d247-noarch-1.txz.asc
|
||||
-rw-r--r-- 1 root root 489 2024-07-18 18:30 ./slackware64/a/kernel-generic-6.9.10-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 14592124 2024-07-18 18:30 ./slackware64/a/kernel-generic-6.9.10-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-18 18:30 ./slackware64/a/kernel-generic-6.9.10-x86_64-1.txz.asc
|
||||
|
@ -1058,7 +1059,7 @@ drwxr-xr-x 2 root root 32768 2024-07-23 19:00 ./slackware64/a
|
|||
-rw-r--r-- 1 root root 540 2024-01-15 21:54 ./slackware64/a/zoo-2.10_28-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 55448 2024-01-15 21:54 ./slackware64/a/zoo-2.10_28-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 163 2024-01-15 21:54 ./slackware64/a/zoo-2.10_28-x86_64-1.txz.asc
|
||||
drwxr-xr-x 2 root root 20480 2024-07-23 19:00 ./slackware64/ap
|
||||
drwxr-xr-x 2 root root 20480 2024-07-25 02:43 ./slackware64/ap
|
||||
-rw-r--r-- 1 root root 291 2024-03-14 19:01 ./slackware64/ap/a2ps-4.15.6-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 675492 2024-03-14 19:01 ./slackware64/ap/a2ps-4.15.6-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-03-14 19:01 ./slackware64/ap/a2ps-4.15.6-x86_64-1.txz.asc
|
||||
|
@ -1213,9 +1214,9 @@ drwxr-xr-x 2 root root 20480 2024-07-23 19:00 ./slackware64/ap
|
|||
-rw-r--r-- 1 root root 376 2022-08-05 17:52 ./slackware64/ap/most-5.2.0-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 50452 2022-08-05 17:52 ./slackware64/ap/most-5.2.0-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 163 2022-08-05 17:52 ./slackware64/ap/most-5.2.0-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 331 2024-04-05 17:34 ./slackware64/ap/mpg123-1.32.6-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 497500 2024-04-05 17:34 ./slackware64/ap/mpg123-1.32.6-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-04-05 17:34 ./slackware64/ap/mpg123-1.32.6-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 331 2024-07-24 18:16 ./slackware64/ap/mpg123-1.32.6-x86_64-2.txt
|
||||
-rw-r--r-- 1 root root 497972 2024-07-24 18:16 ./slackware64/ap/mpg123-1.32.6-x86_64-2.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 18:16 ./slackware64/ap/mpg123-1.32.6-x86_64-2.txz.asc
|
||||
-rw-r--r-- 1 root root 430 2024-07-12 17:11 ./slackware64/ap/nano-8.1-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 623588 2024-07-12 17:11 ./slackware64/ap/nano-8.1-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-12 17:11 ./slackware64/ap/nano-8.1-x86_64-1.txz.asc
|
||||
|
@ -2780,7 +2781,7 @@ drwxr-xr-x 2 root root 86016 2024-07-18 20:05 ./slackware64/kde
|
|||
-rw-r--r-- 1 root root 517 2024-02-15 21:47 ./slackware64/kde/zanshin-23.08.5-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 686104 2024-02-15 21:47 ./slackware64/kde/zanshin-23.08.5-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 163 2024-02-15 21:47 ./slackware64/kde/zanshin-23.08.5-x86_64-1.txz.asc
|
||||
drwxr-xr-x 2 root root 102400 2024-07-23 19:00 ./slackware64/l
|
||||
drwxr-xr-x 2 root root 102400 2024-07-25 02:43 ./slackware64/l
|
||||
-rw-r--r-- 1 root root 329 2022-03-06 20:00 ./slackware64/l/GConf-3.2.6-x86_64-8.txt
|
||||
-rw-r--r-- 1 root root 928144 2022-03-06 20:00 ./slackware64/l/GConf-3.2.6-x86_64-8.txz
|
||||
-rw-r--r-- 1 root root 163 2022-03-06 20:00 ./slackware64/l/GConf-3.2.6-x86_64-8.txz.asc
|
||||
|
@ -3620,9 +3621,9 @@ drwxr-xr-x 2 root root 102400 2024-07-23 19:00 ./slackware64/l
|
|||
-rw-r--r-- 1 root root 291 2021-02-13 07:19 ./slackware64/l/libxklavier-5.4-x86_64-4.txt
|
||||
-rw-r--r-- 1 root root 79564 2021-02-13 07:19 ./slackware64/l/libxklavier-5.4-x86_64-4.txz
|
||||
-rw-r--r-- 1 root root 163 2021-02-13 07:19 ./slackware64/l/libxklavier-5.4-x86_64-4.txz.asc
|
||||
-rw-r--r-- 1 root root 518 2024-07-04 16:59 ./slackware64/l/libxml2-2.13.2-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 1039872 2024-07-04 16:59 ./slackware64/l/libxml2-2.13.2-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-04 16:59 ./slackware64/l/libxml2-2.13.2-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 518 2024-07-24 20:58 ./slackware64/l/libxml2-2.13.3-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 1040524 2024-07-24 20:58 ./slackware64/l/libxml2-2.13.3-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 20:58 ./slackware64/l/libxml2-2.13.3-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 219 2024-07-05 18:46 ./slackware64/l/libxslt-1.1.42-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 241848 2024-07-05 18:46 ./slackware64/l/libxslt-1.1.42-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-05 18:46 ./slackware64/l/libxslt-1.1.42-x86_64-1.txz.asc
|
||||
|
@ -3658,9 +3659,9 @@ drwxr-xr-x 2 root root 102400 2024-07-23 19:00 ./slackware64/l
|
|||
-rw-r--r-- 1 root root 548 2021-02-13 07:21 ./slackware64/l/mm-1.4.2-x86_64-5.txt
|
||||
-rw-r--r-- 1 root root 32820 2021-02-13 07:21 ./slackware64/l/mm-1.4.2-x86_64-5.txz
|
||||
-rw-r--r-- 1 root root 163 2021-02-13 07:21 ./slackware64/l/mm-1.4.2-x86_64-5.txz.asc
|
||||
-rw-r--r-- 1 root root 564 2024-07-04 17:07 ./slackware64/l/mozilla-nss-3.102-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 1873924 2024-07-04 17:07 ./slackware64/l/mozilla-nss-3.102-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-04 17:07 ./slackware64/l/mozilla-nss-3.102-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 564 2024-07-24 21:04 ./slackware64/l/mozilla-nss-3.102.1-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 1872068 2024-07-24 21:04 ./slackware64/l/mozilla-nss-3.102.1-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 21:04 ./slackware64/l/mozilla-nss-3.102.1-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 410 2024-07-09 17:36 ./slackware64/l/mozjs115-115.13.0esr-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 5680428 2024-07-09 17:36 ./slackware64/l/mozjs115-115.13.0esr-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-09 17:36 ./slackware64/l/mozjs115-115.13.0esr-x86_64-1.txz.asc
|
||||
|
@ -3682,9 +3683,9 @@ drwxr-xr-x 2 root root 102400 2024-07-23 19:00 ./slackware64/l
|
|||
-rw-r--r-- 1 root root 423 2024-03-29 04:56 ./slackware64/l/newt-0.52.24-x86_64-3.txt
|
||||
-rw-r--r-- 1 root root 94732 2024-03-29 04:56 ./slackware64/l/newt-0.52.24-x86_64-3.txz
|
||||
-rw-r--r-- 1 root root 195 2024-03-29 04:56 ./slackware64/l/newt-0.52.24-x86_64-3.txz.asc
|
||||
-rw-r--r-- 1 root root 470 2024-07-16 17:52 ./slackware64/l/nodejs-20.15.1-x86_64-2.txt
|
||||
-rw-r--r-- 1 root root 11668704 2024-07-16 17:52 ./slackware64/l/nodejs-20.15.1-x86_64-2.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-16 17:52 ./slackware64/l/nodejs-20.15.1-x86_64-2.txz.asc
|
||||
-rw-r--r-- 1 root root 470 2024-07-24 18:36 ./slackware64/l/nodejs-20.16.0-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 11670208 2024-07-24 18:36 ./slackware64/l/nodejs-20.16.0-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 18:36 ./slackware64/l/nodejs-20.16.0-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 406 2023-06-04 18:38 ./slackware64/l/ocl-icd-2.3.2-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 41456 2023-06-04 18:38 ./slackware64/l/ocl-icd-2.3.2-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 163 2023-06-04 18:38 ./slackware64/l/ocl-icd-2.3.2-x86_64-1.txz.asc
|
||||
|
@ -3865,9 +3866,9 @@ drwxr-xr-x 2 root root 102400 2024-07-23 19:00 ./slackware64/l
|
|||
-rw-r--r-- 1 root root 480 2024-03-29 04:28 ./slackware64/l/python-imagesize-1.4.1-x86_64-2.txt
|
||||
-rw-r--r-- 1 root root 12268 2024-03-29 04:28 ./slackware64/l/python-imagesize-1.4.1-x86_64-2.txz
|
||||
-rw-r--r-- 1 root root 195 2024-03-29 04:28 ./slackware64/l/python-imagesize-1.4.1-x86_64-2.txz.asc
|
||||
-rw-r--r-- 1 root root 597 2024-07-23 18:14 ./slackware64/l/python-importlib_metadata-8.1.0-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 51496 2024-07-23 18:14 ./slackware64/l/python-importlib_metadata-8.1.0-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-23 18:14 ./slackware64/l/python-importlib_metadata-8.1.0-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 597 2024-07-24 18:22 ./slackware64/l/python-importlib_metadata-8.2.0-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 51500 2024-07-24 18:22 ./slackware64/l/python-importlib_metadata-8.2.0-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 18:22 ./slackware64/l/python-importlib_metadata-8.2.0-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 461 2024-03-31 22:35 ./slackware64/l/python-installer-0.7.0-x86_64-3.txt
|
||||
-rw-r--r-- 1 root root 38808 2024-03-31 22:35 ./slackware64/l/python-installer-0.7.0-x86_64-3.txz
|
||||
-rw-r--r-- 1 root root 195 2024-03-31 22:35 ./slackware64/l/python-installer-0.7.0-x86_64-3.txz.asc
|
||||
|
@ -4079,9 +4080,9 @@ drwxr-xr-x 2 root root 102400 2024-07-23 19:00 ./slackware64/l
|
|||
-rw-r--r-- 1 root root 590 2023-10-21 18:48 ./slackware64/l/utf8proc-2.9.0-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 64284 2023-10-21 18:48 ./slackware64/l/utf8proc-2.9.0-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 163 2023-10-21 18:48 ./slackware64/l/utf8proc-2.9.0-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 550 2024-07-20 17:45 ./slackware64/l/v4l-utils-1.28.0-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 1464660 2024-07-20 17:45 ./slackware64/l/v4l-utils-1.28.0-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-20 17:45 ./slackware64/l/v4l-utils-1.28.0-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 550 2024-07-24 21:06 ./slackware64/l/v4l-utils-1.28.1-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 1464304 2024-07-24 21:06 ./slackware64/l/v4l-utils-1.28.1-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 21:06 ./slackware64/l/v4l-utils-1.28.1-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 577 2023-10-28 22:01 ./slackware64/l/vid.stab-1.1.1-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 49028 2023-10-28 22:01 ./slackware64/l/vid.stab-1.1.1-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 163 2023-10-28 22:01 ./slackware64/l/vid.stab-1.1.1-x86_64-1.txz.asc
|
||||
|
@ -4115,7 +4116,7 @@ drwxr-xr-x 2 root root 102400 2024-07-23 19:00 ./slackware64/l
|
|||
-rw-r--r-- 1 root root 403 2023-12-11 22:02 ./slackware64/l/zxing-cpp-2.2.1-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 773596 2023-12-11 22:02 ./slackware64/l/zxing-cpp-2.2.1-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 163 2023-12-11 22:02 ./slackware64/l/zxing-cpp-2.2.1-x86_64-1.txz.asc
|
||||
drwxr-xr-x 2 root root 36864 2024-07-23 19:00 ./slackware64/n
|
||||
drwxr-xr-x 2 root root 36864 2024-07-25 02:43 ./slackware64/n
|
||||
-rw-r--r-- 1 root root 357 2023-03-09 19:11 ./slackware64/n/ModemManager-1.20.6-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 1517848 2023-03-09 19:11 ./slackware64/n/ModemManager-1.20.6-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 163 2023-03-09 19:11 ./slackware64/n/ModemManager-1.20.6-x86_64-1.txz.asc
|
||||
|
@ -4149,9 +4150,9 @@ drwxr-xr-x 2 root root 36864 2024-07-23 19:00 ./slackware64/n
|
|||
-rw-r--r-- 1 root root 612 2021-02-13 11:57 ./slackware64/n/bsd-finger-0.17-x86_64-5.txt
|
||||
-rw-r--r-- 1 root root 20452 2021-02-13 11:57 ./slackware64/n/bsd-finger-0.17-x86_64-5.txz
|
||||
-rw-r--r-- 1 root root 163 2021-02-13 11:57 ./slackware64/n/bsd-finger-0.17-x86_64-5.txz.asc
|
||||
-rw-r--r-- 1 root root 484 2024-07-16 17:10 ./slackware64/n/c-ares-1.32.2-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 179264 2024-07-16 17:10 ./slackware64/n/c-ares-1.32.2-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-16 17:10 ./slackware64/n/c-ares-1.32.2-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 484 2024-07-24 20:54 ./slackware64/n/c-ares-1.32.3-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 179740 2024-07-24 20:54 ./slackware64/n/c-ares-1.32.3-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 20:54 ./slackware64/n/c-ares-1.32.3-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 367 2024-07-03 17:14 ./slackware64/n/ca-certificates-20240703-noarch-1.txt
|
||||
-rw-r--r-- 1 root root 139316 2024-07-03 17:14 ./slackware64/n/ca-certificates-20240703-noarch-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-03 17:14 ./slackware64/n/ca-certificates-20240703-noarch-1.txz.asc
|
||||
|
@ -4161,9 +4162,9 @@ drwxr-xr-x 2 root root 36864 2024-07-23 19:00 ./slackware64/n
|
|||
-rw-r--r-- 1 root root 597 2023-09-30 19:58 ./slackware64/n/conntrack-tools-1.4.8-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 164308 2023-09-30 19:58 ./slackware64/n/conntrack-tools-1.4.8-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 163 2023-09-30 19:58 ./slackware64/n/conntrack-tools-1.4.8-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 552 2024-07-16 22:38 ./slackware64/n/curl-8.8.0-x86_64-3.txt
|
||||
-rw-r--r-- 1 root root 1276780 2024-07-16 22:38 ./slackware64/n/curl-8.8.0-x86_64-3.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-16 22:38 ./slackware64/n/curl-8.8.0-x86_64-3.txz.asc
|
||||
-rw-r--r-- 1 root root 552 2024-07-24 18:14 ./slackware64/n/curl-8.9.0-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 1300516 2024-07-24 18:14 ./slackware64/n/curl-8.9.0-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 18:14 ./slackware64/n/curl-8.9.0-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 373 2023-03-08 02:08 ./slackware64/n/cyrus-sasl-2.1.28-x86_64-3.txt
|
||||
-rw-r--r-- 1 root root 994312 2023-03-08 02:08 ./slackware64/n/cyrus-sasl-2.1.28-x86_64-3.txz
|
||||
-rw-r--r-- 1 root root 163 2023-03-08 02:08 ./slackware64/n/cyrus-sasl-2.1.28-x86_64-3.txz.asc
|
||||
|
@ -4218,9 +4219,9 @@ drwxr-xr-x 2 root root 36864 2024-07-23 19:00 ./slackware64/n
|
|||
-rw-r--r-- 1 root root 537 2024-03-29 04:59 ./slackware64/n/gpgme-1.23.2-x86_64-3.txt
|
||||
-rw-r--r-- 1 root root 1018812 2024-03-29 04:59 ./slackware64/n/gpgme-1.23.2-x86_64-3.txz
|
||||
-rw-r--r-- 1 root root 195 2024-03-29 04:59 ./slackware64/n/gpgme-1.23.2-x86_64-3.txz.asc
|
||||
-rw-r--r-- 1 root root 434 2023-03-08 02:12 ./slackware64/n/htdig-3.2.0b6-x86_64-9.txt
|
||||
-rw-r--r-- 1 root root 965928 2023-03-08 02:12 ./slackware64/n/htdig-3.2.0b6-x86_64-9.txz
|
||||
-rw-r--r-- 1 root root 163 2023-03-08 02:12 ./slackware64/n/htdig-3.2.0b6-x86_64-9.txz.asc
|
||||
-rw-r--r-- 1 root root 434 2024-07-24 22:49 ./slackware64/n/htdig-3.2.0b6-x86_64-10.txt
|
||||
-rw-r--r-- 1 root root 964180 2024-07-24 22:49 ./slackware64/n/htdig-3.2.0b6-x86_64-10.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 22:49 ./slackware64/n/htdig-3.2.0b6-x86_64-10.txz.asc
|
||||
-rw-r--r-- 1 root root 513 2024-07-18 17:58 ./slackware64/n/httpd-2.4.62-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 3948144 2024-07-18 17:58 ./slackware64/n/httpd-2.4.62-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-18 17:58 ./slackware64/n/httpd-2.4.62-x86_64-1.txz.asc
|
||||
|
@ -4319,9 +4320,9 @@ drwxr-xr-x 2 root root 36864 2024-07-23 19:00 ./slackware64/n
|
|||
-rw-r--r-- 1 root root 298 2023-10-12 19:11 ./slackware64/n/libqmi-1.34.0-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 1690368 2023-10-12 19:11 ./slackware64/n/libqmi-1.34.0-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 163 2023-10-12 19:11 ./slackware64/n/libqmi-1.34.0-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 334 2023-10-07 19:08 ./slackware64/n/libtirpc-1.3.4-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 168980 2023-10-07 19:08 ./slackware64/n/libtirpc-1.3.4-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 163 2023-10-07 19:08 ./slackware64/n/libtirpc-1.3.4-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 334 2024-07-24 20:57 ./slackware64/n/libtirpc-1.3.5-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 169356 2024-07-24 20:57 ./slackware64/n/libtirpc-1.3.5-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 20:57 ./slackware64/n/libtirpc-1.3.5-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 445 2023-12-05 23:03 ./slackware64/n/links-2.29-x86_64-2.txt
|
||||
-rw-r--r-- 1 root root 2969324 2023-12-05 23:03 ./slackware64/n/links-2.29-x86_64-2.txz
|
||||
-rw-r--r-- 1 root root 163 2023-12-05 23:03 ./slackware64/n/links-2.29-x86_64-2.txz.asc
|
||||
|
@ -5792,11 +5793,11 @@ drwxr-xr-x 2 root root 4096 2024-05-05 18:37 ./slackware64/y
|
|||
-rw-r--r-- 1 root root 1488844 2024-05-05 17:22 ./slackware64/y/nethack-3.6.7-x86_64-2.txz
|
||||
-rw-r--r-- 1 root root 195 2024-05-05 17:22 ./slackware64/y/nethack-3.6.7-x86_64-2.txz.asc
|
||||
-rw-r--r-- 1 root root 26 2020-12-30 21:55 ./slackware64/y/tagfile
|
||||
drwxr-xr-x 18 root root 4096 2024-07-23 19:02 ./source
|
||||
-rw-r--r-- 1 root root 622552 2024-07-23 19:02 ./source/CHECKSUMS.md5
|
||||
-rw-r--r-- 1 root root 195 2024-07-23 19:02 ./source/CHECKSUMS.md5.asc
|
||||
-rw-r--r-- 1 root root 867999 2024-07-23 19:02 ./source/FILE_LIST
|
||||
-rw-r--r-- 1 root root 29748963 2024-07-23 19:02 ./source/MANIFEST.bz2
|
||||
drwxr-xr-x 18 root root 4096 2024-07-25 02:44 ./source
|
||||
-rw-r--r-- 1 root root 622621 2024-07-25 02:44 ./source/CHECKSUMS.md5
|
||||
-rw-r--r-- 1 root root 195 2024-07-25 02:44 ./source/CHECKSUMS.md5.asc
|
||||
-rw-r--r-- 1 root root 868082 2024-07-25 02:44 ./source/FILE_LIST
|
||||
-rw-r--r-- 1 root root 29757789 2024-07-25 02:44 ./source/MANIFEST.bz2
|
||||
-rw-r--r-- 1 root root 828 2022-02-02 04:43 ./source/README.TXT
|
||||
drwxr-xr-x 124 root root 4096 2024-06-23 18:42 ./source/a
|
||||
-rw-r--r-- 1 root root 339 2023-09-28 19:06 ./source/a/FTBFSlog
|
||||
|
@ -7290,9 +7291,9 @@ drwxr-xr-x 2 root root 4096 2022-08-05 17:52 ./source/ap/most
|
|||
-rwxr-xr-x 1 root root 3334 2022-08-05 17:52 ./source/ap/most/most.SlackBuild
|
||||
-rw-r--r-- 1 root root 39 2019-03-06 19:02 ./source/ap/most/most.url
|
||||
-rw-r--r-- 1 root root 828 2018-02-27 06:12 ./source/ap/most/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2024-04-05 17:34 ./source/ap/mpg123
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 18:11 ./source/ap/mpg123
|
||||
-rw-r--r-- 1 root root 920065 2024-04-04 17:54 ./source/ap/mpg123/mpg123-1.32.6.tar.lz
|
||||
-rwxr-xr-x 1 root root 6313 2021-10-18 16:54 ./source/ap/mpg123/mpg123.SlackBuild
|
||||
-rwxr-xr-x 1 root root 6269 2024-07-24 18:14 ./source/ap/mpg123/mpg123.SlackBuild
|
||||
-rw-r--r-- 1 root root 250 2021-09-18 19:47 ./source/ap/mpg123/mpg123.lib64.diff.gz
|
||||
-rw-r--r-- 1 root root 27 2019-08-26 18:16 ./source/ap/mpg123/mpg123.url
|
||||
-rw-r--r-- 1 root root 785 2018-02-27 06:12 ./source/ap/mpg123/slack-desc
|
||||
|
@ -11551,10 +11552,10 @@ drwxr-xr-x 2 root root 4096 2021-02-13 05:32 ./source/l/libxklavier
|
|||
-rw-r--r-- 1 root root 318336 2013-04-23 23:05 ./source/l/libxklavier/libxklavier-5.4.tar.xz
|
||||
-rwxr-xr-x 1 root root 3932 2021-02-13 05:32 ./source/l/libxklavier/libxklavier.SlackBuild
|
||||
-rw-r--r-- 1 root root 744 2018-02-27 06:12 ./source/l/libxklavier/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2024-07-04 16:58 ./source/l/libxml2
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 20:58 ./source/l/libxml2
|
||||
-rw-r--r-- 1 root root 1254 2023-12-06 00:00 ./source/l/libxml2/libxml2-2.12.0-python3-unicode-errors.patch
|
||||
-rw-r--r-- 1 root root 2580584 2024-07-04 15:31 ./source/l/libxml2/libxml2-2.13.2.tar.xz
|
||||
-rwxr-xr-x 1 root root 4301 2024-05-13 16:57 ./source/l/libxml2/libxml2.SlackBuild
|
||||
-rw-r--r-- 1 root root 2581308 2024-07-24 13:36 ./source/l/libxml2/libxml2-2.13.3.tar.xz
|
||||
-rwxr-xr-x 1 root root 4269 2024-07-24 20:58 ./source/l/libxml2/libxml2.SlackBuild
|
||||
-rw-r--r-- 1 root root 114 2022-08-27 18:08 ./source/l/libxml2/libxml2.url
|
||||
-rw-r--r-- 1 root root 973 2018-02-27 06:49 ./source/l/libxml2/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2024-07-05 18:44 ./source/l/libxslt
|
||||
|
@ -11611,14 +11612,14 @@ drwxr-xr-x 2 root root 4096 2021-02-13 05:32 ./source/l/mm
|
|||
-rw-r--r-- 1 root root 248658 2006-08-15 07:05 ./source/l/mm/mm-1.4.2.tar.bz2
|
||||
-rwxr-xr-x 1 root root 4602 2021-02-13 05:32 ./source/l/mm/mm.SlackBuild
|
||||
-rw-r--r-- 1 root root 998 2018-02-27 06:12 ./source/l/mm/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2024-07-04 17:07 ./source/l/mozilla-nss
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 21:03 ./source/l/mozilla-nss
|
||||
-rw-r--r-- 1 root root 25755 2008-02-27 08:35 ./source/l/mozilla-nss/MPL-1.1.txt
|
||||
-rw-r--r-- 1 root root 18152 2009-01-01 08:10 ./source/l/mozilla-nss/faq.html
|
||||
-rw-r--r-- 1 root root 17987 2007-06-28 20:04 ./source/l/mozilla-nss/gpl-2.0.txt
|
||||
-rw-r--r-- 1 root root 26434 2009-04-08 16:39 ./source/l/mozilla-nss/lgpl-2.1.txt
|
||||
-rwxr-xr-- 1 root root 6048 2024-07-04 17:07 ./source/l/mozilla-nss/mozilla-nss.SlackBuild
|
||||
-rwxr-xr-- 1 root root 5949 2024-07-24 21:04 ./source/l/mozilla-nss/mozilla-nss.SlackBuild
|
||||
-rw-r--r-- 1 root root 719372 2022-09-12 12:54 ./source/l/mozilla-nss/nspr-4.35.tar.lz
|
||||
-rw-r--r-- 1 root root 40981801 2024-07-03 22:11 ./source/l/mozilla-nss/nss-3.102.tar.lz
|
||||
-rw-r--r-- 1 root root 41046692 2024-07-24 18:44 ./source/l/mozilla-nss/nss-3.102.1.tar.lz
|
||||
-rw-r--r-- 1 root root 2488 2012-04-29 21:05 ./source/l/mozilla-nss/nss-config.in
|
||||
-rw-r--r-- 1 root root 1023 2018-02-27 06:12 ./source/l/mozilla-nss/slack-desc
|
||||
drwxr-xr-x 4 root root 4096 2024-07-09 17:34 ./source/l/mozjs115
|
||||
|
@ -11702,9 +11703,9 @@ drwxr-xr-x 2 root root 4096 2024-03-29 03:06 ./source/l/newt
|
|||
-rwxr-xr-x 1 root root 3811 2024-03-29 03:06 ./source/l/newt/newt.SlackBuild
|
||||
-rw-r--r-- 1 root root 33 2019-05-30 19:09 ./source/l/newt/newt.url
|
||||
-rw-r--r-- 1 root root 907 2018-02-27 06:12 ./source/l/newt/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2024-07-09 17:25 ./source/l/nodejs
|
||||
-rw-r--r-- 1 root root 41880412 2024-07-08 12:15 ./source/l/nodejs/node-v20.15.1.tar.xz
|
||||
-rwxr-xr-x 1 root root 5061 2024-07-16 17:51 ./source/l/nodejs/nodejs.SlackBuild
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 18:21 ./source/l/nodejs
|
||||
-rw-r--r-- 1 root root 41822608 2024-07-24 08:24 ./source/l/nodejs/node-v20.16.0.tar.xz
|
||||
-rwxr-xr-x 1 root root 4847 2024-07-24 18:34 ./source/l/nodejs/nodejs.SlackBuild
|
||||
-rw-r--r-- 1 root root 24 2023-06-21 18:43 ./source/l/nodejs/nodejs.url
|
||||
-rw-r--r-- 1 root root 956 2022-03-01 20:48 ./source/l/nodejs/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2023-06-04 18:38 ./source/l/ocl-icd
|
||||
|
@ -12046,8 +12047,8 @@ drwxr-xr-x 2 root root 4096 2024-03-29 03:06 ./source/l/python-imagesize
|
|||
-rw-r--r-- 1 root root 35 2022-04-29 18:20 ./source/l/python-imagesize/imagesize.url
|
||||
-rwxr-xr-x 1 root root 2924 2024-03-29 03:06 ./source/l/python-imagesize/python-imagesize.SlackBuild
|
||||
-rw-r--r-- 1 root root 976 2022-04-29 18:25 ./source/l/python-imagesize/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2024-07-23 18:13 ./source/l/python-importlib_metadata
|
||||
-rw-r--r-- 1 root root 53881 2024-07-23 13:10 ./source/l/python-importlib_metadata/importlib_metadata-8.1.0.tar.gz
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 18:22 ./source/l/python-importlib_metadata
|
||||
-rw-r--r-- 1 root root 53907 2024-07-24 15:22 ./source/l/python-importlib_metadata/importlib_metadata-8.2.0.tar.gz
|
||||
-rw-r--r-- 1 root root 44 2022-04-29 18:26 ./source/l/python-importlib_metadata/importlib_metadata.url
|
||||
-rwxr-xr-x 1 root root 2936 2024-07-23 18:14 ./source/l/python-importlib_metadata/python-importlib_metadata.SlackBuild
|
||||
-rw-r--r-- 1 root root 1102 2022-04-29 18:30 ./source/l/python-importlib_metadata/slack-desc
|
||||
|
@ -12479,11 +12480,11 @@ drwxr-xr-x 2 root root 4096 2023-10-21 18:48 ./source/l/utf8proc
|
|||
-rw-r--r-- 1 root root 115873 2023-10-20 21:16 ./source/l/utf8proc/utf8proc-2.9.0.tar.lz
|
||||
-rwxr-xr-x 1 root root 4485 2022-09-06 18:27 ./source/l/utf8proc/utf8proc.SlackBuild
|
||||
-rw-r--r-- 1 root root 41 2018-07-14 21:26 ./source/l/utf8proc/utf8proc.url
|
||||
drwxr-xr-x 2 root root 4096 2024-07-20 17:40 ./source/l/v4l-utils
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 21:06 ./source/l/v4l-utils
|
||||
-rw-r--r-- 1 root root 1006 2018-02-27 06:12 ./source/l/v4l-utils/slack-desc
|
||||
-rw-r--r-- 1 root root 1246424 2024-07-19 19:51 ./source/l/v4l-utils/v4l-utils-1.28.0.tar.xz
|
||||
-rw-r--r-- 1 root root 833 2024-07-19 19:51 ./source/l/v4l-utils/v4l-utils-1.28.0.tar.xz.asc
|
||||
-rwxr-xr-x 1 root root 5121 2024-07-20 17:45 ./source/l/v4l-utils/v4l-utils.SlackBuild
|
||||
-rw-r--r-- 1 root root 1246516 2024-07-23 19:27 ./source/l/v4l-utils/v4l-utils-1.28.1.tar.xz
|
||||
-rw-r--r-- 1 root root 833 2024-07-23 19:27 ./source/l/v4l-utils/v4l-utils-1.28.1.tar.xz.asc
|
||||
-rwxr-xr-x 1 root root 4961 2024-07-24 21:06 ./source/l/v4l-utils/v4l-utils.SlackBuild
|
||||
-rw-r--r-- 1 root root 597 2023-12-03 18:52 ./source/l/v4l-utils/v4l-utils.gconv.link.patch
|
||||
-rw-r--r-- 1 root root 41 2018-02-16 22:14 ./source/l/v4l-utils/v4l-utils.url
|
||||
drwxr-xr-x 2 root root 4096 2023-10-28 21:11 ./source/l/vid.stab
|
||||
|
@ -12655,9 +12656,9 @@ drwxr-xr-x 2 root root 4096 2022-09-06 18:27 ./source/n/bsd-finger
|
|||
-rw-r--r-- 1 root root 1479 2017-08-02 23:32 ./source/n/bsd-finger/bsd-finger-wide-char-support5.patch.gz
|
||||
-rwxr-xr-x 1 root root 3941 2022-09-06 18:27 ./source/n/bsd-finger/bsd-finger.SlackBuild
|
||||
-rw-r--r-- 1 root root 1071 2018-02-27 06:13 ./source/n/bsd-finger/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2024-07-16 17:10 ./source/n/c-ares
|
||||
-rw-r--r-- 1 root root 629017 2024-07-15 13:02 ./source/n/c-ares/c-ares-1.32.2.tar.lz
|
||||
-rwxr-xr-x 1 root root 4443 2023-12-18 18:46 ./source/n/c-ares/c-ares.SlackBuild
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 20:54 ./source/n/c-ares
|
||||
-rw-r--r-- 1 root root 631401 2024-07-24 09:42 ./source/n/c-ares/c-ares-1.32.3.tar.lz
|
||||
-rwxr-xr-x 1 root root 4229 2024-07-24 20:54 ./source/n/c-ares/c-ares.SlackBuild
|
||||
-rw-r--r-- 1 root root 970 2021-04-09 19:13 ./source/n/c-ares/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2024-07-03 17:14 ./source/n/ca-certificates
|
||||
-rwxr-xr-x 1 root root 3661 2023-05-06 18:47 ./source/n/ca-certificates/ca-certificates.SlackBuild
|
||||
|
@ -12680,10 +12681,10 @@ drwxr-xr-x 2 root root 4096 2023-09-30 19:57 ./source/n/conntrack-tools
|
|||
-rwxr-xr-x 1 root root 3634 2022-10-08 17:54 ./source/n/conntrack-tools/conntrack-tools.SlackBuild
|
||||
-rw-r--r-- 1 root root 53 2022-10-08 17:54 ./source/n/conntrack-tools/conntrack-tools.url
|
||||
-rw-r--r-- 1 root root 1092 2018-05-28 18:00 ./source/n/conntrack-tools/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2024-05-22 17:40 ./source/n/curl
|
||||
-rw-r--r-- 1 root root 2748860 2024-05-22 05:56 ./source/n/curl/curl-8.8.0.tar.xz
|
||||
-rw-r--r-- 1 root root 488 2024-05-22 05:56 ./source/n/curl/curl-8.8.0.tar.xz.asc
|
||||
-rwxr-xr-x 1 root root 4923 2024-07-16 22:38 ./source/n/curl/curl.SlackBuild
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 18:04 ./source/n/curl
|
||||
-rw-r--r-- 1 root root 2781828 2024-07-24 06:23 ./source/n/curl/curl-8.9.0.tar.xz
|
||||
-rw-r--r-- 1 root root 488 2024-07-24 06:23 ./source/n/curl/curl-8.9.0.tar.xz.asc
|
||||
-rwxr-xr-x 1 root root 4891 2024-07-24 18:05 ./source/n/curl/curl.SlackBuild
|
||||
-rw-r--r-- 1 root root 30 2018-04-20 16:49 ./source/n/curl/curl.url
|
||||
-rw-r--r-- 1 root root 1004 2019-02-06 21:57 ./source/n/curl/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2023-03-07 21:39 ./source/n/cyrus-sasl
|
||||
|
@ -12805,11 +12806,12 @@ drwxr-xr-x 2 root root 4096 2024-03-29 03:06 ./source/n/gpgme
|
|||
-rwxr-xr-x 1 root root 4060 2024-03-29 03:06 ./source/n/gpgme/gpgme.SlackBuild
|
||||
-rw-r--r-- 1 root root 35 2023-03-22 19:13 ./source/n/gpgme/gpgme.url
|
||||
-rw-r--r-- 1 root root 990 2018-02-27 06:13 ./source/n/gpgme/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2023-03-07 21:39 ./source/n/htdig
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 22:39 ./source/n/htdig
|
||||
-rw-r--r-- 1 root root 362 2024-07-24 22:39 ./source/n/htdig/CVE-2007-6110.patch.gz
|
||||
-rw-r--r-- 1 root root 274 2007-04-07 22:58 ./source/n/htdig/doinst.sh.gz
|
||||
-rw-r--r-- 1 root root 3347 2007-04-07 22:30 ./source/n/htdig/htdig-3.2.0b6.diff.gz
|
||||
-rw-r--r-- 1 root root 2498246 2004-07-13 14:21 ./source/n/htdig/htdig-3.2.0b6.tar.bz2
|
||||
-rwxr-xr-x 1 root root 4869 2024-05-11 17:38 ./source/n/htdig/htdig.SlackBuild
|
||||
-rwxr-xr-x 1 root root 4917 2024-07-24 22:38 ./source/n/htdig/htdig.SlackBuild
|
||||
-rw-r--r-- 1 root root 288 2007-05-02 18:02 ./source/n/htdig/htdig.conf.diff.gz
|
||||
-rw-r--r-- 1 root root 887 2018-02-27 06:13 ./source/n/htdig/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2024-07-18 17:52 ./source/n/httpd
|
||||
|
@ -12995,10 +12997,10 @@ drwxr-xr-x 2 root root 4096 2023-10-12 19:10 ./source/n/libqmi
|
|||
-rwxr-xr-x 1 root root 4634 2022-11-12 18:38 ./source/n/libqmi/libqmi.SlackBuild
|
||||
-rw-r--r-- 1 root root 55 2023-10-12 19:09 ./source/n/libqmi/libqmi.url
|
||||
-rw-r--r-- 1 root root 785 2018-02-27 06:13 ./source/n/libqmi/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2023-10-08 18:35 ./source/n/libtirpc
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 20:56 ./source/n/libtirpc
|
||||
-rw-r--r-- 1 root root 269 2015-12-13 21:15 ./source/n/libtirpc/doinst.sh.gz
|
||||
-rw-r--r-- 1 root root 415505 2023-10-07 10:58 ./source/n/libtirpc/libtirpc-1.3.4.tar.lz
|
||||
-rwxr-xr-x 1 root root 5110 2023-10-07 19:07 ./source/n/libtirpc/libtirpc.SlackBuild
|
||||
-rw-r--r-- 1 root root 416061 2024-07-24 10:36 ./source/n/libtirpc/libtirpc-1.3.5.tar.lz
|
||||
-rwxr-xr-x 1 root root 4713 2024-07-24 20:57 ./source/n/libtirpc/libtirpc.SlackBuild
|
||||
-rw-r--r-- 1 root root 790 2019-12-22 18:36 ./source/n/libtirpc/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2023-12-05 20:57 ./source/n/links
|
||||
-rw-r--r-- 1 root root 6148637 2023-03-21 18:51 ./source/n/links/links-2.29.tar.lz
|
||||
|
@ -16011,14 +16013,110 @@ drwxr-xr-x 2 root root 4096 2023-02-19 18:29 ./source/y/nethack
|
|||
-rwxr-xr-x 1 root root 4972 2024-05-05 17:20 ./source/y/nethack/nethack.SlackBuild
|
||||
-rw-r--r-- 1 root root 59 2023-02-19 18:28 ./source/y/nethack/nethack.url
|
||||
-rw-r--r-- 1 root root 1031 2020-12-30 21:50 ./source/y/nethack/slack-desc
|
||||
drwxr-xr-x 4 root root 4096 2024-06-23 19:02 ./testing
|
||||
-rw-r--r-- 1 root root 552 2024-06-23 19:02 ./testing/CHECKSUMS.md5
|
||||
-rw-r--r-- 1 root root 195 2024-06-23 19:02 ./testing/CHECKSUMS.md5.asc
|
||||
-rw-r--r-- 1 root root 693 2024-06-23 19:02 ./testing/FILE_LIST
|
||||
-rw-r--r-- 1 root root 14 2024-06-23 19:02 ./testing/MANIFEST.bz2
|
||||
-rw-r--r-- 1 root root 224 2024-06-23 19:02 ./testing/PACKAGES.TXT
|
||||
drwxr-xr-x 2 root root 4096 2024-06-23 18:42 ./testing/packages
|
||||
drwxr-xr-x 2 root root 4096 2024-06-23 18:42 ./testing/source
|
||||
drwxr-xr-x 4 root root 4096 2024-07-25 02:44 ./testing
|
||||
-rw-r--r-- 1 root root 7698 2024-07-25 02:44 ./testing/CHECKSUMS.md5
|
||||
-rw-r--r-- 1 root root 195 2024-07-25 02:44 ./testing/CHECKSUMS.md5.asc
|
||||
-rw-r--r-- 1 root root 9733 2024-07-25 02:44 ./testing/FILE_LIST
|
||||
-rw-r--r-- 1 root root 1481642 2024-07-25 02:44 ./testing/MANIFEST.bz2
|
||||
-rw-r--r-- 1 root root 4156 2024-07-25 02:44 ./testing/PACKAGES.TXT
|
||||
drwxr-xr-x 2 root root 4096 2024-07-25 02:44 ./testing/packages
|
||||
-rw-r--r-- 1 root root 269 2024-07-24 23:45 ./testing/packages/grub-2.12-x86_64-12.txt
|
||||
-rw-r--r-- 1 root root 12770252 2024-07-24 23:45 ./testing/packages/grub-2.12-x86_64-12.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 23:45 ./testing/packages/grub-2.12-x86_64-12.txz.asc
|
||||
-rw-r--r-- 1 root root 489 2024-07-24 18:32 ./testing/packages/kernel-generic-6.10.1-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 14513484 2024-07-24 18:32 ./testing/packages/kernel-generic-6.10.1-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 18:32 ./testing/packages/kernel-generic-6.10.1-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 332 2024-07-24 18:38 ./testing/packages/kernel-headers-6.10.1-x86-1.txt
|
||||
-rw-r--r-- 1 root root 1200056 2024-07-24 18:38 ./testing/packages/kernel-headers-6.10.1-x86-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 18:38 ./testing/packages/kernel-headers-6.10.1-x86-1.txz.asc
|
||||
-rw-r--r-- 1 root root 481 2024-07-24 18:30 ./testing/packages/kernel-huge-6.10.1-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 16403716 2024-07-24 18:30 ./testing/packages/kernel-huge-6.10.1-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 18:30 ./testing/packages/kernel-huge-6.10.1-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 576 2024-07-24 18:37 ./testing/packages/kernel-modules-6.10.1-x86_64-1.txt
|
||||
-rw-r--r-- 1 root root 58491400 2024-07-24 18:37 ./testing/packages/kernel-modules-6.10.1-x86_64-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 18:37 ./testing/packages/kernel-modules-6.10.1-x86_64-1.txz.asc
|
||||
-rw-r--r-- 1 root root 317 2024-07-24 18:18 ./testing/packages/kernel-source-6.10.1-noarch-1.txt
|
||||
-rw-r--r-- 1 root root 140971964 2024-07-24 18:18 ./testing/packages/kernel-source-6.10.1-noarch-1.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-24 18:18 ./testing/packages/kernel-source-6.10.1-noarch-1.txz.asc
|
||||
-rw-r--r-- 1 root root 527 2024-07-25 00:01 ./testing/packages/mkinitrd-1.4.11-x86_64-35.txt
|
||||
-rw-r--r-- 1 root root 621720 2024-07-25 00:01 ./testing/packages/mkinitrd-1.4.11-x86_64-35.txz
|
||||
-rw-r--r-- 1 root root 195 2024-07-25 00:01 ./testing/packages/mkinitrd-1.4.11-x86_64-35.txz.asc
|
||||
drwxr-xr-x 5 root root 4096 2024-07-24 23:37 ./testing/source
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 19:14 ./testing/source/grub
|
||||
-rw-r--r-- 1 root root 1167 2023-12-21 19:26 ./testing/source/grub/0001-00_header-add-GRUB_COLOR_-variables.patch
|
||||
-rw-r--r-- 1 root root 444 2024-01-02 19:45 ./testing/source/grub/0001-skip-new-and-orig-files-in-etc-grub.d.patch
|
||||
-rw-r--r-- 1 root root 766 2023-12-21 19:30 ./testing/source/grub/0003-support-dropins-for-default-configuration.patch
|
||||
-rw-r--r-- 1 root root 376 2024-06-26 17:44 ./testing/source/grub/0004-add-GRUB_DISABLE_KERNEL_SYMLINKS-variable.patch
|
||||
-rw-r--r-- 1 root root 1103 2018-05-16 15:18 ./testing/source/grub/0198-align-struct-efi_variable-better.patch
|
||||
-rw-r--r-- 1 root root 6576 2024-06-27 18:41 ./testing/source/grub/09_slackware_linux
|
||||
-rw-r--r-- 1 root root 616 2024-07-24 19:14 ./testing/source/grub/10_linux.osname.patch
|
||||
-rw-r--r-- 1 root root 1320 2023-12-21 07:17 ./testing/source/grub/b835601c7639ed1890f2d3db91900a8506011a8e.patch
|
||||
-rw-r--r-- 1 root root 688 2024-06-23 22:41 ./testing/source/grub/doinst.sh
|
||||
-rw-r--r-- 1 root root 1607 2024-06-25 18:33 ./testing/source/grub/etc.default.grub
|
||||
-rw-r--r-- 1 root root 6675608 2023-12-20 16:53 ./testing/source/grub/grub-2.12.tar.xz
|
||||
-rw-r--r-- 1 root root 566 2023-12-20 16:53 ./testing/source/grub/grub-2.12.tar.xz.sig
|
||||
-rwxr-xr-x 1 root root 8734 2024-07-24 23:43 ./testing/source/grub/grub.SlackBuild
|
||||
-rw-r--r-- 1 root root 1458 2016-12-25 09:49 ./testing/source/grub/grub.dejavusansmono.gfxterm.font.diff
|
||||
-rw-r--r-- 1 root root 619 2012-09-29 04:34 ./testing/source/grub/initrd_naming.patch
|
||||
-rw-r--r-- 1 root root 721 2023-12-21 19:34 ./testing/source/grub/slack-desc
|
||||
-rw-r--r-- 1 root root 431 2024-06-26 18:21 ./testing/source/grub/update-grub
|
||||
drwxr-xr-x 5 root root 4096 2024-07-24 20:52 ./testing/source/k
|
||||
-rwxr-xr-x 1 root root 8211 2024-07-15 03:24 ./testing/source/k/build-all-kernels.sh
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 17:01 ./testing/source/k/kernel-configs
|
||||
-rw-r--r-- 1 root root 262572 2024-07-24 17:01 ./testing/source/k/kernel-configs/config-6.10.1-generic.ia32
|
||||
-rw-r--r-- 1 root root 266447 2024-07-24 16:55 ./testing/source/k/kernel-configs/config-6.10.1-generic.x64
|
||||
-rw-r--r-- 1 root root 262572 2024-07-24 17:01 ./testing/source/k/kernel-configs/config-6.10.1-huge.ia32
|
||||
-rw-r--r-- 1 root root 266447 2024-07-24 16:55 ./testing/source/k/kernel-configs/config-6.10.1-huge.x64
|
||||
-rwxr-xr-x 1 root root 7304 2024-07-11 22:15 ./testing/source/k/kernel-generic.SlackBuild
|
||||
-rwxr-xr-x 1 root root 3778 2024-07-12 01:18 ./testing/source/k/kernel-headers.SlackBuild
|
||||
-rwxr-xr-x 1 root root 6522 2024-07-11 22:02 ./testing/source/k/kernel-modules.SlackBuild
|
||||
-rwxr-xr-x 1 root root 10495 2024-07-12 01:18 ./testing/source/k/kernel-source.SlackBuild
|
||||
-rw-r--r-- 1 root root 989 2024-07-24 13:59 ./testing/source/k/linux-6.10.1.tar.sign
|
||||
-rw-r--r-- 1 root root 145141964 2024-07-24 13:59 ./testing/source/k/linux-6.10.1.tar.xz
|
||||
drwxr-xr-x 2 root root 4096 2023-01-04 20:50 ./testing/source/k/patches-revert-i686
|
||||
-rw-r--r-- 1 root root 1132 2023-01-03 00:53 ./testing/source/k/patches-revert-i686/0001-x86-ioremap-Fix-page-aligned-size-calculation-in-__i.patch.gz
|
||||
-rw-r--r-- 1 root root 246 2023-01-04 20:50 ./testing/source/k/patches-revert-i686/README
|
||||
drwxr-xr-x 2 root root 4096 2023-11-15 21:07 ./testing/source/k/slack-desc
|
||||
-rw-r--r-- 1 root root 951 2023-11-17 19:34 ./testing/source/k/slack-desc/slack-desc.kernel-generic.i686
|
||||
-rw-r--r-- 1 root root 951 2023-11-17 19:34 ./testing/source/k/slack-desc/slack-desc.kernel-generic.x86_64
|
||||
-rw-r--r-- 1 root root 794 2018-03-05 04:04 ./testing/source/k/slack-desc/slack-desc.kernel-headers
|
||||
-rw-r--r-- 1 root root 940 2023-11-17 19:37 ./testing/source/k/slack-desc/slack-desc.kernel-huge.i686
|
||||
-rw-r--r-- 1 root root 940 2023-11-17 19:37 ./testing/source/k/slack-desc/slack-desc.kernel-huge.x86_64
|
||||
-rw-r--r-- 1 root root 1038 2023-11-17 19:38 ./testing/source/k/slack-desc/slack-desc.kernel-modules-template
|
||||
-rw-r--r-- 1 root root 778 2018-02-27 06:16 ./testing/source/k/slack-desc/slack-desc.kernel-source
|
||||
-rw-r--r-- 1 root root 778 2018-02-27 06:16 ./testing/source/k/slack-desc/slack-desc.kernel-source.vanilla
|
||||
-rw-r--r-- 1 root root 935 2023-11-17 19:41 ./testing/source/k/slack-desc/slack-desc.kernel-template
|
||||
drwxr-xr-x 2 root root 4096 2024-07-24 19:05 ./testing/source/mkinitrd
|
||||
-rw-r--r-- 1 root root 468 2019-12-15 18:10 ./testing/source/mkinitrd/0001-Fix-LUKSTRIM-with-C-T-and-UUID.patch.gz
|
||||
-rw-r--r-- 1 root root 420 2021-07-16 18:07 ./testing/source/mkinitrd/0002-bail-if-temp-dir-is-not-created.patch.gz
|
||||
-rw-r--r-- 1 root root 217 2021-10-12 18:52 ./testing/source/mkinitrd/0003-blacklist.40-usb_modeswitch.rules.patch.gz
|
||||
-rw-r--r-- 1 root root 498 2022-01-25 03:31 ./testing/source/mkinitrd/0004-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch.gz
|
||||
-rw-r--r-- 1 root root 342 2022-01-26 20:32 ./testing/source/mkinitrd/0005-support-modules-compressed-with-xz.patch.gz
|
||||
-rw-r--r-- 1 root root 349 2022-04-26 19:01 ./testing/source/mkinitrd/0006-coreutils-9.1-ensure-target-dir-exists.patch.gz
|
||||
-rw-r--r-- 1 root root 306 2022-07-09 17:58 ./testing/source/mkinitrd/0007-kmod30.patch.gz
|
||||
-rw-r--r-- 1 root root 369 2023-02-28 21:23 ./testing/source/mkinitrd/0008-fix-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch.gz
|
||||
-rw-r--r-- 1 root root 184 2023-08-09 21:27 ./testing/source/mkinitrd/0009-exclude-99-nfs.rules.patch.gz
|
||||
-rw-r--r-- 1 root root 620 2023-11-20 18:50 ./testing/source/mkinitrd/0010-fix-test-for-jfs-xfs-repair-tools.patch.gz
|
||||
-rw-r--r-- 1 root root 4184 2024-07-24 19:30 ./testing/source/mkinitrd/README.initrd
|
||||
-rw-r--r-- 1 root root 2700 2023-03-31 17:12 ./testing/source/mkinitrd/_initrd-tree.tar.gz
|
||||
-rw-r--r-- 1 root root 2444679 2021-01-01 13:27 ./testing/source/mkinitrd/busybox-1.32.1.tar.bz2
|
||||
-rw-r--r-- 1 root root 121 2021-01-01 13:27 ./testing/source/mkinitrd/busybox-1.32.1.tar.bz2.sig
|
||||
-rw-r--r-- 1 root root 29119 2024-05-14 18:22 ./testing/source/mkinitrd/busybox-dot-config
|
||||
-rw-r--r-- 1 root root 373 2024-07-24 19:01 ./testing/source/mkinitrd/doinst.sh
|
||||
-rw-r--r-- 1 root root 1678 2019-01-23 20:47 ./testing/source/mkinitrd/geninitrd
|
||||
-rw-r--r-- 1 root root 818 2024-07-24 23:57 ./testing/source/mkinitrd/geninitrd.default
|
||||
-rw-r--r-- 1 root root 12735 2022-04-26 19:12 ./testing/source/mkinitrd/init
|
||||
-rw-r--r-- 1 root root 29903 2009-12-18 05:10 ./testing/source/mkinitrd/keymaps.tar.gz
|
||||
-rw-r--r-- 1 root root 28806 2022-04-26 19:13 ./testing/source/mkinitrd/mkinitrd
|
||||
-rw-r--r-- 1 root root 9549 2022-04-26 19:12 ./testing/source/mkinitrd/mkinitrd.8
|
||||
-rwxr-xr-x 1 root root 8007 2024-07-24 19:02 ./testing/source/mkinitrd/mkinitrd.SlackBuild
|
||||
-rw-r--r-- 1 root root 7449 2022-04-26 19:12 ./testing/source/mkinitrd/mkinitrd.conf.5
|
||||
-rw-r--r-- 1 root root 529 2017-06-29 16:52 ./testing/source/mkinitrd/mkinitrd.conf.sample
|
||||
-rw-r--r-- 1 root root 535 2020-04-26 23:53 ./testing/source/mkinitrd/mkinitrd.tempfile.to.mktemp.patch.gz
|
||||
-rw-r--r-- 1 root root 5693 2019-03-03 21:16 ./testing/source/mkinitrd/mkinitrd_command_generator.8
|
||||
-rw-r--r-- 1 root root 29073 2021-03-28 18:22 ./testing/source/mkinitrd/mkinitrd_command_generator.sh
|
||||
-rw-r--r-- 1 root root 1899 2024-07-25 00:01 ./testing/source/mkinitrd/setup.01.mkinitrd
|
||||
-rw-r--r-- 1 root root 983 2018-02-27 06:13 ./testing/source/mkinitrd/slack-desc
|
||||
drwxr-xr-x 2 root root 4096 2024-07-18 19:17 ./usb-and-pxe-installers
|
||||
-rw-r--r-- 1 root root 31203 2011-03-21 21:21 ./usb-and-pxe-installers/README_PXE.TXT
|
||||
-rw-r--r-- 1 root root 9197 2013-09-25 04:33 ./usb-and-pxe-installers/README_USB.TXT
|
||||
|
|
|
@ -25,12 +25,12 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
PKGNAM=fltk
|
||||
SRCNAM=fltk
|
||||
VERSION=${VERSION:-$(echo $SRCNAM-*.tar.?z | cut -f 2 -d -)}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$(uname -m)" in
|
||||
i?86) ARCH=i586 ;;
|
||||
i?86) ARCH=i686 ;;
|
||||
arm*) readelf /usr/bin/file -A | grep -E -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) ARCH=$(uname -m) ;;
|
||||
|
@ -48,27 +48,12 @@ fi
|
|||
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
|
||||
if [ "$ARCH" = "i386" ]; then
|
||||
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "s390" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
if [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=pentium4 -mtune=generic"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
elif [ "$ARCH" = "armv7hl" ]; then
|
||||
SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
|
||||
LIBDIRSUFFIX=""
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
|
|
|
@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
PKGNAM=tigervnc
|
||||
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
XORGVER=${XORGVER:-$(echo xorg-server-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
BUILD=${BUILD:-5}
|
||||
BUILD=${BUILD:-6}
|
||||
|
||||
# Do we build the java applet (needs jdk)?
|
||||
JAVA_APPLET=${JAVA_APPLET:-"OFF"}
|
||||
|
@ -34,7 +34,7 @@ JAVA_APPLET=${JAVA_APPLET:-"OFF"}
|
|||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$(uname -m)" in
|
||||
i?86) ARCH=i586 ;;
|
||||
i?86) ARCH=i686 ;;
|
||||
arm*) readelf /usr/bin/file -A | grep -E -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) ARCH=$(uname -m) ;;
|
||||
|
@ -52,21 +52,12 @@ fi
|
|||
|
||||
NUMJOBS=${NUMJOBS:-" -j $(expr $(nproc) + 1) "}
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "s390" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
if [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=pentium4 -mtune=generic"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
elif [ "$ARCH" = "armv7hl" ]; then
|
||||
SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
|
||||
LIBDIRSUFFIX=""
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
|
@ -133,7 +124,7 @@ cmake \
|
|||
-DINSTALL_SYSTEMD_UNITS=OFF \
|
||||
-DBUILD_JAVA:BOOL=${JAVA_APPLET} \
|
||||
.
|
||||
make V=1 $NUMJOBS || make || exit 1
|
||||
make V=1 $NUMJOBS || exit 1
|
||||
make DESTDIR=$PKG install || exit 1
|
||||
|
||||
# Build and install the VNC server:
|
||||
|
@ -172,7 +163,7 @@ make DESTDIR=$PKG install || exit 1
|
|||
--with-os-vendor="Slackware Linux Project" \
|
||||
--with-builderstring="Built by Slackware for xorg-server-$XORGVER" \
|
||||
--build=$TARGET || exit 1
|
||||
make V=1 TIGERVNC_SRCDIR="$TMP/${PKGNAM}-${VERSION}" $NUMJOBS || exit 1
|
||||
make V=1 TIGERVNC_SRCDIR="$TMP/${PKGNAM}-${VERSION}" $NUMJOBS || make V=1 TIGERVNC_SRCDIR="$TMP/${PKGNAM}-${VERSION}" || exit 1
|
||||
make TIGERVNC_SRCDIR="$TMP/${PKGNAM}-${VERSION}" -C hw/vnc \
|
||||
DESTDIR=$PKG install || exit 1
|
||||
) || exit 1
|
||||
|
|
|
@ -502,6 +502,7 @@ gzip ./source/n/samba/smb.conf.diff
|
|||
gzip ./source/n/samba/doinst.sh
|
||||
gzip ./source/n/samba/samba.libsmbclient.h.ffmpeg.compat.diff
|
||||
gzip ./source/n/htdig/htdig-3.2.0b6.diff
|
||||
gzip ./source/n/htdig/CVE-2007-6110.patch
|
||||
gzip ./source/n/htdig/htdig.conf.diff
|
||||
gzip ./source/n/htdig/doinst.sh
|
||||
gzip ./source/n/netwrite/netwrite-0.17.diff
|
||||
|
@ -1071,3 +1072,15 @@ gzip ./source/x/ibus/doinst.sh
|
|||
gzip ./source/x/ibus/emoji-test.txt
|
||||
gzip ./source/x/xcm/xcm.udev.rules.diff
|
||||
gzip ./source/x/libva/doinst.sh
|
||||
gzip ./testing/source/mkinitrd/0005-support-modules-compressed-with-xz.patch
|
||||
gzip ./testing/source/mkinitrd/mkinitrd.tempfile.to.mktemp.patch
|
||||
gzip ./testing/source/mkinitrd/0006-coreutils-9.1-ensure-target-dir-exists.patch
|
||||
gzip ./testing/source/mkinitrd/0001-Fix-LUKSTRIM-with-C-T-and-UUID.patch
|
||||
gzip ./testing/source/mkinitrd/0008-fix-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch
|
||||
gzip ./testing/source/mkinitrd/0007-kmod30.patch
|
||||
gzip ./testing/source/mkinitrd/0004-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch
|
||||
gzip ./testing/source/mkinitrd/0009-exclude-99-nfs.rules.patch
|
||||
gzip ./testing/source/mkinitrd/0002-bail-if-temp-dir-is-not-created.patch
|
||||
gzip ./testing/source/mkinitrd/0003-blacklist.40-usb_modeswitch.rules.patch
|
||||
gzip ./testing/source/mkinitrd/0010-fix-test-for-jfs-xfs-repair-tools.patch
|
||||
gzip ./testing/source/k/patches-revert-i686/0001-x86-ioremap-Fix-page-aligned-size-calculation-in-__i.patch
|
||||
|
|
|
@ -23,14 +23,14 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
|
||||
PKGNAM=mpg123
|
||||
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) export ARCH=i586 ;;
|
||||
i?86) export ARCH=i686 ;;
|
||||
arm*) export ARCH=arm ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) export ARCH=$( uname -m ) ;;
|
||||
|
@ -40,16 +40,12 @@ fi
|
|||
TMP=${TMP:-/tmp}
|
||||
PKG=$TMP/package-${PKGNAM}
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
if [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=pentium4 -mtune=generic"
|
||||
LIBDIRSUFFIX=""
|
||||
TARGET="x86"
|
||||
elif [ "$ARCH" = "s390" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
TARGET=""
|
||||
TARGET="sse"
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
TARGET="x86-64"
|
||||
elif [ "$ARCH" = "arm" ]; then
|
||||
|
|
|
@ -29,7 +29,7 @@ BUILD=${BUILD:-1}
|
|||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) export ARCH=i586 ;;
|
||||
i?86) export ARCH=i686 ;;
|
||||
arm*) export ARCH=arm ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) export ARCH=$( uname -m ) ;;
|
||||
|
@ -46,14 +46,11 @@ fi
|
|||
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "s390" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
if [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=pentium4 -mtune=generic"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
|
|
|
@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
|
||||
PKGNAM=mozilla-nss
|
||||
SRCNAM=nss
|
||||
VERSION=${VERSION:-3.102}
|
||||
VERSION=${VERSION:-3.102.1}
|
||||
NSPR=${NSPR:-4.35}
|
||||
BUILD=${BUILD:-1}
|
||||
|
||||
|
@ -34,8 +34,7 @@ BUILD=${BUILD:-1}
|
|||
MARCH=$( uname -m )
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$MARCH" in
|
||||
i?86) export ARCH=i586 ;;
|
||||
armv7hl) export ARCH=$MARCH ;;
|
||||
i?86) export ARCH=i686 ;;
|
||||
arm*) export ARCH=arm ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) export ARCH=$MARCH ;;
|
||||
|
@ -50,16 +49,13 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
if [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=pentium4 -mtune=generic"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
export USE_64=1
|
||||
elif [ "$ARCH" = "armv7hl" ]; then
|
||||
SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
|
||||
LIBDIRSUFFIX=""
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
|
|
|
@ -22,12 +22,12 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
PKGNAM=nodejs
|
||||
SRCNAM=node
|
||||
VERSION=${VERSION:-$(echo $SRCNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev | tr -d v)}
|
||||
BUILD=${BUILD:-2}
|
||||
BUILD=${BUILD:-1}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$(uname -m)" in
|
||||
i?86) ARCH=i586 ;;
|
||||
i?86) ARCH=i686 ;;
|
||||
arm*) readelf /usr/bin/file -A | grep -E -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) ARCH=$(uname -m) ;;
|
||||
|
@ -45,21 +45,12 @@ fi
|
|||
|
||||
NUMJOBS=${NUMJOBS:-" -j $(expr $(nproc) + 1) "}
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "s390" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
if [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=pentium4 -mtune=generic"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
elif [ "$ARCH" = "armv7hl" ]; then
|
||||
SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
|
||||
LIBDIRSUFFIX=""
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
|
|
|
@ -50,15 +50,9 @@ fi
|
|||
TMP=${TMP:-/tmp}
|
||||
PKG=$TMP/package-$PKGNAM
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
if [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=pentium4 -mtune=generic"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "s390" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
|
|
|
@ -29,7 +29,7 @@ BUILD=${BUILD:-1}
|
|||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$(uname -m)" in
|
||||
i?86) ARCH=i586 ;;
|
||||
i?86) ARCH=i686 ;;
|
||||
arm*) readelf /usr/bin/file -A | grep -E -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) ARCH=$(uname -m) ;;
|
||||
|
@ -47,21 +47,12 @@ fi
|
|||
|
||||
NUMJOBS=${NUMJOBS:-" -j $(expr $(nproc) + 1) "}
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "s390" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
if [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=pentium4 -mtune=generic"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
elif [ "$ARCH" = "armv7hl" ]; then
|
||||
SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
|
||||
LIBDIRSUFFIX=""
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
|
|
|
@ -24,12 +24,12 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
|
||||
PKGNAM=curl
|
||||
VERSION=${VERSION:-$(echo curl-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
BUILD=${BUILD:-3}
|
||||
BUILD=${BUILD:-1}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) export ARCH=i586 ;;
|
||||
i?86) export ARCH=i686 ;;
|
||||
arm*) export ARCH=arm ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) export ARCH=$( uname -m ) ;;
|
||||
|
@ -52,14 +52,11 @@ PKG=$TMP/package-curl
|
|||
# Set this variable to "--without-ssl" to build a no-SSL version:
|
||||
SSLOPT=${SSLOPT:-"--with-openssl"}
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "s390" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
if [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=pentium4 -mtune=generic"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
|
|
24
source/n/htdig/CVE-2007-6110.patch
Normal file
24
source/n/htdig/CVE-2007-6110.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
diff -u htdig-3.2.0b6/htsearch/Display.cc htdig-3.2.0b6/htsearch/Display.cc
|
||||
--- htdig-3.2.0b6/htsearch/Display.cc
|
||||
+++ htdig-3.2.0b6/htsearch/Display.cc
|
||||
@@ -138,7 +138,7 @@
|
||||
// Must temporarily stash the message in a String, since
|
||||
// displaySyntaxError will overwrite the static temp used in form.
|
||||
|
||||
- String s(form("No such sort method: `%s'", (const char*)config->Find("sort")));
|
||||
+ String s("Invalid sort method.");
|
||||
|
||||
displaySyntaxError(s);
|
||||
return;
|
||||
--- htdig-3.2.0b6.orig/libhtdig/ResultFetch.cc
|
||||
+++ htdig-3.2.0b6/libhtdig/ResultFetch.cc
|
||||
@@ -142,7 +142,7 @@
|
||||
// Must temporarily stash the message in a String, since
|
||||
// displaySyntaxError will overwrite the static temp used in form.
|
||||
|
||||
- String s(form("No such sort method: `%s'", (const char *) config->Find("sort")));
|
||||
+ String s("Invalid search method.");
|
||||
|
||||
displaySyntaxError(s);
|
||||
//return;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2006, 2007, 2008, 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, MN, USA
|
||||
# Copyright 2006, 2007, 2008, 2009, 2010, 2018, 2024 Patrick J. Volkerding, Sebeka, MN, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -25,12 +25,12 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
PKGNAM=htdig
|
||||
VERSION=${VERSION:-3.2.0b6}
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
BUILD=${BUILD:-9}
|
||||
BUILD=${BUILD:-10}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) export ARCH=i586 ;;
|
||||
i?86) export ARCH=i686 ;;
|
||||
arm*) export ARCH=arm ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) export ARCH=$( uname -m ) ;;
|
||||
|
@ -50,14 +50,11 @@ PKG=$TMP/package-${PKGNAM}
|
|||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "s390" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
if [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=pentium4 -mtune=generic"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
|
@ -86,6 +83,9 @@ zcat $CWD/htdig-3.2.0b6.diff.gz | patch -p1 --verbose || exit 1
|
|||
# Fix "common dir" location and add "synonym_dictionary" entry:
|
||||
zcat $CWD/htdig.conf.diff.gz | patch -p1 --verbose || exit 1
|
||||
|
||||
# Patch XSS vuln:
|
||||
zcat $CWD/CVE-2007-6110.patch | patch -p1 --verbose || exit 1
|
||||
|
||||
# Configure:
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS -std=gnu++98 -fpermissive -fno-delete-null-pointer-checks" \
|
||||
|
@ -95,7 +95,7 @@ CXXFLAGS="$SLKCFLAGS -std=gnu++98 -fpermissive -fno-delete-null-pointer-checks"
|
|||
--sysconfdir=/etc \
|
||||
--localstatedir=/var/lib/htdig \
|
||||
--with-apache=/usr/sbin/httpd \
|
||||
--with-cgi-bin-dir=/var/www/cgi-bin \
|
||||
--with-cgi-bin-dir=/usr/bin \
|
||||
--with-config-dir=/etc/htdig \
|
||||
--with-common-dir=/var/www/htdocs/htdig \
|
||||
--with-database-dir=/var/lib/htdig \
|
||||
|
|
|
@ -35,7 +35,7 @@ WITH_GSS=${WITH_GSS:-YES}
|
|||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$(uname -m)" in
|
||||
i?86) ARCH=i586 ;;
|
||||
i?86) ARCH=i686 ;;
|
||||
arm*) readelf /usr/bin/file -A | grep -E -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) ARCH=$(uname -m) ;;
|
||||
|
@ -53,27 +53,12 @@ fi
|
|||
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
|
||||
if [ "$ARCH" = "i386" ]; then
|
||||
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "s390" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
if [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=pentium4 -mtune=generic"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
elif [ "$ARCH" = "armv7hl" ]; then
|
||||
SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
|
||||
LIBDIRSUFFIX=""
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
From 21e5bcf22ab1a9f08c63e2a0212219d7482f77c1 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Wed, 10 Mar 2021 18:42:25 +0100
|
||||
Subject: [PATCH] 00_header: add GRUB_COLOR_* variables
|
||||
---
|
||||
util/grub-mkconfig.in | 2 ++
|
||||
util/grub.d/00_header.in | 8 ++++++++
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index f8cbb8d7a..1189d95f9 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -246,6 +246,8 @@ export GRUB_DEFAULT \
|
||||
GRUB_BACKGROUND \
|
||||
GRUB_THEME \
|
||||
GRUB_GFXPAYLOAD_LINUX \
|
||||
+ GRUB_COLOR_NORMAL \
|
||||
+ GRUB_COLOR_HIGHLIGHT \
|
||||
GRUB_INIT_TUNE \
|
||||
GRUB_SAVEDEFAULT \
|
||||
GRUB_ENABLE_CRYPTODISK \
|
||||
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
|
||||
index 93a90233e..c5955df00 100644
|
||||
--- a/util/grub.d/00_header.in
|
||||
+++ b/util/grub.d/00_header.in
|
||||
@@ -125,6 +125,14 @@ cat <<EOF
|
||||
|
||||
EOF
|
||||
|
||||
+if [ x$GRUB_COLOR_NORMAL != x ] && [ x$GRUB_COLOR_HIGHLIGHT != x ] ; then
|
||||
+ cat << EOF
|
||||
+set menu_color_normal=$GRUB_COLOR_NORMAL
|
||||
+set menu_color_highlight=$GRUB_COLOR_HIGHLIGHT
|
||||
+
|
||||
+EOF
|
||||
+fi
|
||||
+
|
||||
serial=0;
|
||||
gfxterm=0;
|
||||
for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
|
|
@ -0,0 +1,10 @@
|
|||
--- ./util/grub-mkconfig_lib.in.orig 2023-12-05 08:46:53.000000000 -0600
|
||||
+++ ./util/grub-mkconfig_lib.in 2024-01-02 13:44:41.164913702 -0600
|
||||
@@ -191,6 +191,7 @@
|
||||
case "$1" in
|
||||
*.dpkg-*) return 1 ;; # debian dpkg
|
||||
*.rpmsave|*.rpmnew) return 1 ;;
|
||||
+ *.new|*.orig) return 1 ;; # slackware incoming or backed up config file
|
||||
README*|*/README*) return 1 ;; # documentation
|
||||
*.sig) return 1 ;; # signatures
|
||||
esac
|
|
@ -0,0 +1,28 @@
|
|||
From ac560966d09295663fa9516d8d137e0c0fd04c06 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Mon, 12 Jun 2023 07:42:01 +0200
|
||||
Subject: [PATCH 1/1] support dropins for default configuration
|
||||
|
||||
---
|
||||
util/grub-mkconfig.in | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index 1a945085c..4338dceef 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -160,6 +160,11 @@ fi
|
||||
if test -f ${sysconfdir}/default/grub ; then
|
||||
. ${sysconfdir}/default/grub
|
||||
fi
|
||||
+for dropin in ${sysconfdir}/default/grub.d/*.cfg ; do
|
||||
+ if test -f "${dropin}" ; then
|
||||
+ . "${dropin}"
|
||||
+ fi
|
||||
+done
|
||||
|
||||
if [ "x${GRUB_DISABLE_UUID}" = "xtrue" ]; then
|
||||
if [ -z "${GRUB_DISABLE_LINUX_UUID}" ]; then
|
||||
--
|
||||
2.41.0
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
--- ./util/grub-mkconfig.in.orig 2022-11-14 09:52:54.000000000 -0600
|
||||
+++ ./util/grub-mkconfig.in 2024-06-26 12:44:00.986119802 -0500
|
||||
@@ -255,7 +255,8 @@
|
||||
GRUB_ENABLE_CRYPTODISK \
|
||||
GRUB_BADRAM \
|
||||
GRUB_OS_PROBER_SKIP_LIST \
|
||||
- GRUB_DISABLE_SUBMENU
|
||||
+ GRUB_DISABLE_SUBMENU \
|
||||
+ GRUB_DISABLE_KERNEL_SYMLINKS
|
||||
|
||||
if test "x${grub_cfg}" != "x"; then
|
||||
rm -f "${grub_cfg}.new"
|
|
@ -0,0 +1,36 @@
|
|||
From 2485633ada06c11c07a34a696a92b14e58f1e846 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 27 Feb 2018 13:55:35 -0500
|
||||
Subject: [PATCH 198/250] align struct efi_variable better...
|
||||
|
||||
---
|
||||
include/grub/efiemu/runtime.h | 2 +-
|
||||
include/grub/types.h | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h
|
||||
index 9b6b729f4cc..856774a7c34 100644
|
||||
--- a/include/grub/efiemu/runtime.h
|
||||
+++ b/include/grub/efiemu/runtime.h
|
||||
@@ -33,5 +33,5 @@ struct efi_variable
|
||||
grub_uint32_t namelen;
|
||||
grub_uint32_t size;
|
||||
grub_efi_uint32_t attributes;
|
||||
-} GRUB_PACKED;
|
||||
+} GRUB_PACKED GRUB_ALIGNED(8);
|
||||
#endif /* ! GRUB_EFI_EMU_RUNTIME_HEADER */
|
||||
diff --git a/include/grub/types.h b/include/grub/types.h
|
||||
index b93e4820194..f6a9723971d 100644
|
||||
--- a/include/grub/types.h
|
||||
+++ b/include/grub/types.h
|
||||
@@ -29,6 +29,7 @@
|
||||
#else
|
||||
#define GRUB_PACKED __attribute__ ((packed))
|
||||
#endif
|
||||
+#define GRUB_ALIGNED(x) __attribute__((aligned (x)))
|
||||
|
||||
#ifdef GRUB_BUILD
|
||||
# define GRUB_CPU_SIZEOF_VOID_P BUILD_SIZEOF_VOID_P
|
||||
--
|
||||
2.14.3
|
||||
|
196
testing/source/grub/09_slackware_linux
Normal file
196
testing/source/grub/09_slackware_linux
Normal file
|
@ -0,0 +1,196 @@
|
|||
#! /bin/sh
|
||||
set -e
|
||||
# grub-mkconfig helper script.
|
||||
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GRUB is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Save this file in /etc/grub.d/09_slackware_linux
|
||||
|
||||
prefix="/usr"
|
||||
exec_prefix="${prefix}"
|
||||
datarootdir="${prefix}/share"
|
||||
|
||||
. "${datarootdir}/grub/grub-mkconfig_lib"
|
||||
|
||||
export TEXTDOMAIN=grub
|
||||
export TEXTDOMAINDIR="${datarootdir}/locale"
|
||||
|
||||
CLASS="--class gnu-linux --class gnu --class os"
|
||||
|
||||
if [ "${GRUB_DISTRIBUTOR}" = "" ] ; then
|
||||
OS=Linux
|
||||
else
|
||||
OS="${GRUB_DISTRIBUTOR} Linux"
|
||||
CLASS="--class $(echo "${GRUB_DISTRIBUTOR}" | tr '[:upper:]' '[:lower:]') ${CLASS}"
|
||||
fi
|
||||
|
||||
# loop-AES arranges things so that /dev/loop/X can be our root device, but
|
||||
# the initrds that Linux uses don't like that.
|
||||
case ${GRUB_DEVICE} in
|
||||
/dev/loop/*|/dev/loop[0-9])
|
||||
GRUB_DEVICE=$(losetup "${GRUB_DEVICE}" | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/")
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "${GRUB_DEVICE_UUID}" = "" ] || [ "${GRUB_DISABLE_LINUX_UUID}" = "true" ] \
|
||||
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
|
||||
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
|
||||
else
|
||||
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
|
||||
fi
|
||||
|
||||
linux_entry ()
|
||||
{
|
||||
os="$1"
|
||||
tag="$2"
|
||||
version="$3"
|
||||
recovery="$4"
|
||||
args="$5"
|
||||
if ${recovery} ; then
|
||||
title="$(gettext "%s, with Linux %s [%s] (recovery mode)")"
|
||||
else
|
||||
title="$(gettext "%s, with Linux %s [%s]")"
|
||||
fi
|
||||
printf "menuentry \"${title}\" ${CLASS} {\n" "${os}" "${version}" "${tag}"
|
||||
save_default_entry | sed -e "s/^/\t/"
|
||||
|
||||
# Use ELILO's generic "efifb" when it's known to be available.
|
||||
# FIXME: We need an interface to select vesafb in case efifb can't be used.
|
||||
if [ "$GRUB_GFXPAYLOAD_LINUX" = "" ]; then
|
||||
if grep -qx "CONFIG_FB_EFI=y" /boot/config-"${version}" 2> /dev/null \
|
||||
&& grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-"${version}" 2> /dev/null; then
|
||||
cat << EOF
|
||||
set gfxpayload=keep
|
||||
EOF
|
||||
fi
|
||||
else
|
||||
cat << EOF
|
||||
set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ -z "${prepare_boot_cache}" ]; then
|
||||
prepare_boot_cache="$(prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/")"
|
||||
fi
|
||||
printf '%s\n' "${prepare_boot_cache}"
|
||||
cat << EOF
|
||||
echo $(printf "$(gettext "Loading Linux %s ...")" "${version}")
|
||||
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
|
||||
EOF
|
||||
if test -n "${initrd}" ; then
|
||||
cat << EOF
|
||||
echo $(gettext "Loading initial ramdisk ...")
|
||||
initrd ${initrd}
|
||||
EOF
|
||||
fi
|
||||
cat << EOF
|
||||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
process_list() {
|
||||
mylist="$1"
|
||||
tag="$2"
|
||||
initrd_allowed="$3"
|
||||
|
||||
# Version-sort the kernels
|
||||
sorted_kernels=$(echo "$mylist" | tr ' ' '\n' | version_sort -r)
|
||||
|
||||
# Use portable command substitution
|
||||
kernels=$(echo "$sorted_kernels" | tr ' ' '\n')
|
||||
|
||||
for kernel in $kernels; do
|
||||
|
||||
# Skip symbolic links to kernels if requested:
|
||||
if [ -L "$kernel" -a "$GRUB_DISABLE_KERNEL_SYMLINKS" = "true" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
printf "Found linux image: %s\n" "$kernel" >&2
|
||||
basename=$(basename "$kernel")
|
||||
dirname=$(dirname "$kernel")
|
||||
rel_dirname=$(make_system_path_relative_to_its_root "$dirname")
|
||||
version=$(echo "$basename" | sed -e "s,^[^0-9]*-,,g")
|
||||
alt_version=$(echo "$version" | sed -e "s,\.old$,,g")
|
||||
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
|
||||
initrd=
|
||||
actual_initrd=
|
||||
|
||||
if [ "${initrd_allowed}" = "true" ]; then
|
||||
for i in ${GRUB_EARLY_INITRD_LINUX_STOCK} \
|
||||
${GRUB_EARLY_INITRD_LINUX_CUSTOM}; do
|
||||
if [ -e "${dirname}/${i}" ]; then
|
||||
if [ -z "$initrd" ]; then
|
||||
initrd="$rel_dirname/$i"
|
||||
else
|
||||
initrd="$initrd $rel_dirname/$i"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
for i in "initrd-${tag}-${version}.gz" "initrd-${tag}.gz" \
|
||||
"initrd-${version}.gz" "initrd.gz" \
|
||||
"initrd.img-${version}" "initrd-${version}.img" \
|
||||
"initrd-${version}" "initrd.img-${alt_version}" \
|
||||
"initrd-${alt_version}.img" "initrd-${alt_version}"; do
|
||||
if [ -e "${dirname}/${i}" ]; then
|
||||
actual_initrd="true"
|
||||
if [ -z "$initrd" ]; then
|
||||
initrd="$rel_dirname/$i"
|
||||
else
|
||||
initrd="$initrd $rel_dirname/$i"
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "${initrd}" ]; then
|
||||
printf "Found initrd image: %s\n" "${initrd}" >&2
|
||||
fi
|
||||
if [ -z "$actual_initrd" ]; then
|
||||
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
|
||||
linux_root_device_thisversion=${GRUB_DEVICE}
|
||||
fi
|
||||
else
|
||||
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
|
||||
linux_root_device_thisversion=${GRUB_DEVICE}
|
||||
fi
|
||||
|
||||
linux_entry "${OS}" "${tag}" "${version}" false \
|
||||
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||
|
||||
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
|
||||
linux_entry "${OS}" "${tag}" "${version}" true \
|
||||
"single ${GRUB_CMDLINE_LINUX}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
prepare_boot_cache=
|
||||
|
||||
list=$(for i in /boot/vmlinu[xz]-generic-* /boot/vmlinu[xz]-generic /vmlinu[xz]-generic-* ; do
|
||||
if grub_file_is_not_garbage "$i" ; then printf "%s " "$i"; fi
|
||||
done)
|
||||
|
||||
process_list "${list}" "generic" "true"
|
||||
|
||||
list=$(for i in /boot/vmlinu[xz]-custom-* /boot/vmlinu[xz]-custom /vmlinu[xz]-custom-* ; do
|
||||
if grub_file_is_not_garbage "$i" ; then printf "%s " "$i"; fi
|
||||
done)
|
||||
process_list "${list}" "custom" "true"
|
||||
|
||||
list=$(for i in /boot/vmlinu[xz]-huge-* /boot/vmlinu[xz]-huge /vmlinu[xz]-huge-* ; do
|
||||
if grub_file_is_not_garbage "$i" ; then printf "%s " "$i"; fi
|
||||
done)
|
||||
process_list "${list}" "huge" "false"
|
12
testing/source/grub/10_linux.osname.patch
Normal file
12
testing/source/grub/10_linux.osname.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- ./util/grub.d/10_linux.in.orig 2022-12-07 07:47:11.000000000 -0600
|
||||
+++ ./util/grub.d/10_linux.in 2024-07-24 14:14:09.362582694 -0500
|
||||
@@ -30,6 +30,9 @@
|
||||
|
||||
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
||||
OS=GNU/Linux
|
||||
+elif echo ${GRUB_DISTRIBUTOR} | grep -q Slackware ; then # opting out, thanks
|
||||
+ OS="${GRUB_DISTRIBUTOR}"
|
||||
+ CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
|
||||
else
|
||||
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
|
||||
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
|
|
@ -0,0 +1,34 @@
|
|||
From b835601c7639ed1890f2d3db91900a8506011a8e Mon Sep 17 00:00:00 2001
|
||||
From: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
|
||||
Date: Thu, 21 Dec 2023 01:17:35 -0600
|
||||
Subject: build: Include grub-core/extra_deps.lst in dist
|
||||
|
||||
Fixes build failure due to the extra_deps.lst file not existing in the
|
||||
tarball. Found while trying to package GRUB 2.12 for Gentoo.
|
||||
|
||||
make[3]: *** No rule to make target '/var/tmp/portage/sys-boot/grub-2.12/work/grub-2.12/grub-core/extra_deps.lst', needed by 'syminfo.lst'. Stop.
|
||||
|
||||
Fixes: 89fbe0cac (grub-core/Makefile.am: Make path to extra_deps.lst relative to $(top_srcdir)/grub-core)
|
||||
Fixes: 154dcb1ae (build: Allow explicit module dependencies)
|
||||
|
||||
Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
---
|
||||
conf/Makefile.extra-dist | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
|
||||
index 5e7126f..d9e2b8c 100644
|
||||
--- a/conf/Makefile.extra-dist
|
||||
+++ b/conf/Makefile.extra-dist
|
||||
@@ -21,6 +21,7 @@ EXTRA_DIST += conf/i386-cygwin-img-ld.sc
|
||||
EXTRA_DIST += grub-core/Makefile.core.def
|
||||
EXTRA_DIST += grub-core/Makefile.gcry.def
|
||||
|
||||
+EXTRA_DIST += grub-core/extra_deps.lst
|
||||
EXTRA_DIST += grub-core/genmoddep.awk
|
||||
EXTRA_DIST += grub-core/genmod.sh.in
|
||||
EXTRA_DIST += grub-core/gensyminfo.sh.in
|
||||
--
|
||||
cgit v1.1
|
||||
|
29
testing/source/grub/doinst.sh
Normal file
29
testing/source/grub/doinst.sh
Normal file
|
@ -0,0 +1,29 @@
|
|||
config() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
||||
# toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
}
|
||||
|
||||
preserve_perms() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
if [ -e $OLD ]; then
|
||||
cp -a $OLD ${NEW}.incoming
|
||||
cat $NEW > ${NEW}.incoming
|
||||
mv ${NEW}.incoming $NEW
|
||||
fi
|
||||
config $NEW
|
||||
}
|
||||
|
||||
# Process config files in etc/grub.d/:
|
||||
for file in etc/grub.d/*.new ; do
|
||||
preserve_perms $file
|
||||
done
|
||||
config etc/default/grub.new
|
44
testing/source/grub/etc.default.grub
Normal file
44
testing/source/grub/etc.default.grub
Normal file
|
@ -0,0 +1,44 @@
|
|||
# If you change this file, run grub-mkconfig -o /boot/grub/grub.cfg
|
||||
# afterwards to update /boot/grub/grub.cfg.
|
||||
|
||||
GRUB_DEFAULT=0
|
||||
#GRUB_HIDDEN_TIMEOUT=0
|
||||
GRUB_HIDDEN_TIMEOUT_QUIET=false
|
||||
GRUB_TIMEOUT=10
|
||||
GRUB_DISTRIBUTOR=$( sed 's/Slackware /Slackware-/' /etc/slackware-version )
|
||||
GRUB_CMDLINE_LINUX_DEFAULT=""
|
||||
GRUB_CMDLINE_LINUX=""
|
||||
|
||||
# Uncomment to disable graphical terminal (grub-pc only):
|
||||
#GRUB_TERMINAL=console
|
||||
|
||||
# The resolution used on graphical terminal.
|
||||
# Note that you can use only modes which your graphic card supports via VBE.
|
||||
# You can see them in real GRUB with the command `vbeinfo'.
|
||||
#GRUB_GFXMODE=640x480
|
||||
#GRUB_GFXMODE=1024x768x32
|
||||
|
||||
# Font used on the graphical terminal:
|
||||
#GRUB_FONT=/usr/share/grub/dejavusansmono.pf2
|
||||
|
||||
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux:
|
||||
#GRUB_DISABLE_LINUX_UUID=true
|
||||
|
||||
# Uncomment to disable generation of recovery mode menu entries:
|
||||
GRUB_DISABLE_RECOVERY="true"
|
||||
|
||||
# Search for other operating systems with os-prober.
|
||||
# If you don't want this, you can do any of these things to disable it:
|
||||
# - change to "true"
|
||||
# - comment it out, since disabled is the default
|
||||
# - remove the executable bit from /etc/grub.d/30_os-prober
|
||||
GRUB_DISABLE_OS_PROBER="false"
|
||||
|
||||
# Disable the submenus:
|
||||
GRUB_DISABLE_SUBMENU="true"
|
||||
|
||||
# When using 09_slackware_linux, this option skips making menu entries for the
|
||||
# symbolic links to kernels. Some folks don't like the extra (redundant) menu
|
||||
# entries, while others like having an unversioned menu entry that doesn't
|
||||
# require "update-grub" after installing new kernels. Your call.
|
||||
#GRUB_DISABLE_KERNEL_SYMLINKS="true"
|
257
testing/source/grub/grub.SlackBuild
Executable file
257
testing/source/grub/grub.SlackBuild
Executable file
|
@ -0,0 +1,257 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2013, 2016, 2017, 2018, 2019, 2023, 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Modified 2016 by Eric Hameleers <alien@slackware.com> for Slackware Live Edition.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PKGNAM=grub
|
||||
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
# Better to use _ than ~ in the package filenames version:
|
||||
PKGVER=$(echo $VERSION | tr '~' '_')
|
||||
BUILD=${BUILD:-12}
|
||||
|
||||
# If you use stack-protector, then grub will not work with legacy BIOS:
|
||||
STACKPROTECT=${STACKPROTECT:---enable-stack-protector=no}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$(uname -m)" in
|
||||
i?86) ARCH=i686 ;;
|
||||
arm*) readelf /usr/bin/file -A | grep -E -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) ARCH=$(uname -m) ;;
|
||||
esac
|
||||
export ARCH
|
||||
fi
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "$PKGNAM-$PKGVER-$ARCH-$BUILD.txz"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
|
||||
if [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-mtune=generic"
|
||||
EFI32_FLAGS=" --with-platform=efi --target=i386 --program-prefix= "
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-mtune=generic"
|
||||
EFI32_FLAGS=" --with-platform=efi --target=i386 --program-prefix= "
|
||||
EFI_FLAGS=" --with-platform=efi --target=x86_64 --program-prefix= "
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS=""
|
||||
LIBDIRSUFFIX=""
|
||||
fi
|
||||
|
||||
# Don't use icecream:
|
||||
PATH=$(echo $PATH | sed "s|/usr/libexec/icecc/bin||g" | tr -s : | sed "s/^://g" | sed "s/:$//g")
|
||||
|
||||
TMP=${TMP:-/tmp}
|
||||
PKG=$TMP/package-$PKGNAM
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG
|
||||
|
||||
cd $TMP
|
||||
rm -rf $PKGNAM-$VERSION
|
||||
tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
|
||||
cd $PKGNAM-$VERSION || exit 1
|
||||
|
||||
chown -R root:root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \+ -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \+
|
||||
|
||||
# Accept /boot/initrd.gz as a valid initrd name (obsolete?):
|
||||
cat $CWD/initrd_naming.patch | patch -p1 --verbose || exit 1
|
||||
|
||||
# Support DejaVuSansMono font (dejavusansmono.pf2) by default:
|
||||
cat $CWD/grub.dejavusansmono.gfxterm.font.diff | patch -p1 --verbose || exit 1
|
||||
|
||||
# Fix alignment error with gcc8:
|
||||
cat $CWD/0198-align-struct-efi_variable-better.patch | patch -p1 --verbose || exit 1
|
||||
|
||||
# Skip processing any files in /etc/grub.d/ that end in .new or .orig:
|
||||
cat $CWD/0001-skip-new-and-orig-files-in-etc-grub.d.patch | patch -p1 --verbose || exit 1
|
||||
|
||||
# From Arch, add a couple more GRUB_COLOR options:
|
||||
cat $CWD/0001-00_header-add-GRUB_COLOR_-variables.patch | patch -p1 --verbose || exit 1
|
||||
|
||||
# Also from Arch, support drop-in config bits in /etc/default/grub.d/:
|
||||
cat $CWD/0003-support-dropins-for-default-configuration.patch | patch -p1 --verbose || exit 1
|
||||
|
||||
# Support GRUB_DISABLE_KERNEL_SYMLINKS variable in /etc/default/grub.
|
||||
# If this is not defined, it is assumed to be false.
|
||||
cat $CWD/0004-add-GRUB_DISABLE_KERNEL_SYMLINKS-variable.patch | patch -p1 --verbose || exit 1
|
||||
|
||||
# Fix 2.12 release with upstream commit (won't compile otherwise):
|
||||
cat $CWD/b835601c7639ed1890f2d3db91900a8506011a8e.patch | patch -p1 --verbose || exit 1
|
||||
|
||||
# For Slackware, opt-out of having our operating system renamed:
|
||||
cat $CWD/10_linux.osname.patch | patch -p1 --verbose || exit 1
|
||||
|
||||
# Still won't compile. Someday they'll remember how to cut a new release.
|
||||
touch grub-core/extra_deps.lst
|
||||
|
||||
# Regenerate build system to fix dependency on outdated automake:
|
||||
autoreconf -vif
|
||||
|
||||
build_grub() {
|
||||
EFI_DO="$*"
|
||||
# Configure:
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--infodir=/usr/info \
|
||||
--mandir=/usr/man \
|
||||
--disable-werror \
|
||||
--with-dejavufont=/usr/share/fonts/TTF/DejaVuSans.ttf \
|
||||
$STACKPROTECT \
|
||||
$EFI_DO || exit 1
|
||||
|
||||
# Build and install:
|
||||
make clean || exit 1
|
||||
make $NUMJOBS || make || exit 1
|
||||
make install DESTDIR=$PKG || exit 1
|
||||
|
||||
# Clear $EFI_DO :
|
||||
unset EFI_DO
|
||||
}
|
||||
|
||||
# Build 32bit and 64bit efi targets if requested:
|
||||
if [ -n "$EFI32_FLAGS" ]; then
|
||||
build_grub $EFI32_FLAGS || exit 1
|
||||
fi
|
||||
if [ -n "$EFI_FLAGS" ]; then
|
||||
build_grub $EFI_FLAGS || exit 1
|
||||
fi
|
||||
# Always end with regular build:
|
||||
build_grub || exit 1
|
||||
|
||||
## NOT USED (but we'll leave the file here for now)
|
||||
## Add custom 09_slackware_linux config. Thanks to Richard Cranium for the
|
||||
## initial version, and Daedra for making it POSIX compliant:
|
||||
#cp -a $CWD/09_slackware_linux $PKG/etc/grub.d/09_slackware_linux
|
||||
#chown root:root $PKG/etc/grub.d/09_slackware_linux
|
||||
#chmod 755 $PKG/etc/grub.d/09_slackware_linux
|
||||
|
||||
# Preserve files in /etc/grub.d/:
|
||||
for file in $PKG/etc/grub.d/*_* ; do
|
||||
mv ${file} ${file}.new
|
||||
done
|
||||
|
||||
# Add an update-grub script ala Ubuntu:
|
||||
cp -a $CWD/update-grub $PKG/usr/sbin/update-grub
|
||||
chown root:root $PKG/usr/sbin/update-grub
|
||||
chmod 755 $PKG/usr/sbin/update-grub
|
||||
|
||||
# Since every other grub command is of the form "grub-{command}", add a symlink
|
||||
# so that "grub-update" also works:
|
||||
ln -sf update-grub $PKG/usr/sbin/grub-update
|
||||
|
||||
# Strip binaries:
|
||||
( cd $PKG
|
||||
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
)
|
||||
|
||||
# Put bash-completion file in system directory:
|
||||
mkdir -p $PKG/usr/share/bash-completion/completions/
|
||||
mv $PKG/etc/bash_completion.d/grub \
|
||||
$PKG/usr/share/bash-completion/completions/grub
|
||||
rmdir --parents $PKG/etc/bash_completion.d 2>/dev/null
|
||||
|
||||
# Install default options file:
|
||||
mkdir -p $PKG/etc/default/grub.d
|
||||
cat $CWD/etc.default.grub > $PKG/etc/default/grub.new
|
||||
# Add a hint:
|
||||
echo "Files in this directory must end in .cfg to be processed." > $PKG/etc/default/grub.d/README
|
||||
|
||||
# Create a directory for grub.cfg:
|
||||
mkdir -p $PKG/boot/grub
|
||||
|
||||
# Add fonts, if found on the system:
|
||||
FONT_SIZE=${FONT_SIZE:-19}
|
||||
if [ -r /usr/share/fonts/TTF/unifont.ttf ]; then
|
||||
$PKG/usr/bin/grub-mkfont -o $PKG/usr/share/grub/unifont.pf2 -abv \
|
||||
-s $FONT_SIZE /usr/share/fonts/TTF/unifont.ttf
|
||||
fi
|
||||
if [ -r /usr/share/fonts/TTF/DejaVuSansMono.ttf ]; then
|
||||
$PKG/usr/bin/grub-mkfont -o $PKG/usr/share/grub/dejavusansmono.pf2 -abv \
|
||||
-s $FONT_SIZE /usr/share/fonts/TTF/DejaVuSansMono.ttf
|
||||
fi
|
||||
|
||||
# Add a documentation directory:
|
||||
mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
|
||||
cp -a \
|
||||
AUTHORS BUGS COPYING* INSTALL NEWS README* THANKS TODO \
|
||||
$PKG/usr/doc/${PKGNAM}-$VERSION
|
||||
|
||||
# Compress and if needed symlink the man pages:
|
||||
if [ -d $PKG/usr/man ]; then
|
||||
( cd $PKG/usr/man
|
||||
for manpagedir in $(find . -type d -name "man*") ; do
|
||||
( cd $manpagedir
|
||||
for eachpage in $( find . -type l -maxdepth 1) ; do
|
||||
ln -s $( readlink $eachpage ).gz $eachpage.gz
|
||||
rm $eachpage
|
||||
done
|
||||
gzip -9 *.?
|
||||
)
|
||||
done
|
||||
)
|
||||
fi
|
||||
|
||||
# Compress info files, if any:
|
||||
if [ -d $PKG/usr/info ]; then
|
||||
( cd $PKG/usr/info
|
||||
rm -f dir
|
||||
gzip -9 *
|
||||
)
|
||||
fi
|
||||
|
||||
# If there's a ChangeLog, installing at least part of the recent history
|
||||
# is useful, but don't let it get totally out of control:
|
||||
if [ -r ChangeLog ]; then
|
||||
DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
|
||||
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
|
||||
touch -r ChangeLog $DOCSDIR/ChangeLog
|
||||
fi
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$PKGVER-$ARCH-$BUILD.txz
|
||||
|
41
testing/source/grub/grub.dejavusansmono.gfxterm.font.diff
Normal file
41
testing/source/grub/grub.dejavusansmono.gfxterm.font.diff
Normal file
|
@ -0,0 +1,41 @@
|
|||
--- ./util/grub.d/00_header.in.orig 2012-05-03 18:04:39.000000000 -0500
|
||||
+++ ./util/grub.d/00_header.in 2013-09-17 01:43:37.870841064 -0500
|
||||
@@ -143,7 +143,7 @@
|
||||
EOF
|
||||
else
|
||||
for dir in "${pkgdatadir}" "`echo '/@bootdirname@/@grubdirname@' | sed "s,//*,/,g"`" /usr/share/grub ; do
|
||||
- for basename in unicode unifont ascii; do
|
||||
+ for basename in unicode unifont dejavusansmono ascii; do
|
||||
path="${dir}/${basename}.pf2"
|
||||
if is_path_readable_by_grub "${path}" > /dev/null ; then
|
||||
font_path="${path}"
|
||||
@@ -156,7 +156,7 @@
|
||||
if [ -n "${font_path}" ] ; then
|
||||
cat << EOF
|
||||
if [ x\$feature_default_font_path = xy ] ; then
|
||||
- font=unicode
|
||||
+ font=dejavusansmono
|
||||
else
|
||||
EOF
|
||||
# Make the font accessible
|
||||
@@ -169,7 +169,7 @@
|
||||
EOF
|
||||
else
|
||||
cat << EOF
|
||||
-if loadfont unicode ; then
|
||||
+if loadfont dejavusansmono ; then
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
diff -Naur grub-2.02~beta2.orig/util/grub-install.c grub-2.02~beta2/util/grub-install.c
|
||||
--- grub-2.02~beta2.orig/util/grub-install.c 2013-12-24 08:40:31.000000000 -0800
|
||||
+++ grub-2.02~beta2/util/grub-install.c.new 2015-01-27 22:07:56.714000000 -0800
|
||||
@@ -827,7 +827,7 @@
|
||||
grub_util_host_init (&argc, &argv);
|
||||
product_version = xstrdup (PACKAGE_VERSION);
|
||||
pkgdatadir = grub_util_get_pkgdatadir ();
|
||||
- label_font = grub_util_path_concat (2, pkgdatadir, "unicode.pf2");
|
||||
+ label_font = grub_util_path_concat (2, pkgdatadir, "dejavusansmono.pf2");
|
||||
|
||||
argp_parse (&argp, argc, argv, 0, 0, 0);
|
||||
|
13
testing/source/grub/initrd_naming.patch
Normal file
13
testing/source/grub/initrd_naming.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff -Naur grub-2.00.orig/util/grub.d/10_linux.in grub-2.00/util/grub.d/10_linux.in
|
||||
--- grub-2.00.orig/util/grub.d/10_linux.in 2012-04-18 23:24:38.000000000 +0200
|
||||
+++ grub-2.00/util/grub.d/10_linux.in 2012-06-30 07:53:03.765625589 +0200
|
||||
@@ -198,7 +198,8 @@
|
||||
"initramfs-genkernel-${version}" \
|
||||
"initramfs-genkernel-${alt_version}" \
|
||||
"initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
|
||||
- "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
|
||||
+ "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}" \
|
||||
+ "initrd.gz"; do
|
||||
if test -e "${dirname}/${i}" ; then
|
||||
initrd="$i"
|
||||
break
|
19
testing/source/grub/slack-desc
Normal file
19
testing/source/grub/slack-desc
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
grub: grub (the GRand Unified Bootloader)
|
||||
grub:
|
||||
grub: GNU GRUB, the GRand Unified Bootloader, is a flexible and powerful
|
||||
grub: boot loader program for a wide range of architectures.
|
||||
grub:
|
||||
grub: Homepage: https://www.gnu.org/software/grub/
|
||||
grub:
|
||||
grub:
|
||||
grub:
|
||||
grub:
|
||||
grub:
|
10
testing/source/grub/update-grub
Normal file
10
testing/source/grub/update-grub
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
# This is a simple script to update grub from the configuration file.
|
||||
# Please note that after upgrading to a new grub version, you should
|
||||
# first use "grub-install" to reinstall the bootloader, similar to this:
|
||||
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --recheck
|
||||
# or this:
|
||||
# grub-install --target=i386-pc --recheck /dev/sdX
|
||||
|
||||
set -e
|
||||
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"
|
174
testing/source/k/build-all-kernels.sh
Executable file
174
testing/source/k/build-all-kernels.sh
Executable file
|
@ -0,0 +1,174 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright 2018, 2021, 2022, 2023, 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# This script uses the SlackBuild scripts present here to build a
|
||||
# complete set of kernel packages for the currently running architecture.
|
||||
# It needs to be run once on 64-bit (uname -m = x86_64) and once on IA32
|
||||
# (uname -m = i586 or i686).
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
BUILD=${BUILD:-1}
|
||||
if [ -z "$VERSION" ]; then
|
||||
# Get the filename of the newest kernel tarball:
|
||||
KERNEL_SOURCE_FILE="$(/bin/ls -t linux-*.tar.?z | head -n 1 )"
|
||||
if echo $KERNEL_SOURCE_FILE | grep -q rc ; then # need to get rc versions a bit differently
|
||||
VERSION=$(/bin/ls -t linux-*.tar.?z | head -n 1 | rev | cut -f 3- -d . | cut -f 1,2 -d - | rev)
|
||||
else # normal release version
|
||||
VERSION=$(/bin/ls -t linux-*.tar.?z | head -n 1 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
|
||||
fi
|
||||
fi
|
||||
TMP=${TMP:-/tmp}
|
||||
|
||||
# By default, install the packages as we build them and update the initrd.
|
||||
INSTALL_PACKAGES=${INSTALL_PACKAGES:-YES}
|
||||
|
||||
# Clean kernels before building them. Not doing so quit working some time
|
||||
# after 4.19.x.
|
||||
export KERNEL_CLEAN=YES
|
||||
|
||||
# A list of recipes for build may be passed in the $RECIPES variable, otherwise
|
||||
# we have defaults based on uname -m:
|
||||
if [ -z "$RECIPES" ]; then
|
||||
if uname -m | grep -wq x86_64 ; then
|
||||
RECIPES="x86_64"
|
||||
elif uname -m | grep -wq i.86 ; then
|
||||
RECIPES="IA32"
|
||||
else
|
||||
echo "Error: no build recipes available for $(uname -m)"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Main build loop:
|
||||
for recipe in $RECIPES ; do
|
||||
|
||||
# Build recipes are defined here. These will select the appropriate .config
|
||||
# files and package naming scheme, and define the output location.
|
||||
if [ "$recipe" = "x86_64" ]; then
|
||||
# Recipe for x86_64:
|
||||
export CONFIG_SUFFIX=".x64"
|
||||
#unset LOCALVERSION
|
||||
OUTPUT=${OUTPUT:-${TMP}/output-x86_64-${VERSION}}
|
||||
elif [ "$recipe" = "IA32" ]; then
|
||||
# Recipe for IA32:
|
||||
export CONFIG_SUFFIX=".ia32"
|
||||
#unset LOCALVERSION
|
||||
OUTPUT=${OUTPUT:-${TMP}/output-ia32-${VERSION}}
|
||||
else
|
||||
echo "Error: recipe ${recipe} not implemented"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "*************************************************"
|
||||
echo "* Building kernels for recipe ${recipe}..."
|
||||
echo "*************************************************"
|
||||
echo
|
||||
|
||||
# Build kernel-source package:
|
||||
KERNEL_SOURCE_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_CONFIG="config-${VERSION}${LOCALVERSION}-generic${CONFIG_SUFFIX}" VERSION=$VERSION BUILD=$BUILD ./kernel-source.SlackBuild)
|
||||
KERNEL_CONFIG="config-${VERSION}${LOCALVERSION}-generic${CONFIG_SUFFIX}" VERSION=$VERSION BUILD=$BUILD ./kernel-source.SlackBuild
|
||||
mkdir -p $OUTPUT
|
||||
mv ${TMP}/${KERNEL_SOURCE_PACKAGE_NAME} $OUTPUT || exit 1
|
||||
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
|
||||
installpkg ${OUTPUT}/${KERNEL_SOURCE_PACKAGE_NAME} || exit 1
|
||||
fi
|
||||
|
||||
# Build kernel-huge package:
|
||||
# We will build in the just-built kernel tree. First, let's put back the
|
||||
# symlinks:
|
||||
( cd $TMP/package-kernel-source
|
||||
sh install/doinst.sh
|
||||
)
|
||||
KERNEL_HUGE_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_NAME=huge KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-${VERSION}${LOCALVERSION}-huge${CONFIG_SUFFIX} CONFIG_SUFFIX=${CONFIG_SUFFIX} KERNEL_OUTPUT_DIRECTORY=$OUTPUT/kernels/huge.s BUILD=$BUILD ./kernel-generic.SlackBuild)
|
||||
KERNEL_NAME=huge KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-${VERSION}${LOCALVERSION}-huge${CONFIG_SUFFIX} CONFIG_SUFFIX=${CONFIG_SUFFIX} KERNEL_OUTPUT_DIRECTORY=$OUTPUT/kernels/huge.s BUILD=$BUILD ./kernel-generic.SlackBuild
|
||||
if [ -r ${TMP}/${KERNEL_HUGE_PACKAGE_NAME} ]; then
|
||||
mv ${TMP}/${KERNEL_HUGE_PACKAGE_NAME} $OUTPUT
|
||||
else
|
||||
echo "kernel-source build failed."
|
||||
exit 1
|
||||
fi
|
||||
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
|
||||
installpkg ${OUTPUT}/${KERNEL_HUGE_PACKAGE_NAME} || exit 1
|
||||
fi
|
||||
|
||||
# Build kernel-generic package:
|
||||
KERNEL_GENERIC_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_NAME=generic KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-${VERSION}${LOCALVERSION}-generic${CONFIG_SUFFIX} CONFIG_SUFFIX=${CONFIG_SUFFIX} KERNEL_OUTPUT_DIRECTORY=$OUTPUT/kernels/generic.s BUILD=$BUILD ./kernel-generic.SlackBuild)
|
||||
KERNEL_NAME=generic KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-${VERSION}${LOCALVERSION}-generic${CONFIG_SUFFIX} CONFIG_SUFFIX=${CONFIG_SUFFIX} KERNEL_OUTPUT_DIRECTORY=$OUTPUT/kernels/generic.s BUILD=$BUILD ./kernel-generic.SlackBuild
|
||||
if [ -r ${TMP}/${KERNEL_GENERIC_PACKAGE_NAME} ]; then
|
||||
mv ${TMP}/${KERNEL_GENERIC_PACKAGE_NAME} $OUTPUT
|
||||
else
|
||||
echo "kernel-generic build failed."
|
||||
exit 1
|
||||
fi
|
||||
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
|
||||
installpkg ${OUTPUT}/${KERNEL_GENERIC_PACKAGE_NAME} || exit 1
|
||||
fi
|
||||
|
||||
# Build kernel-modules (for the just built generic kernel, but most of them
|
||||
# will also work with the huge kernel):
|
||||
KERNEL_MODULES_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=$TMP/package-kernel-source/usr/src/linux/.config BUILD=$BUILD ./kernel-modules.SlackBuild)
|
||||
KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=$TMP/package-kernel-source/usr/src/linux/.config BUILD=$BUILD ./kernel-modules.SlackBuild
|
||||
if [ -r ${TMP}/${KERNEL_MODULES_PACKAGE_NAME} ]; then
|
||||
mv ${TMP}/${KERNEL_MODULES_PACKAGE_NAME} $OUTPUT
|
||||
else
|
||||
echo "kernel-modules build failed."
|
||||
exit 1
|
||||
fi
|
||||
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
|
||||
installpkg ${OUTPUT}/${KERNEL_MODULES_PACKAGE_NAME} || exit 1
|
||||
fi
|
||||
|
||||
# Build kernel-headers:
|
||||
KERNEL_HEADERS_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux BUILD=$BUILD ./kernel-headers.SlackBuild)
|
||||
KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux BUILD=$BUILD ./kernel-headers.SlackBuild
|
||||
if [ -r ${TMP}/${KERNEL_HEADERS_PACKAGE_NAME} ]; then
|
||||
mv ${TMP}/${KERNEL_HEADERS_PACKAGE_NAME} $OUTPUT
|
||||
else
|
||||
echo "kernel-headers build failed."
|
||||
exit 1
|
||||
fi
|
||||
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
|
||||
upgradepkg --reinstall --install-new ${OUTPUT}/${KERNEL_HEADERS_PACKAGE_NAME} || exit 1
|
||||
fi
|
||||
|
||||
# Update initrd:
|
||||
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
|
||||
INITRD_VERSION="$(grep "Kernel Configuration" $TMP/package-kernel-source/usr/src/linux/.config | cut -f 3 -d ' ')"
|
||||
INITRD_LOCALVERSION="$(cat $TMP/package-kernel-source/usr/src/linux/.config 2> /dev/null | grep CONFIG_LOCALVERSION= | cut -f 2 -d = | tr -d \")"
|
||||
if [ -r /etc/mkinitrd.conf ]; then
|
||||
mkinitrd -F /etc/mkinitrd.conf -k ${INITRD_VERSION}${INITRD_LOCALVERSION}
|
||||
else # try this?
|
||||
sh /usr/share/mkinitrd/mkinitrd_command_generator.sh -k ${INITRD_VERSION}${INITRD_LOCALVERSION} -a "-o /boot/initrd-${INITRD_VERSION}${INITRD_LOCALVERSION}-generic.img" | sed "s/-c -k/-k/g" | bash
|
||||
if [ -r /boot/initrd-${INITRD_VERSION}${INITRD_LOCALVERSION}-generic.img ]; then
|
||||
# Good old compat symlink :-)
|
||||
ln -sf initrd-${INITRD_VERSION}${INITRD_LOCALVERSION}-generic.img /boot/initrd.gz
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "${recipe} kernel packages done!"
|
||||
echo
|
||||
|
||||
done
|
11196
testing/source/k/kernel-configs/config-6.10.1-generic.ia32
Normal file
11196
testing/source/k/kernel-configs/config-6.10.1-generic.ia32
Normal file
File diff suppressed because it is too large
Load diff
11297
testing/source/k/kernel-configs/config-6.10.1-generic.x64
Normal file
11297
testing/source/k/kernel-configs/config-6.10.1-generic.x64
Normal file
File diff suppressed because it is too large
Load diff
11196
testing/source/k/kernel-configs/config-6.10.1-huge.ia32
Normal file
11196
testing/source/k/kernel-configs/config-6.10.1-huge.ia32
Normal file
File diff suppressed because it is too large
Load diff
11297
testing/source/k/kernel-configs/config-6.10.1-huge.x64
Normal file
11297
testing/source/k/kernel-configs/config-6.10.1-huge.x64
Normal file
File diff suppressed because it is too large
Load diff
157
testing/source/k/kernel-generic.SlackBuild
Executable file
157
testing/source/k/kernel-generic.SlackBuild
Executable file
|
@ -0,0 +1,157 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright 2018, 2020, 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# To use this script, point it to a Linux kernel source tree and a .config
|
||||
# file by setting the appropriate environment variables:
|
||||
#
|
||||
# KERNEL_SOURCE=/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-6.9.9-generic.x64 ./kernel-generic.SlackBuild
|
||||
#
|
||||
# It can also build the huge (or any other) kernel:
|
||||
#
|
||||
# KERNEL_NAME=huge KERNEL_SOURCE=/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-6.9.9-huge.x64 ./kernel-generic.SlackBuild
|
||||
#
|
||||
# By default, it will call the package "kernel-generic" and use the source and
|
||||
# .config already in /usr/src/linux (if possible).
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
KERNEL_NAME=${KERNEL_NAME:-generic}
|
||||
KERNEL_SOURCE=${KERNEL_SOURCE:-/usr/src/linux}
|
||||
KERNEL_CONFIG=${KERNEL_CONFIG:-/usr/src/linux/.config}
|
||||
CONFIG_SUFFIX=${CONFIG_SUFFIX:-}
|
||||
BUILD=${BUILD:-1}
|
||||
if [ ! -r "${KERNEL_CONFIG}" ]; then
|
||||
echo "Error: the KERNEL_CONFIG environment variable needs to be set to the"
|
||||
echo ".config file to be used to build this kernel. Example:"
|
||||
echo "KERNEL_NAME=generic KERNEL_SOURCE=/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-6.9.9-generic.x64 ./kernel-generic.SlackBuild"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "${KERNEL_SOURCE}" ]; then
|
||||
echo "Error: kernel source directory ${KERNEL_SOURCE} does not exist."
|
||||
exit 1
|
||||
fi
|
||||
# Get the kernel version from the kernel Makefile:
|
||||
VERSION=$(grep "^VERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^PATCHLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^SUBLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)$(grep "^EXTRAVERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)
|
||||
# Set LOCALVERSION to the value found inside the .config:
|
||||
LOCALVERSION="$(cat ${KERNEL_SOURCE}/.config 2> /dev/null | grep CONFIG_LOCALVERSION= | cut -f 2 -d = | tr -d \")"
|
||||
# The default kernel arch is x86 for all 32-bit and 64-bit x86:
|
||||
if [ -z "${KERNEL_ARCH}" ]; then
|
||||
case "$(uname -m)" in
|
||||
i?86) KERNEL_ARCH=x86 ;;
|
||||
x86_64) KERNEL_ARCH=x86 ;;
|
||||
# Use uname -m for all other archs:
|
||||
*) KERNEL_ARCH=$(uname -m) ;;
|
||||
esac
|
||||
fi
|
||||
# If this variable is set to an output directory, we will also put copies of
|
||||
# System.map.gz, bzImage, and config in there:
|
||||
KERNEL_OUTPUT_DIRECTORY=${KERNEL_OUTPUT_DIRECTORY:-}
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
# We will need to copy the config and run make oldconfig and make
|
||||
# prepare in order to generate kernel/bounds.s, where we can find
|
||||
# the true $PACKAGE_ARCH.
|
||||
if [ ! "${KERNEL_CONFIG}" = "${KERNEL_SOURCE}/.config" ]; then
|
||||
cp -a ${KERNEL_CONFIG} ${KERNEL_SOURCE}/.config
|
||||
fi
|
||||
cd ${KERNEL_SOURCE}
|
||||
make oldconfig 1> /dev/null 2> /dev/null
|
||||
make prepare 1> /dev/null 2> /dev/null
|
||||
PACKAGE_ARCH=$(cat kernel/bounds.s | grep -w "\-march=.*" | tr " " "\n" | grep -w "\-march=.*" | cut -f 2 -d = | tr - _)
|
||||
echo "kernel-${KERNEL_NAME}-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${PACKAGE_ARCH}-$BUILD.txz"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
TMP=${TMP:-/tmp}
|
||||
PKG=$TMP/package-kernel-${KERNEL_NAME}
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG
|
||||
|
||||
# Set the variable $KERNEL_CLEAN to anything to run "make clean" before the
|
||||
# build. Default is to start compiling in the tree as we found it.
|
||||
if [ ! -z "${KERNEL_CLEAN}" ]; then
|
||||
( cd ${KERNEL_SOURCE}
|
||||
echo "Cleaning kernel source (make clean)..."
|
||||
make clean
|
||||
# Make sure header files aren't missing...
|
||||
make prepare
|
||||
# Don't package the kernel in the sources:
|
||||
find . -name "*Image" -exec rm "{}" \+
|
||||
# No need for these:
|
||||
rm -f .config.old .version
|
||||
find . -name "*.cmd" -exec rm -f "{}" \+
|
||||
rm .*.d
|
||||
)
|
||||
fi
|
||||
|
||||
# Copy the .config into the kernel source directory (unless it's there already)
|
||||
if [ ! "${KERNEL_CONFIG}" = "${KERNEL_SOURCE}/.config" ]; then
|
||||
echo "Copying the .config file to the kernel source tree:"
|
||||
cp -a --verbose ${KERNEL_CONFIG} ${KERNEL_SOURCE}/.config
|
||||
fi
|
||||
|
||||
( cd ${KERNEL_SOURCE}
|
||||
echo "Running make oldconfig..."
|
||||
make oldconfig
|
||||
echo "Building kernel..."
|
||||
make $NUMJOBS bzImage || make bzImage || exit 1
|
||||
# Output files to a directory, if requested:
|
||||
if [ ! -z "${KERNEL_OUTPUT_DIRECTORY}" ]; then
|
||||
echo "Copying files to ${KERNEL_OUTPUT_DIRECTORY}..."
|
||||
mkdir -p ${KERNEL_OUTPUT_DIRECTORY}
|
||||
rm -f ${KERNEL_OUTPUT_DIRECTORY}/*
|
||||
cp -a --verbose System.map ${KERNEL_OUTPUT_DIRECTORY}
|
||||
cp -a --verbose .config ${KERNEL_OUTPUT_DIRECTORY}/config
|
||||
cp -a --verbose arch/${KERNEL_ARCH}/boot/bzImage ${KERNEL_OUTPUT_DIRECTORY}
|
||||
gzip -9 ${KERNEL_OUTPUT_DIRECTORY}/System.map
|
||||
fi
|
||||
echo "Preparing the package in $PKG..."
|
||||
mkdir -p $PKG/boot
|
||||
cp -a --verbose System.map $PKG/boot/System.map-${VERSION}${LOCALVERSION}-${KERNEL_NAME}${CONFIG_SUFFIX}
|
||||
cp -a --verbose .config $PKG/boot/config-${VERSION}${LOCALVERSION}-${KERNEL_NAME}${CONFIG_SUFFIX}
|
||||
cp -a --verbose arch/${KERNEL_ARCH}/boot/bzImage $PKG/boot/vmlinuz-${VERSION}${LOCALVERSION}-${KERNEL_NAME}
|
||||
# Make symlinks:
|
||||
ln -sf System.map-${VERSION}${LOCALVERSION}-${KERNEL_NAME}${CONFIG_SUFFIX} $PKG/boot/System.map
|
||||
ln -sf config-${VERSION}${LOCALVERSION}-${KERNEL_NAME}${CONFIG_SUFFIX} $PKG/boot/config
|
||||
ln -sf vmlinuz-${VERSION}${LOCALVERSION}-${KERNEL_NAME} $PKG/boot/vmlinuz-${KERNEL_NAME}
|
||||
ln -sf vmlinuz-${VERSION}${LOCALVERSION}-${KERNEL_NAME} $PKG/boot/vmlinuz
|
||||
) || exit 1
|
||||
|
||||
# Fetch the kernel architecture from the source tree:
|
||||
cd ${KERNEL_SOURCE}
|
||||
PACKAGE_ARCH=$(cat kernel/bounds.s | grep -w "\-march=.*" | tr " " "\n" | grep -w "\-march=.*" | cut -f 2 -d = | tr - _)
|
||||
|
||||
mkdir $PKG/install
|
||||
if [ -r $CWD/slack-desc/slack-desc.kernel-${KERNEL_NAME}.${PACKAGE_ARCH} ]; then
|
||||
cat $CWD/slack-desc/slack-desc.kernel-${KERNEL_NAME}.${PACKAGE_ARCH} > $PKG/install/slack-desc
|
||||
else
|
||||
cat $CWD/slack-desc/slack-desc.kernel-template | sed "s/%PACKAGE_NAME%/kernel-${KERNEL_NAME}${LOCALVERSION}/g" > $PKG/install/slack-desc
|
||||
fi
|
||||
|
||||
# Make the package:
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $TMP/kernel-${KERNEL_NAME}-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${PACKAGE_ARCH}-$BUILD.txz
|
89
testing/source/k/kernel-headers.SlackBuild
Executable file
89
testing/source/k/kernel-headers.SlackBuild
Executable file
|
@ -0,0 +1,89 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# To use this script, point it to a Linux kernel source tree, and it will make
|
||||
# the kernel-headers package using the .config to get all needed package
|
||||
# version information:
|
||||
#
|
||||
# KERNEL_SOURCE=/usr/src/linux ./kernel-headers.SlackBuild
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PKGNAM=${PKGNAM:-kernel-headers}
|
||||
BUILD=${BUILD:-1}
|
||||
KERNEL_SOURCE=${KERNEL_SOURCE:-/usr/src/linux}
|
||||
if [ -z "${HEADERS_ARCH}" ]; then
|
||||
case "$(uname -m)" in
|
||||
i?86) HEADERS_ARCH=x86 ;;
|
||||
x86_64) HEADERS_ARCH=x86 ;;
|
||||
# Use uname -m for all other archs:
|
||||
*) HEADERS_ARCH=$(uname -m) ;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -d "${KERNEL_SOURCE}" ]; then
|
||||
echo "Error: kernel source directory ${KERNEL_SOURCE} does not exist."
|
||||
exit 1
|
||||
elif [ ! -r ${KERNEL_SOURCE}/.config ]; then
|
||||
echo "Error: a .config was not found in ${KERNEL_SOURCE}."
|
||||
exit 1
|
||||
fi
|
||||
# Get the kernel version from the kernel Makefile:
|
||||
VERSION=$(grep "^VERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^PATCHLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^SUBLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)$(grep "^EXTRAVERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)
|
||||
# Set LOCALVERSION to the value found inside the .config:
|
||||
LOCALVERSION="$(cat ${KERNEL_SOURCE}/.config 2> /dev/null | grep CONFIG_LOCALVERSION= | cut -f 2 -d = | tr -d \")"
|
||||
|
||||
TMP=${TMP:-/tmp}
|
||||
PKG=$TMP/package-$PKGNAM
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "kernel-headers-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${HEADERS_ARCH}-$BUILD.txz"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG
|
||||
mkdir -p $PKG/usr
|
||||
|
||||
# Generate the kernel headers and clean them up:
|
||||
( cd ${KERNEL_SOURCE}
|
||||
echo "Generating headers from the Linux kernel source tree in ${KERNEL_SOURCE}:"
|
||||
make headers_install ARCH=${HEADERS_ARCH} INSTALL_HDR_PATH=$PKG/usr
|
||||
cd $PKG/usr/include
|
||||
# You won't want these files. The ones in libdrm work better.
|
||||
rm -rf drm
|
||||
# This next part seems pretty much cosmetic, but since we've been doing this
|
||||
# for a long time (and others also do), we'll stick with it:
|
||||
mv asm asm-${HEADERS_ARCH}
|
||||
ln -sf asm-${HEADERS_ARCH} asm
|
||||
# Remove unneeded dotfiles:
|
||||
find . -name ".??*" -exec rm -f {} \+
|
||||
)
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc/slack-desc.kernel-headers > $PKG/install/slack-desc
|
||||
|
||||
# Make the package:
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $TMP/kernel-headers-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${HEADERS_ARCH}-$BUILD.txz
|
145
testing/source/k/kernel-modules.SlackBuild
Executable file
145
testing/source/k/kernel-modules.SlackBuild
Executable file
|
@ -0,0 +1,145 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright 2018, 2020, 2022, 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# To use this script, point it to a Linux kernel source tree and a .config
|
||||
# file by setting the appropriate environment variables:
|
||||
#
|
||||
# KERNEL_SOURCE=/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-6.9.9-generic.x64 ./kernel-modules.SlackBuild
|
||||
#
|
||||
# By default, it will use the source and .config already in /usr/src/linux (if possible).
|
||||
|
||||
# KERNEL_NAME is optional, and we don't use it. Define it to "-name" if
|
||||
# you'd like an extra string after "kernel" in the package name
|
||||
# (i.e. "kernel-name-modules").
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
KERNEL_NAME=${KERNEL_NAME:-}
|
||||
KERNEL_SOURCE=${KERNEL_SOURCE:-/usr/src/linux}
|
||||
KERNEL_CONFIG=${KERNEL_CONFIG:-/usr/src/linux/.config}
|
||||
BUILD=${BUILD:-1}
|
||||
|
||||
# The CONFIG_DEBUG_INFO_BTF_MODULES option adds a huge amount of debugging
|
||||
# data to the modules which we don't actually need. We'll strip debugging
|
||||
# information from kernel modules by default. If you are building a debug
|
||||
# kernel and wish to retain this data, export the variable below set to "0".
|
||||
STRIP_DEBUG=${STRIP_DEBUG:-1}
|
||||
|
||||
# Let's export the variable with the name needed by the kernel's Makefiles,
|
||||
# just for good measure.
|
||||
export INSTALL_MOD_STRIP=$STRIP_DEBUG
|
||||
|
||||
if [ ! -r "${KERNEL_CONFIG}" ]; then
|
||||
echo "Error: the KERNEL_CONFIG environment variable needs to be set to the"
|
||||
echo ".config file to be used to build these modules. Example:"
|
||||
echo "KERNEL_SOURCE=/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-6.9.9-generic.x64 ./kernel-modules.SlackBuild"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "${KERNEL_SOURCE}" ]; then
|
||||
echo "Error: kernel source directory ${KERNEL_SOURCE} does not exist."
|
||||
exit 1
|
||||
fi
|
||||
# Get the kernel version from the kernel Makefile:
|
||||
VERSION=$(grep "^VERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^PATCHLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^SUBLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)$(grep "^EXTRAVERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)
|
||||
# Set LOCALVERSION to the value found inside the .config:
|
||||
LOCALVERSION="$(cat ${KERNEL_SOURCE}/.config 2> /dev/null | grep CONFIG_LOCALVERSION= | cut -f 2 -d = | tr -d \")"
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
# We will need to copy the config and run make oldconfig and make
|
||||
# prepare in order to generate kernel/bounds.s, where we can find
|
||||
# the true $PACKAGE_ARCH.
|
||||
if [ ! "${KERNEL_CONFIG}" = "${KERNEL_SOURCE}/.config" ]; then
|
||||
cp -a ${KERNEL_CONFIG} ${KERNEL_SOURCE}/.config
|
||||
fi
|
||||
cd ${KERNEL_SOURCE}
|
||||
make oldconfig 1> /dev/null 2> /dev/null
|
||||
make prepare 1> /dev/null 2> /dev/null
|
||||
PACKAGE_ARCH=$(cat kernel/bounds.s | grep -w "\-march=.*" | tr " " "\n" | grep -w "\-march=.*" | cut -f 2 -d = | tr - _)
|
||||
echo "kernel${KERNEL_NAME}-modules${LOCALVERSION}-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${PACKAGE_ARCH}-$BUILD.txz"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
TMP=${TMP:-/tmp}
|
||||
PKG=$TMP/package-kernel${KERNEL_NAME}-modules
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG
|
||||
|
||||
# Set the variable $KERNEL_CLEAN to anything to run "make clean" before the
|
||||
# build. Default is to start compiling in the tree as we found it.
|
||||
if [ ! -z "${KERNEL_CLEAN}" ]; then
|
||||
( cd ${KERNEL_SOURCE}
|
||||
echo "Cleaning kernel source (make clean)..."
|
||||
make clean
|
||||
# Make sure header files aren't missing...
|
||||
make prepare
|
||||
# Don't package the kernel in the sources:
|
||||
find . -name "*Image" -exec rm "{}" \+
|
||||
# No need for these:
|
||||
rm -f .config.old .version
|
||||
find . -name "*.cmd" -exec rm -f "{}" \+
|
||||
rm .*.d
|
||||
)
|
||||
fi
|
||||
|
||||
# Copy the .config into the kernel source directory (unless it's there already)
|
||||
if [ ! "${KERNEL_CONFIG}" = "${KERNEL_SOURCE}/.config" ]; then
|
||||
echo "Copying the .config file to the kernel source tree:"
|
||||
cp -a --verbose ${KERNEL_CONFIG} ${KERNEL_SOURCE}/.config
|
||||
fi
|
||||
|
||||
( cd ${KERNEL_SOURCE}
|
||||
echo "Running make oldconfig..."
|
||||
make oldconfig
|
||||
echo "Running a preliminary make (needed to create modules.builtin.modinfo)..."
|
||||
make $NUMJOBS || exit 1
|
||||
echo "Building kernel modules..."
|
||||
make $NUMJOBS modules || exit 1
|
||||
echo "Installing kernel modules to $PKG..."
|
||||
make INSTALL_MOD_PATH=$PKG INSTALL_MOD_STRIP=$STRIP_DEBUG modules_install || exit 1
|
||||
# Fix build and source symlinks if they are pointing into $TMP:
|
||||
( cd $PKG/lib/modules/${VERSION}${LOCALVERSION}
|
||||
for symlink in build source ; do
|
||||
target=$(readlink $symlink)
|
||||
if echo $target | grep -q "^$TMP/package-kernel-source/" ; then
|
||||
rm -f $symlink
|
||||
ln -sf $(echo $target | sed "s|$TMP/package-kernel-source/|/|g") $symlink
|
||||
fi
|
||||
done
|
||||
)
|
||||
depmod -b $PKG -a ${VERSION}${LOCALVERSION}
|
||||
) || exit 1
|
||||
|
||||
mkdir $PKG/install
|
||||
cat $CWD/slack-desc/slack-desc.kernel-modules-template | sed "s/%PACKAGE_NAME%/kernel${KERNEL_NAME}-modules${LOCALVERSION}/g" > $PKG/install/slack-desc
|
||||
|
||||
# Fetch the kernel architecture from the source tree:
|
||||
cd ${KERNEL_SOURCE}
|
||||
PACKAGE_ARCH=$(cat kernel/bounds.s | grep -w "\-march=.*" | tr " " "\n" | grep -w "\-march=.*" | cut -f 2 -d = | tr - _)
|
||||
|
||||
# Make the package:
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $TMP/kernel${KERNEL_NAME}-modules${LOCALVERSION}-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${PACKAGE_ARCH}-$BUILD.txz
|
227
testing/source/k/kernel-source.SlackBuild
Executable file
227
testing/source/k/kernel-source.SlackBuild
Executable file
|
@ -0,0 +1,227 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright 2018, 2020, 2021, 2023, 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PKGNAM=${PKGNAM:-kernel-source}
|
||||
BUILD=${BUILD:-1}
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
TMP=${TMP:-/tmp}
|
||||
PKG=$TMP/package-$PKGNAM
|
||||
# If CONFIG_PREEMPT=y and CONFIG_PREEMPT_DYNAMIC=y, then set a default preempt
|
||||
# mode (none, voluntary, or full):
|
||||
CONFIG_PREEMPT_DEFAULT_MODE=${CONFIG_PREEMPT_DEFAULT_MODE:-voluntary}
|
||||
|
||||
# If a $VERSION is not passed to this script, use the newest linux-*.tar.xz
|
||||
# found in this directory:
|
||||
VERSION=${VERSION:-$(/bin/ls -t linux-*.tar.?z | head -n 1 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
if ! /bin/ls linux-*.tar.?z 1> /dev/null 2> /dev/null ; then
|
||||
echo "Error: kernel source not found. (/bin/ls linux-*.tar.?z)"
|
||||
fi
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$(uname -m)" in
|
||||
# Use uname -m for all archs:
|
||||
*) ARCH=$(uname -m) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# This function will revert or apply patches that are present here.
|
||||
# Directories that are currently supported:
|
||||
# patches-revert-${VERSION} (revert patches from this directory if kernel version matches)
|
||||
# patches-revert-${ARCH} (revert patches from this directory if $ARCH matches)
|
||||
# patches-${VERSION} (apply patches from this directory if kernel version matches)
|
||||
# patches-${ARCH} (apply patches from this directory if $ARCH matches)
|
||||
# All the applied/reverted patches will be copied to the root of the kernel source tree.
|
||||
apply_patches() {
|
||||
# First do patches-revert:
|
||||
if [ -d $CWD/patches-revert-${VERSION} ]; then
|
||||
if [ "$1" = "VERBOSE" ]; then
|
||||
echo "Reverting kernel patches in $CWD/patches-revert-${VERSION} and copying patches to $PKG/usr/src/linux-${VERSION}..."
|
||||
zcat $CWD/patches-revert-${VERSION}/*.gz | patch -p1 -R --backup --suffix=.orig || exit 1
|
||||
else
|
||||
zcat $CWD/patches-revert-${VERSION}/*.gz | patch -p1 -R --backup --suffix=.orig 1> /dev/null 2> /dev/null || exit 1
|
||||
fi
|
||||
cp -a $CWD/patches-revert-${VERSION}/*.gz .
|
||||
fi
|
||||
if [ -d $CWD/patches-revert-${ARCH} ]; then
|
||||
if [ "$1" = "VERBOSE" ]; then
|
||||
echo "Reverting kernel patches in $CWD/patches-revert-${ARCH} and copying patches to $PKG/usr/src/linux-${VERSION}..."
|
||||
zcat $CWD/patches-revert-${ARCH}/*.gz | patch -p1 -R --backup --suffix=.orig || exit 1
|
||||
else
|
||||
zcat $CWD/patches-revert-${ARCH}/*.gz | patch -p1 -R --backup --suffix=.orig 1> /dev/null 2> /dev/null || exit 1
|
||||
fi
|
||||
cp -a $CWD/patches-revert-${ARCH}/*.gz .
|
||||
fi
|
||||
# Then apply patches:
|
||||
if [ -d $CWD/patches-${VERSION} ]; then
|
||||
if [ "$1" = "VERBOSE" ]; then
|
||||
echo "Applying kernel patches in $CWD/patches-${VERSION} and copying patches to $PKG/usr/src/linux-${VERSION}..."
|
||||
zcat $CWD/patches-${VERSION}/*.gz | patch -p1 --backup --suffix=.orig || exit 1
|
||||
else
|
||||
zcat $CWD/patches-${VERSION}/*.gz | patch -p1 --backup --suffix=.orig 1> /dev/null 2> /dev/null || exit 1
|
||||
fi
|
||||
cp -a $CWD/patches-${VERSION}/*.gz .
|
||||
fi
|
||||
if [ -d $CWD/patches-${ARCH} ]; then
|
||||
if [ "$1" = "VERBOSE" ]; then
|
||||
echo "Applying kernel patches in $CWD/patches-${ARCH} and copying patches to $PKG/usr/src/linux-${VERSION}..."
|
||||
zcat $CWD/patches-${ARCH}/*.gz | patch -p1 --backup --suffix=.orig || exit 1
|
||||
else
|
||||
zcat $CWD/patches-${ARCH}/*.gz | patch -p1 --backup --suffix=.orig 1> /dev/null 2> /dev/null || exit 1
|
||||
fi
|
||||
cp -a $CWD/patches-${ARCH}/*.gz .
|
||||
fi
|
||||
}
|
||||
|
||||
# If KERNEL_CONFIG (name of kernel .config file in ./kernel-configs to use)
|
||||
# has not been passed to this script, then we will select one. We will prefer
|
||||
# to use a generic, SMP-supporting .config with a version number exactly
|
||||
# matching the kernel sources. But if there's no exact version match, we will
|
||||
# start with the newest .config we can find that's of the appropriate type.
|
||||
if [ -z "${KERNEL_CONFIG}" ]; then # figure out the best matching .config
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
CONFIG_SUFFIX=".x64"
|
||||
elif [ "$ARCH" = "i586" ]; then
|
||||
CONFIG_SUFFIX=".ia32"
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
CONFIG_SUFFIX=".ia32"
|
||||
fi
|
||||
if [ -r "$CWD/kernel-configs/config-${VERSION}${LOCALVERSION}-generic${CONFIG_SUFFIX}" ]; then
|
||||
# Exact match!
|
||||
KERNEL_CONFIG="config-${VERSION}${LOCALVERSION}-generic${CONFIG_SUFFIX}"
|
||||
else # no exact match, so find newest with the same name:
|
||||
FIND_MATCH="$(/bin/ls -t $CWD/kernel-configs/config-*${LOCALVERSION}-generic${CONFIG_SUFFIX} 2> /dev/null | head -n 1)"
|
||||
if [ -r "${FIND_MATCH}" ]; then
|
||||
KERNEL_CONFIG="$(basename ${FIND_MATCH})"
|
||||
unset FIND_MATCH
|
||||
else
|
||||
echo "Error: no matching .config file could be found for this kernel. Tried:"
|
||||
echo " $CWD/kernel-configs/config-${VERSION}${LOCALVERSION}-generic${CONFIG_SUFFIX} (not found)"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
else # We were given a name to use:
|
||||
if [ ! -r "$CWD/kernel-configs/${KERNEL_CONFIG}" ]; then
|
||||
echo "Error: specified kernel .config $CWD/kernel-configs/${KERNEL_CONFIG} was not found."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
# Set LOCALVERSION to the value found inside the .config:
|
||||
LOCALVERSION="$(cat $CWD/kernel-configs/${KERNEL_CONFIG} | grep CONFIG_LOCALVERSION= | cut -f 2 -d = | tr -d \")"
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
# We will have to extract and patch the kernel sources to find out the kernel version:
|
||||
TEMPDIR=$(mktemp -d)
|
||||
cd $TEMPDIR
|
||||
tar xf $CWD/linux-${VERSION}.tar.?z || exit 1
|
||||
cd linux*
|
||||
apply_patches
|
||||
PACKAGE_VERSION=$(grep "^VERSION = " Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^PATCHLEVEL = " Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^SUBLEVEL = " Makefile | rev | cut -f 1 -d ' ' | rev)$(grep "^EXTRAVERSION = " Makefile | rev | cut -f 1 -d ' ' | rev)
|
||||
cd $CWD
|
||||
rm -rf $TEMPDIR
|
||||
echo "kernel-source-$(echo ${PACKAGE_VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-noarch-$BUILD.txz"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Using kernel config: $CWD/kernel-configs/${KERNEL_CONFIG}"
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG
|
||||
mkdir -p $PKG/usr/src
|
||||
|
||||
echo "Untarring $CWD/linux-${VERSION}.tar.?z in $PKG/usr/src..."
|
||||
( cd $PKG/usr/src
|
||||
tar xf $CWD/linux-${VERSION}.tar.?z || exit 1
|
||||
echo "Making /usr/src/linux symlink..."
|
||||
ln -sf linux-* linux
|
||||
cd linux-*
|
||||
apply_patches VERBOSE
|
||||
echo "Copying $CWD/kernel-configs/${KERNEL_CONFIG} to .config..."
|
||||
cp -a $CWD/kernel-configs/${KERNEL_CONFIG} .config
|
||||
echo "Fixing permissions/ownership..."
|
||||
chown -R root:root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \+ -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \+
|
||||
) || exit 1
|
||||
|
||||
# Kernel is now ready to configure. We will also build this kernel so that
|
||||
# the installed kernel source package is fully configured, and building an
|
||||
# out-of-tree module (such as the NVIDIA driver) won't require the user
|
||||
# to build the kernel sources first.
|
||||
( cd $PKG/usr/src/linux-${VERSION}
|
||||
echo "Making oldconfig..."
|
||||
make oldconfig
|
||||
if [ ! -r $CWD/kernel-configs/config-${VERSION}${LOCALVERSION}-generic${CONFIG_SUFFIX} ]; then
|
||||
echo "Saving new .config as: $CWD/kernel-configs/config-${VERSION}${LOCALVERSION}-generic${CONFIG_SUFFIX}"
|
||||
cp -a .config $CWD/kernel-configs/config-${VERSION}${LOCALVERSION}-generic${CONFIG_SUFFIX}
|
||||
fi
|
||||
|
||||
# If CONFIG_PREEMPT=y and CONFIG_PREEMPT_DYNAMIC=y, then set a default preempt
|
||||
# mode (none, voluntary, or full):
|
||||
if grep -wq CONFIG_PREEMPT=y .config ; then
|
||||
if grep -wq CONFIG_PREEMPT_DYNAMIC=y .config ; then
|
||||
# Sanity check:
|
||||
if ! echo $CONFIG_PREEMPT_DEFAULT_MODE | grep -wq -e none -e voluntary -e full ; then
|
||||
echo "ERROR: Invalid mode for CONFIG_PREEMPT_DEFAULT_MODE: $CONFIG_PREEMPT_DEFAULT_MODE"
|
||||
exit 1
|
||||
fi
|
||||
echo "Setting default PREEMPT mode: $CONFIG_PREEMPT_DEFAULT_MODE"
|
||||
sed -i "s/^int preempt_dynamic_mode = preempt_dynamic_.*;$/int preempt_dynamic_mode = preempt_dynamic_$CONFIG_PREEMPT_DEFAULT_MODE;/g" kernel/sched/core.c
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Building kernel and modules (needed before clean for building NVIDIA to work)..."
|
||||
make ${NUMJOBS} || exit 1
|
||||
make ${NUMJOBS} modules || exit 1
|
||||
echo "Cleaning up..."
|
||||
make clean
|
||||
# Make sure header files aren't missing...
|
||||
make prepare
|
||||
# Don't package the kernel in the sources:
|
||||
find . -name "*Image" -exec rm "{}" \+
|
||||
# No need for these:
|
||||
rm -f .config.old .version
|
||||
find . -name "*.cmd" -exec rm -f "{}" \+
|
||||
rm .*.d
|
||||
# Still some dotfiles laying around... probably fine though
|
||||
) || exit 1
|
||||
|
||||
cd $PKG/usr/src/linux-${VERSION}
|
||||
# Use the version number found in the Makefile in the package name. This is not
|
||||
# always the same as the version in the source tarball's filename. For example,
|
||||
# linux-4.14.tar.xz will have 4.14.0 as the version in the Makefile:
|
||||
PACKAGE_VERSION=$(grep "^VERSION = " Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^PATCHLEVEL = " Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^SUBLEVEL = " Makefile | rev | cut -f 1 -d ' ' | rev)$(grep "^EXTRAVERSION = " Makefile | rev | cut -f 1 -d ' ' | rev)
|
||||
|
||||
mkdir $PKG/install
|
||||
cat $CWD/slack-desc/slack-desc.kernel-source > $PKG/install/slack-desc
|
||||
|
||||
# Make the package:
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $TMP/kernel-source-$(echo ${PACKAGE_VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-noarch-$BUILD.txz
|
|
@ -0,0 +1,53 @@
|
|||
From 2e479b3b82c49bfb9422274c0a9c155a41caecb7 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Kelley <mikelley@microsoft.com>
|
||||
Date: Wed, 16 Nov 2022 10:41:24 -0800
|
||||
Subject: [PATCH] x86/ioremap: Fix page aligned size calculation in
|
||||
__ioremap_caller()
|
||||
|
||||
commit 4dbd6a3e90e03130973688fd79e19425f720d999 upstream.
|
||||
|
||||
Current code re-calculates the size after aligning the starting and
|
||||
ending physical addresses on a page boundary. But the re-calculation
|
||||
also embeds the masking of high order bits that exceed the size of
|
||||
the physical address space (via PHYSICAL_PAGE_MASK). If the masking
|
||||
removes any high order bits, the size calculation results in a huge
|
||||
value that is likely to immediately fail.
|
||||
|
||||
Fix this by re-calculating the page-aligned size first. Then mask any
|
||||
high order bits using PHYSICAL_PAGE_MASK.
|
||||
|
||||
Fixes: ffa71f33a820 ("x86, ioremap: Fix incorrect physical address handling in PAE mode")
|
||||
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
|
||||
Signed-off-by: Borislav Petkov <bp@suse.de>
|
||||
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
|
||||
Cc: <stable@kernel.org>
|
||||
Link: https://lore.kernel.org/r/1668624097-14884-2-git-send-email-mikelley@microsoft.com
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
arch/x86/mm/ioremap.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
|
||||
index 1ad0228f8ceb..19058d746695 100644
|
||||
--- a/arch/x86/mm/ioremap.c
|
||||
+++ b/arch/x86/mm/ioremap.c
|
||||
@@ -216,9 +216,15 @@ __ioremap_caller(resource_size_t phys_addr, unsigned long size,
|
||||
* Mappings have to be page-aligned
|
||||
*/
|
||||
offset = phys_addr & ~PAGE_MASK;
|
||||
- phys_addr &= PHYSICAL_PAGE_MASK;
|
||||
+ phys_addr &= PAGE_MASK;
|
||||
size = PAGE_ALIGN(last_addr+1) - phys_addr;
|
||||
|
||||
+ /*
|
||||
+ * Mask out any bits not part of the actual physical
|
||||
+ * address, like memory encryption bits.
|
||||
+ */
|
||||
+ phys_addr &= PHYSICAL_PAGE_MASK;
|
||||
+
|
||||
retval = memtype_reserve(phys_addr, (u64)phys_addr + size,
|
||||
pcm, &new_pcm);
|
||||
if (retval) {
|
||||
--
|
||||
2.39.0
|
||||
|
5
testing/source/k/patches-revert-i686/README
Normal file
5
testing/source/k/patches-revert-i686/README
Normal file
|
@ -0,0 +1,5 @@
|
|||
We need to revert this patch which causes boot failure with 32-bit PAE on
|
||||
*some* machines, such as: LENOVO 20QV000GUS Intel i7-9850H
|
||||
|
||||
Non-PAE is not affected, but we'll let this get reverted there too since
|
||||
it's not part of the code path anyway.
|
19
testing/source/k/slack-desc/slack-desc.kernel-generic.i686
Normal file
19
testing/source/k/slack-desc/slack-desc.kernel-generic.i686
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
kernel-generic: kernel-generic (a general purpose Linux kernel)
|
||||
kernel-generic:
|
||||
kernel-generic: This is a Linux kernel with built-in support for SATA, NVMe, and most
|
||||
kernel-generic: commonly used filesystems. It is recommended to use an initrd with
|
||||
kernel-generic: this kernel for best results. For more information about creating an
|
||||
kernel-generic: initrd, see the README.initrd file in the /boot directory.
|
||||
kernel-generic:
|
||||
kernel-generic:
|
||||
kernel-generic:
|
||||
kernel-generic:
|
||||
kernel-generic:
|
19
testing/source/k/slack-desc/slack-desc.kernel-generic.x86_64
Normal file
19
testing/source/k/slack-desc/slack-desc.kernel-generic.x86_64
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
kernel-generic: kernel-generic (a general purpose Linux kernel)
|
||||
kernel-generic:
|
||||
kernel-generic: This is a Linux kernel with built-in support for SATA, NVMe, and most
|
||||
kernel-generic: commonly used filesystems. It is recommended to use an initrd with
|
||||
kernel-generic: this kernel for best results. For more information about creating an
|
||||
kernel-generic: initrd, see the README.initrd file in the /boot directory.
|
||||
kernel-generic:
|
||||
kernel-generic:
|
||||
kernel-generic:
|
||||
kernel-generic:
|
||||
kernel-generic:
|
19
testing/source/k/slack-desc/slack-desc.kernel-headers
Normal file
19
testing/source/k/slack-desc/slack-desc.kernel-headers
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
kernel-headers: kernel-headers (Linux kernel include files)
|
||||
kernel-headers:
|
||||
kernel-headers: These are the include files from the Linux kernel.
|
||||
kernel-headers:
|
||||
kernel-headers: You'll need these to compile most system software for Linux.
|
||||
kernel-headers:
|
||||
kernel-headers:
|
||||
kernel-headers:
|
||||
kernel-headers:
|
||||
kernel-headers:
|
||||
kernel-headers:
|
19
testing/source/k/slack-desc/slack-desc.kernel-huge.i686
Normal file
19
testing/source/k/slack-desc/slack-desc.kernel-huge.i686
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
kernel-huge: kernel-huge (generic kernel with built-in SCSI drivers)
|
||||
kernel-huge:
|
||||
kernel-huge: This is a Linux kernel with built-in support for most disk controllers
|
||||
kernel-huge: (including RAID and SCSI) and filesystems. It is recommended to use an
|
||||
kernel-huge: initrd with this kernel for best results. For more information about
|
||||
kernel-huge: creating an initrd, see the README.initrd file in the /boot directory.
|
||||
kernel-huge:
|
||||
kernel-huge:
|
||||
kernel-huge:
|
||||
kernel-huge:
|
||||
kernel-huge:
|
19
testing/source/k/slack-desc/slack-desc.kernel-huge.x86_64
Normal file
19
testing/source/k/slack-desc/slack-desc.kernel-huge.x86_64
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
kernel-huge: kernel-huge (generic kernel with built-in SCSI drivers)
|
||||
kernel-huge:
|
||||
kernel-huge: This is a Linux kernel with built-in support for most disk controllers
|
||||
kernel-huge: (including RAID and SCSI) and filesystems. It is recommended to use an
|
||||
kernel-huge: initrd with this kernel for best results. For more information about
|
||||
kernel-huge: creating an initrd, see the README.initrd file in the /boot directory.
|
||||
kernel-huge:
|
||||
kernel-huge:
|
||||
kernel-huge:
|
||||
kernel-huge:
|
||||
kernel-huge:
|
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
%PACKAGE_NAME%: %PACKAGE_NAME% (Linux kernel modules)
|
||||
%PACKAGE_NAME%:
|
||||
%PACKAGE_NAME%: Kernel modules are pieces of code that can be loaded and unloaded into
|
||||
%PACKAGE_NAME%: the kernel upon demand. They extend the functionality of the kernel
|
||||
%PACKAGE_NAME%: without the need to reboot the system. These modules provide support
|
||||
%PACKAGE_NAME%: for hardware such as USB devices, SCSI and RAID controllers, network
|
||||
%PACKAGE_NAME%: interfaces, and display devices, or add other additional capabilities
|
||||
%PACKAGE_NAME%: to the kernel.
|
||||
%PACKAGE_NAME%:
|
||||
%PACKAGE_NAME%:
|
||||
%PACKAGE_NAME%:
|
19
testing/source/k/slack-desc/slack-desc.kernel-source
Normal file
19
testing/source/k/slack-desc/slack-desc.kernel-source
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|' on
|
||||
# the right side marks the last column you can put a character in. You must make
|
||||
# exactly 11 lines for the formatting to be correct. It's also customary to
|
||||
# leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
kernel-source: kernel-source (Linux kernel source)
|
||||
kernel-source:
|
||||
kernel-source: Source code for Linus Torvalds' Linux kernel.
|
||||
kernel-source:
|
||||
kernel-source: This is the complete and unmodified source code for the Linux kernel.
|
||||
kernel-source:
|
||||
kernel-source:
|
||||
kernel-source:
|
||||
kernel-source:
|
||||
kernel-source:
|
||||
kernel-source:
|
19
testing/source/k/slack-desc/slack-desc.kernel-source.vanilla
Normal file
19
testing/source/k/slack-desc/slack-desc.kernel-source.vanilla
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|' on
|
||||
# the right side marks the last column you can put a character in. You must make
|
||||
# exactly 11 lines for the formatting to be correct. It's also customary to
|
||||
# leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
kernel-source: kernel-source (Linux kernel source)
|
||||
kernel-source:
|
||||
kernel-source: Source code for Linus Torvalds' Linux kernel.
|
||||
kernel-source:
|
||||
kernel-source: This is the complete and unmodified source code for the Linux kernel.
|
||||
kernel-source:
|
||||
kernel-source:
|
||||
kernel-source:
|
||||
kernel-source:
|
||||
kernel-source:
|
||||
kernel-source:
|
19
testing/source/k/slack-desc/slack-desc.kernel-template
Normal file
19
testing/source/k/slack-desc/slack-desc.kernel-template
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
%PACKAGE_NAME%: %PACKAGE_NAME% (a Linux kernel)
|
||||
%PACKAGE_NAME%:
|
||||
%PACKAGE_NAME%: This is a Linux kernel with built-in support for SATA, NVMe, and most
|
||||
%PACKAGE_NAME%: commonly used filesystems. It is recommended to use an initrd with
|
||||
%PACKAGE_NAME%: this kernel for best results. For more information about creating an
|
||||
%PACKAGE_NAME%: initrd, see the README.initrd file in the /boot directory.
|
||||
%PACKAGE_NAME%:
|
||||
%PACKAGE_NAME%:
|
||||
%PACKAGE_NAME%:
|
||||
%PACKAGE_NAME%:
|
||||
%PACKAGE_NAME%:
|
|
@ -0,0 +1,31 @@
|
|||
--- ./init.orig 2018-04-18 13:55:09.661574866 -0500
|
||||
+++ ./init 2019-12-15 12:09:45.337013433 -0600
|
||||
@@ -219,11 +219,15 @@
|
||||
fi
|
||||
|
||||
LUKSLIST_DEFERRED=""
|
||||
- LUKSLIST=$(echo $LUKSDEV | tr -s ':' ' ')
|
||||
+ for dev in $(echo $LUKSDEV | tr -s ':' ' ') ; do
|
||||
+ LUKSLIST="$LUKSLIST $(findfs $dev)"
|
||||
+ done
|
||||
+
|
||||
+ for dev in $(echo $LUKSTRIM | tr -s ':' ' ') ; do
|
||||
+ TRIMLIST="$TRIMLIST $(findfs $dev)"
|
||||
+ done
|
||||
+
|
||||
for LUKSDEV in $LUKSLIST ; do
|
||||
- if echo $LUKSDEV | grep -q "LABEL=" || echo $LUKSDEV | grep -q "UUID=" ; then
|
||||
- LUKSDEV=$(findfs $LUKSDEV)
|
||||
- fi
|
||||
if /sbin/cryptsetup isLuks ${LUKSDEV} 1>/dev/null 2>/dev/null ; then
|
||||
if echo $ROOTDEV | grep -q "LABEL=" || echo $ROOTDEV | grep -q "UUID=" ; then
|
||||
CRYPTDEV="luks$(basename $LUKSDEV)"
|
||||
@@ -232,7 +236,7 @@
|
||||
else
|
||||
CRYPTDEV="luks$(basename $LUKSDEV)"
|
||||
fi
|
||||
- if echo $LUKSTRIM | grep -wq $LUKSDEV 2>/dev/null ; then
|
||||
+ if echo "$TRIMLIST" | grep -wq "$LUKSDEV" 2>/dev/null ; then
|
||||
LUKSOPTS="--allow-discards"
|
||||
else
|
||||
LUKSOPTS=""
|
|
@ -0,0 +1,16 @@
|
|||
--- ./mkinitrd.orig 2021-04-27 13:53:00.500036921 -0500
|
||||
+++ ./mkinitrd 2021-07-16 13:04:05.246136283 -0500
|
||||
@@ -237,6 +237,13 @@
|
||||
# Then copy all remaining libs our initrd files link against:
|
||||
COUNT=1
|
||||
PRFX=$(mktemp --suffix -ldd)
|
||||
+
|
||||
+ # Make sure a temporary directory was actually created:
|
||||
+ if [ -z "${PRFX}" ]; then
|
||||
+ echo "ERROR: Could not create a temp directory"
|
||||
+ exit 1
|
||||
+ fi
|
||||
+
|
||||
TMPFILE=${PRFX}${COUNT}
|
||||
|
||||
find $SOURCE_TREE -type f -exec ldd {} 2>/dev/null \; | unify_libs > $TMPFILE
|
|
@ -0,0 +1,10 @@
|
|||
--- ./mkinitrd.orig 2021-10-12 13:50:48.059708275 -0500
|
||||
+++ ./mkinitrd 2021-10-12 13:51:36.482705596 -0500
|
||||
@@ -69,6 +69,7 @@
|
||||
check-mtp-device \
|
||||
check-ptp-camera \
|
||||
udev-configure-printer \
|
||||
+ rules.d/40-usb_modeswitch.rules \
|
||||
rules.d/60-openobex.rules \
|
||||
rules.d/73-seat-late.rules \
|
||||
rules.d/85-regulatory.rules \
|
|
@ -0,0 +1,23 @@
|
|||
--- ./mkinitrd_command_generator.sh.orig 2021-03-28 13:22:55.628927615 -0500
|
||||
+++ ./mkinitrd_command_generator.sh 2022-01-24 21:29:00.382517371 -0600
|
||||
@@ -302,12 +302,19 @@
|
||||
fi
|
||||
|
||||
# Finally, we should check if base device is
|
||||
- # a real block device or a RAID volume:
|
||||
+ # a real block device or a RAID volume:
|
||||
for MD in $(cat /proc/mdstat | grep -w active | cut -d' ' -f1) ; do
|
||||
if [ "$BASEDEV" = "/dev/$MD" ]; then
|
||||
USING_RAID=1
|
||||
break
|
||||
fi
|
||||
+ done
|
||||
+ # Additional check in case $BASEDEV is a partition of /dev/$MD:
|
||||
+ for BLK in $(sfdisk -ld /dev/$MD 2> /dev/null | grep "^/dev" | cut -d " " -f 1); do
|
||||
+ if [ "$BASEDEV" = "$BLK" ]; then
|
||||
+ USING_RAID=1
|
||||
+ break
|
||||
+ fi
|
||||
done
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- ./mkinitrd.orig 2021-04-27 13:53:00.500036921 -0500
|
||||
+++ ./mkinitrd 2022-01-26 14:31:33.134016601 -0600
|
||||
@@ -755,7 +755,7 @@
|
||||
fi
|
||||
|
||||
if ! grep -Eq " $(basename $SRCMOD .ko)(\.| |$)" $SOURCE_TREE/load_kernel_modules 2>/dev/null ; then
|
||||
- LINE="$(echo "modprobe -v $(basename ${SRCMOD%%.gz} .ko)" )"
|
||||
+ LINE="$(echo "modprobe -v $(basename ${SRCMOD%%.ko*})" )"
|
||||
|
||||
# Test to see if arguments should be passed
|
||||
# Over-ride the previously defined LINE variable if so
|
|
@ -0,0 +1,12 @@
|
|||
--- ./mkinitrd.orig 2022-01-26 14:33:29.000000000 -0600
|
||||
+++ ./mkinitrd 2022-04-26 13:55:17.511004239 -0500
|
||||
@@ -778,6 +778,9 @@
|
||||
echo "$LINE" >> $SOURCE_TREE/load_kernel_modules
|
||||
fi
|
||||
|
||||
+ # Ensure that the destination directory for the module exists:
|
||||
+ mkdir -p "$(dirname $SOURCE_TREE/$SRCMOD)"
|
||||
+
|
||||
# Try to add the module to the initrd-tree. This should be done
|
||||
# even if it exists there already as we may have changed compilers
|
||||
# or otherwise caused the modules in the initrd-tree to need
|
14
testing/source/mkinitrd/0007-kmod30.patch
Normal file
14
testing/source/mkinitrd/0007-kmod30.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- ./mkinitrd.orig 2022-07-09 12:56:10.493030210 -0500
|
||||
+++ ./mkinitrd 2022-07-09 12:57:38.848032187 -0500
|
||||
@@ -702,9 +702,9 @@
|
||||
cp -a /sbin/$i $SOURCE_TREE/sbin ;
|
||||
done
|
||||
|
||||
-# Make sure modules.builtin and modules.order are there (for kmod):
|
||||
+# Make sure modules.builtin, modules.builtin.modinfo, and modules.order are there (for kmod):
|
||||
for kver in $(echo ${KERNEL_VERSION} | tr ':' '\n') ; do
|
||||
- cp /lib/modules/$kver/modules.{builtin,order} \
|
||||
+ cp /lib/modules/$kver/modules.{builtin,builtin.modinfo,order} \
|
||||
$SOURCE_TREE/lib/modules/$kver
|
||||
done
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
--- ./mkinitrd_command_generator.sh.orig 2023-02-28 15:19:08.085991698 -0600
|
||||
+++ ./mkinitrd_command_generator.sh 2023-02-28 15:22:03.264982008 -0600
|
||||
@@ -308,11 +308,15 @@
|
||||
USING_RAID=1
|
||||
break
|
||||
fi
|
||||
- done
|
||||
- # Additional check in case $BASEDEV is a partition of /dev/$MD:
|
||||
- for BLK in $(sfdisk -ld /dev/$MD 2> /dev/null | grep "^/dev" | cut -d " " -f 1); do
|
||||
- if [ "$BASEDEV" = "$BLK" ]; then
|
||||
- USING_RAID=1
|
||||
+ # Additional check in case $BASEDEV is a partition of /dev/$MD:
|
||||
+ for BLK in $(sfdisk -ld /dev/$MD 2> /dev/null | grep "^/dev" | cut -d " " -f 1); do
|
||||
+ if [ "$BASEDEV" = "$BLK" ]; then
|
||||
+ USING_RAID=1
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
+ # Break out of outer loop if needed.
|
||||
+ if [ "$USING_RAID" = "1" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
10
testing/source/mkinitrd/0009-exclude-99-nfs.rules.patch
Normal file
10
testing/source/mkinitrd/0009-exclude-99-nfs.rules.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- ./mkinitrd.orig 2023-08-09 16:25:06.849157479 -0500
|
||||
+++ ./mkinitrd 2023-08-09 16:26:00.890154489 -0500
|
||||
@@ -76,6 +76,7 @@
|
||||
rules.d/60-openobex.rules \
|
||||
rules.d/73-seat-late.rules \
|
||||
rules.d/85-regulatory.rules \
|
||||
+ rules.d/99-nfs.rules \
|
||||
"
|
||||
|
||||
print_usage() {
|
|
@ -0,0 +1,26 @@
|
|||
--- ./mkinitrd.orig 2023-11-20 12:49:33.502016341 -0600
|
||||
+++ ./mkinitrd 2023-11-20 12:50:30.142017608 -0600
|
||||
@@ -60,6 +60,8 @@
|
||||
# Modified by Piter Punk <piterpunk@slackware.com> 25 April 2022
|
||||
# Add support to specify additional filesystems to be mounted by
|
||||
# initrd. Useful for those that have a separated '/usr'
|
||||
+# Modified by Patrick Volkerding <volkerdi@slackware.com> 20 Movember 2023
|
||||
+# Add jfs/xfs repair tools if used for $ROOTFS
|
||||
|
||||
MKINITRD_VERSION=1.4.11
|
||||
|
||||
@@ -773,10 +775,11 @@
|
||||
/sbin/modprobe --set-version $kver --show-depends --ignore-install $MODULE 2>/dev/null \
|
||||
| grep "^insmod " | cut -f 2 -d ' ' | while read SRCMOD; do
|
||||
|
||||
- # If jfs or xfs filesystems are in use, add the repair tools to the initrd:
|
||||
- if [ "$(basename $SRCMOD .ko)" = "jfs" ]; then
|
||||
+ # If the root filesystem is jfs, add the repair tools to the initrd:
|
||||
+ if [ "$ROOTFS" = "jfs" ]; then
|
||||
cp -a /sbin/jfs_fsck $SOURCE_TREE/sbin/
|
||||
- elif [ "$(basename $SRCMOD .ko)" = "xfs" ]; then
|
||||
+ # If the root filesystem is xfs, add the repair tools to the initrd:
|
||||
+ elif [ "$ROOTFS" = "xfs" ]; then
|
||||
cp -a /sbin/xfs_repair $SOURCE_TREE/sbin/
|
||||
fi
|
||||
|
112
testing/source/mkinitrd/README.initrd
Normal file
112
testing/source/mkinitrd/README.initrd
Normal file
|
@ -0,0 +1,112 @@
|
|||
|
||||
Slackware initrd mini HOWTO
|
||||
by Patrick Volkerding, volkerdi@slackware.com
|
||||
@DATE@
|
||||
|
||||
This document describes how to create and install an initrd, which may be
|
||||
required to use some features of the kernel. Also see "man mkinitrd".
|
||||
|
||||
1. What is an initrd?
|
||||
2. Why do I need an initrd?
|
||||
3. How do I build the initrd?
|
||||
4. Now that I've built an initrd, how do I use it?
|
||||
|
||||
|
||||
1. What is an initrd?
|
||||
|
||||
Initrd stands for "initial ramdisk". An initial ramdisk is a very small
|
||||
Linux filesystem that is loaded into RAM and mounted as the kernel boots,
|
||||
and before the main root filesystem is mounted.
|
||||
|
||||
2. Why do I need an initrd?
|
||||
|
||||
The usual reason to use an initrd is because you need to load kernel
|
||||
modules before mounting the root partition. Usually these modules are
|
||||
required to support the filesystem used by the root partition (ext3,
|
||||
reiserfs, xfs), or perhaps the controller that the hard drive is attached
|
||||
to (SCSI, RAID, etc). Essentially, there are so many different options
|
||||
available in modern Linux kernels that it isn't practical to try to ship
|
||||
many different kernels to try to cover everyone's needs. It's a lot more
|
||||
flexible to ship a generic kernel and a set of kernel modules for it.
|
||||
|
||||
3. How do I build the initrd?
|
||||
|
||||
The easiest way to make the initrd is to use the mkinitrd script included
|
||||
in Slackware's mkinitrd package. We'll walk through the process of
|
||||
upgrading to the generic @KERNEL_VERSION@ Linux kernel using the packages
|
||||
found in Slackware's slackware/a/ directory.
|
||||
|
||||
First, make sure the kernel, kernel modules, and mkinitrd package are
|
||||
installed (the current version numbers might be a little different, so
|
||||
this is just an example):
|
||||
|
||||
installpkg kernel-generic-@KERNEL_VERSION@-@ARCH@-@BUILD@.tgz
|
||||
installpkg kernel-modules-@KERNEL_VERSION@-@ARCH@-@BUILD@.tgz
|
||||
installpkg mkinitrd-@MKINITRD_VERSION@-@ARCH@-@BUILD@.tgz
|
||||
|
||||
Change into the /boot directory:
|
||||
|
||||
cd /boot
|
||||
|
||||
Now you'll want to run "mkinitrd". I'm using ext4 for my root
|
||||
filesystem, and since mkinitrd should figure out any other modules
|
||||
it requires, I shouldn't need to specify any others:
|
||||
|
||||
mkinitrd -c -k @KERNEL_VERSION@ -m ext4
|
||||
|
||||
This should do two things. First, it will create a directory
|
||||
/boot/initrd-tree containing the initrd's filesystem. Then it will
|
||||
create an initrd (/boot/initrd.gz) from this tree. If you wanted to,
|
||||
you could make some additional changes in /boot/initrd-tree/ and
|
||||
then run mkinitrd again without options to rebuild the image. That's
|
||||
optional, though, and only advanced users will need to think about that.
|
||||
|
||||
Here's another example: Build an initrd image using Linux @KERNEL_VERSION@
|
||||
kernel modules for a system with an ext3 root partition on /dev/sdb3:
|
||||
|
||||
mkinitrd -c -k @KERNEL_VERSION@ -m ext3 -f ext3 -r /dev/sdb3
|
||||
|
||||
|
||||
4. Now that I've built an initrd, how do I use it?
|
||||
|
||||
Now that you've got an initrd (/boot/initrd.gz), you'll want to load
|
||||
it along with the kernel at boot time. If you use LILO for your boot
|
||||
loader you'll need to edit /etc/lilo.conf and add a line to load the
|
||||
initrd. Here's an example section of lilo.conf showing how this is
|
||||
done:
|
||||
|
||||
# Linux bootable partition config begins
|
||||
image = /boot/vmlinuz-@KERNEL_VERSION@-generic
|
||||
initrd = /boot/initrd.gz
|
||||
root = /dev/sda6
|
||||
label = @LILO_KERNEL_NAME@
|
||||
read-only
|
||||
# Linux bootable partition config ends
|
||||
|
||||
The initrd is loaded by the "initrd = /boot/initrd.gz" line.
|
||||
Just add the line right below the line for the kernel image you use.
|
||||
Save the file, and then run LILO again ('lilo' at the command line).
|
||||
You'll need to run lilo every time you edit lilo.conf or rebuild the
|
||||
initrd.
|
||||
|
||||
Other bootloaders such as syslinux also support the use of an initrd.
|
||||
See the documentation for those programs for details on using an
|
||||
initrd with them.
|
||||
|
||||
Some, such as GRUB, require the initrd to be named similarly to the
|
||||
kernel. So, for this kernel:
|
||||
|
||||
/boot/vmlinuz-@KERNEL_VERSION@-generic
|
||||
|
||||
You would want to rename your initrd to this:
|
||||
|
||||
/boot/initrd-@KERNEL_VERSION@-generic.img
|
||||
|
||||
In fact, if you use the geninitrd script to make your initrd (which it
|
||||
will pretty much do automatically for the generic kernel) it will name
|
||||
it this way, and will make a compatibilty symlink initrd.gz.
|
||||
|
||||
|
||||
---------
|
||||
|
||||
Have fun!
|
1198
testing/source/mkinitrd/busybox-dot-config
Normal file
1198
testing/source/mkinitrd/busybox-dot-config
Normal file
File diff suppressed because it is too large
Load diff
13
testing/source/mkinitrd/doinst.sh
Normal file
13
testing/source/mkinitrd/doinst.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
config() {
|
||||
NEW="$1"
|
||||
OLD="`dirname $NEW`/`basename $NEW .new`"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
}
|
||||
|
||||
config etc/default/geninitrd.new
|
33
testing/source/mkinitrd/geninitrd
Normal file
33
testing/source/mkinitrd/geninitrd
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2019 Patrick J. Volkerding, Sebeka, Minnesota, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# This is a simple script to regenerate the initial ramdisk when a new
|
||||
# kernel is installed. It will generate /boot/initrd.gz which will be
|
||||
# suitable for *most* uses for whatever kernel is linked to the
|
||||
# /boot/vmlinuz-generic (or /boot/vmlinuz-generic-smp) symlink. The
|
||||
# linked kernel must be named properly with the kernel version in the
|
||||
# filename (the same naming scheme as the kernels shipped in Slackware).
|
||||
#
|
||||
# If you use an encrypted root, you'll need to make your initrd manually.
|
||||
|
||||
cd $(dirname $0)/../..
|
||||
chroot . /var/lib/pkgtools/setup/setup.01.mkinitrd
|
17
testing/source/mkinitrd/geninitrd.default
Normal file
17
testing/source/mkinitrd/geninitrd.default
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Default options for generating the initrd:
|
||||
|
||||
# This variable defines the kernel that the initrd should be made for.
|
||||
# Usually this will be a symlink that points to the actual kernel file.
|
||||
# It is usually named "/boot/vmlinuz-generic" but if you're building your
|
||||
# own kernels you might have a custom link such as "/boot/vmlinuz-custom".
|
||||
KERNEL_SYMLINK=/boot/vmlinuz-generic
|
||||
|
||||
# In addition to the initrd with a name like initrd-6.9.9-generic.img,
|
||||
# should we make a compatibility symlink such as initrd-generic.img?
|
||||
# GRUB doesn't require this, but lilo and elilo might.
|
||||
GENINITRD_NAMED_SYMLINK=true
|
||||
|
||||
# In addition to the initrd with a name like initrd-6.9.9-generic.img,
|
||||
# should we make a compatibility symlink named initrd.gz?
|
||||
# GRUB doesn't require this, but lilo and elilo might.
|
||||
GENINITRD_INITRD_GZ_SYMLINK=true
|
367
testing/source/mkinitrd/init
Normal file
367
testing/source/mkinitrd/init
Normal file
|
@ -0,0 +1,367 @@
|
|||
#!/bin/ash
|
||||
#
|
||||
# /init: init script to load kernel modules from an initramfs
|
||||
# This requires that your kernel supports initramfs!!!
|
||||
#
|
||||
# Copyright 2004 Slackware Linux, Inc., Concord, CA, USA
|
||||
# Copyright 2007, 2008, 2009, 2010, 2012 Patrick J. Volkerding, Sebeka, MN, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
##################################################################################
|
||||
# With a generic kernel, you need to load the modules needed to mount the
|
||||
# root partition. This might mean a SCSI, RAID, or other drive controller
|
||||
# module, as well as the module to support the root filesystem. Once the
|
||||
# root partition is mounted all the other modules will be available so you
|
||||
# don't need to load them here.
|
||||
#
|
||||
# Config files used by this script:
|
||||
#
|
||||
# /rootdev Contains the name of the root device, such as: /dev/hda1
|
||||
#
|
||||
# /rootfs Contains the root filesystem type, such as: xfs
|
||||
#
|
||||
# /initrd-name Contains the name of the initrd file.
|
||||
#
|
||||
# /resumedev Contains the name of the device to resume from hibernation.
|
||||
#
|
||||
# /luksdev Contains colon separated list of luks encrypted devices to
|
||||
# be unlocked.
|
||||
#
|
||||
# /lukstrim Contains colon separated list of luks encrypted devices to
|
||||
# pass '--allow-discards' when unlocking
|
||||
#
|
||||
# /lukskey Contains the path to a LUKS key-file for automatic unlock
|
||||
# Format: LABEL=<partition_label>:/path/to/file
|
||||
# UUID=<partition_uuid>:/path/to/file
|
||||
#
|
||||
# /wait-for-root Contains a number - the init script will wait this amount
|
||||
# of seconds before creating device nodes.
|
||||
#
|
||||
# /keymap Contains the name for a custom keyboard map
|
||||
#
|
||||
# Optional:
|
||||
#
|
||||
# /load_kernel_modules
|
||||
# A script that uses modprobe to load the desired modules.
|
||||
#
|
||||
# There's an example in here. To actually use it, you'll
|
||||
# need to make it executable:
|
||||
#
|
||||
# chmod 755 load_kernel_modules
|
||||
##################################################################################
|
||||
# Changelog
|
||||
# 10-Dec-2012 <mozes@slackware.com>
|
||||
# * Added support for the official Kernel parameters to select root filesystem
|
||||
# type ('rootfstype') and pause before attempting to mount the root filesystem
|
||||
# ('rootdelay'). The original parameters may continue to be used.
|
||||
##################################################################################
|
||||
|
||||
INITRD=$(cat /initrd-name)
|
||||
ROOTDEV=$(cat /rootdev)
|
||||
ROOTFS=$(cat /rootfs)
|
||||
LUKSDEV=$(cat /luksdev)
|
||||
LUKSTRIM=$(cat /lukstrim 2>/dev/null)
|
||||
LUKSKEY=$(cat /lukskey)
|
||||
RESUMEDEV=$(cat /resumedev)
|
||||
WAIT=$(cat /wait-for-root)
|
||||
KEYMAP=$(cat /keymap)
|
||||
INIT=/sbin/init
|
||||
|
||||
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
|
||||
|
||||
# Mount /proc and /sys:
|
||||
mount -n proc /proc -t proc
|
||||
mount -n sysfs /sys -t sysfs
|
||||
mount -n tmpfs /run -t tmpfs -o mode=0755,size=32M,nodev,nosuid,noexec
|
||||
|
||||
if grep devtmpfs /proc/filesystems 1>/dev/null 2>/dev/null ; then
|
||||
DEVTMPFS=1
|
||||
mount -n devtmpfs /dev -t devtmpfs -o size=8M
|
||||
fi
|
||||
|
||||
# Parse command line
|
||||
for ARG in $(cat /proc/cmdline); do
|
||||
case $ARG in
|
||||
0|1|2|3|4|5|6|S|s|single)
|
||||
RUNLEVEL=$ARG
|
||||
;;
|
||||
init=*)
|
||||
INIT=$(echo $ARG | cut -f2 -d=)
|
||||
;;
|
||||
luksdev=/dev/*)
|
||||
LUKSDEV=$(echo $ARG | cut -f2 -d=)
|
||||
;;
|
||||
lukskey=*)
|
||||
LUKSKEY=$(echo $ARG | cut -f2- -d=)
|
||||
;;
|
||||
rescue)
|
||||
RESCUE=1
|
||||
;;
|
||||
resume=*)
|
||||
RESUMEDEV=$(echo $ARG | cut -f2- -d=)
|
||||
;;
|
||||
root=/dev/*)
|
||||
ROOTDEV=$(echo $ARG | cut -f2 -d=)
|
||||
;;
|
||||
root=LABEL=*)
|
||||
ROOTDEV=$(echo $ARG | cut -f2- -d=)
|
||||
;;
|
||||
root=UUID=*)
|
||||
ROOTDEV=$(echo $ARG | cut -f2- -d=)
|
||||
;;
|
||||
rootfs=*|rootfstype=*)
|
||||
ROOTFS=$(echo $ARG | cut -f2 -d=)
|
||||
;;
|
||||
rootflags=*)
|
||||
ROOTFLAGS=$(echo $ARG | cut -f2- -d=)
|
||||
;;
|
||||
waitforroot=*|rootdelay=*)
|
||||
WAIT=$(echo $ARG | cut -f2 -d=)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# If udevd is available, use it to generate block devices
|
||||
# else use mdev to read sysfs and generate the needed devices
|
||||
if [ -x /sbin/udevd -a -x /sbin/udevadm ]; then
|
||||
/sbin/udevd --daemon --resolve-names=never
|
||||
/sbin/udevadm trigger --subsystem-match=block --action=add
|
||||
/sbin/udevadm settle --timeout=10
|
||||
else
|
||||
[ "$DEVTMPFS" != "1" ] && mdev -s
|
||||
fi
|
||||
|
||||
# Load kernel modules (ideally this was already done by udev):
|
||||
if [ ! -d /lib/modules/$(uname -r) ]; then
|
||||
echo "No kernel modules found for Linux $(uname -r)."
|
||||
elif [ -x ./load_kernel_modules ]; then # use load_kernel_modules script:
|
||||
echo "${INITRD}: Loading kernel modules from initrd image:"
|
||||
. ./load_kernel_modules
|
||||
else # load modules (if any) in order:
|
||||
if ls /lib/modules/$(uname -r)/*.*o 1> /dev/null 2> /dev/null ; then
|
||||
echo "${INITRD}: Loading kernel modules from initrd image:"
|
||||
for module in /lib/modules/$(uname -r)/*.*o ; do
|
||||
/sbin/modprobe $module
|
||||
done
|
||||
unset module
|
||||
fi
|
||||
fi
|
||||
|
||||
# Sometimes the devices need extra time to be available.
|
||||
# A root filesystem on USB is a good example of that.
|
||||
sleep $WAIT
|
||||
|
||||
# Load a custom keyboard mapping:
|
||||
if [ -n "$KEYMAP" ]; then
|
||||
echo "${INITRD}: Loading '$KEYMAP' keyboard mapping:"
|
||||
tar xzOf /etc/keymaps.tar.gz ${KEYMAP}.bmap | loadkmap
|
||||
fi
|
||||
|
||||
if [ "$RESCUE" = "" ]; then
|
||||
# Initialize RAID:
|
||||
if [ -x /sbin/mdadm ]; then
|
||||
# If /etc/mdadm.conf is present, udev should DTRT on its own;
|
||||
# If not, we'll make one and go from there:
|
||||
if [ ! -r /etc/mdadm.conf ]; then
|
||||
/sbin/mdadm -E -s >/etc/mdadm.conf
|
||||
/sbin/mdadm -S -s
|
||||
/sbin/mdadm -A -s
|
||||
# This seems to make the kernel see partitions more reliably:
|
||||
fdisk -l /dev/md* 1> /dev/null 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
# Unlock any encrypted partitions necessary to access the
|
||||
# root filesystem, such as encrypted LVM Physical volumes, disk
|
||||
# partitions or mdadm arrays.
|
||||
# Unavailable devices such as LVM Logical Volumes will need to be
|
||||
# deferred until they become available after the vgscan.
|
||||
|
||||
if [ -x /sbin/cryptsetup ]; then
|
||||
|
||||
# Determine if we have to use a LUKS keyfile:
|
||||
if [ ! -z "$LUKSKEY" ]; then
|
||||
mkdir /mountkey
|
||||
KEYPART=$(echo $LUKSKEY |cut -f1 -d:)
|
||||
KEYNAME=$(echo $KEYPART |cut -f2 -d=)
|
||||
LUKSPATH="/mountkey$(echo $LUKSKEY |cut -f2 -d:)"
|
||||
# Catch possible mount failure:
|
||||
if blkid |grep "TYPE=\"vfat\"" |grep $KEYNAME 1>/dev/null 2>&1 ; then
|
||||
MOUNTOPTS="-t vfat -o shortname=mixed"
|
||||
else
|
||||
MOUNTOPTS="-t auto"
|
||||
fi
|
||||
mount $MOUNTOPTS $(findfs $KEYPART) /mountkey 2>/dev/null
|
||||
# Check if we can actually use this file:
|
||||
if [ ! -f $LUKSPATH ]; then
|
||||
LUKSKEY=""
|
||||
else
|
||||
echo ">>> Using LUKS key file: '$LUKSKEY'"
|
||||
LUKSKEY="-d $LUKSPATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
LUKSLIST_DEFERRED=""
|
||||
LUKSLIST=$(echo $LUKSDEV | tr -s ':' ' ')
|
||||
for LUKSDEV in $LUKSLIST ; do
|
||||
if echo $LUKSDEV | grep -q "LABEL=" || echo $LUKSDEV | grep -q "UUID=" ; then
|
||||
LUKSDEV=$(findfs $LUKSDEV)
|
||||
fi
|
||||
if /sbin/cryptsetup isLuks ${LUKSDEV} 1>/dev/null 2>/dev/null ; then
|
||||
if echo $ROOTDEV | grep -q "LABEL=" || echo $ROOTDEV | grep -q "UUID=" ; then
|
||||
CRYPTDEV="luks$(basename $LUKSDEV)"
|
||||
elif [ "x$ROOTDEV" = "x$(basename $ROOTDEV)" ]; then
|
||||
CRYPTDEV="$ROOTDEV"
|
||||
else
|
||||
CRYPTDEV="luks$(basename $LUKSDEV)"
|
||||
fi
|
||||
if echo $LUKSTRIM | grep -wq $LUKSDEV 2>/dev/null ; then
|
||||
LUKSOPTS="--allow-discards"
|
||||
else
|
||||
LUKSOPTS=""
|
||||
fi
|
||||
if [ -z "${LUKSOPTS}" ]; then
|
||||
echo "Unlocking LUKS encrypted device '${LUKSDEV}' as luks mapped device '$CRYPTDEV':"
|
||||
else
|
||||
echo "Unlocking LUKS encrypted device '${LUKSDEV}' as luks mapped device '$CRYPTDEV' with '$LUKSOPTS':"
|
||||
fi
|
||||
/sbin/cryptsetup ${LUKSOPTS} ${LUKSKEY} luksOpen ${LUKSDEV} ${CRYPTDEV} </dev/tty0 >/dev/tty0 2>&1
|
||||
if [ "$ROOTDEV" = "$LUKSDEV" -o "$ROOTDEV" = "$CRYPTDEV" ] ; then
|
||||
ROOTDEV="/dev/mapper/$CRYPTDEV"
|
||||
fi
|
||||
else
|
||||
LUKSLIST_DEFERRED="${LUKSLIST_DEFERRED} ${LUKSDEV}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Initialize LVM:
|
||||
if [ -x /sbin/vgchange ]; then
|
||||
mkdir -p /var/lock/lvm # this avoids useless warnings
|
||||
/sbin/vgchange -ay --ignorelockingfailure 2>/dev/null
|
||||
/sbin/udevadm settle --timeout=10
|
||||
fi
|
||||
|
||||
# Unlock any LUKS encrypted devices that were deferred above but have now
|
||||
# become available due to the vgscan (i.e. filesystems on LVM Logical Volumes)
|
||||
|
||||
if [ -x /sbin/cryptsetup -a -n "${LUKSLIST_DEFERRED}" ]; then
|
||||
for LUKSDEV in ${LUKSLIST_DEFERRED} ; do
|
||||
if /sbin/cryptsetup isLuks ${LUKSDEV} 1>/dev/null 2>/dev/null ; then
|
||||
if echo $ROOTDEV | grep -q "LABEL=" || echo $ROOTDEV | grep -q "UUID=" ; then
|
||||
CRYPTDEV="luks$(basename $LUKSDEV)"
|
||||
elif [ "x$ROOTDEV" = "x$(basename $ROOTDEV)" ]; then
|
||||
CRYPTDEV="$ROOTDEV"
|
||||
else
|
||||
CRYPTDEV="luks$(basename $LUKSDEV)"
|
||||
fi
|
||||
echo "Unlocking LUKS encrypted device '${LUKSDEV}' as luks mapped device '$CRYPTDEV':"
|
||||
/sbin/cryptsetup ${LUKSKEY} luksOpen ${LUKSDEV} ${CRYPTDEV} </dev/tty0 >/dev/tty0 2>&1
|
||||
if [ "$ROOTDEV" = "$LUKSDEV" -o "$ROOTDEV" = "$CRYPTDEV" ] ; then
|
||||
ROOTDEV="/dev/mapper/$CRYPTDEV"
|
||||
fi
|
||||
else
|
||||
echo "LUKS device '${LUKSDEV}' unavailable for unlocking!"
|
||||
fi
|
||||
done
|
||||
/sbin/udevadm settle --timeout=10
|
||||
fi
|
||||
|
||||
# Scan for btrfs multi-device filesystems:
|
||||
if [ -x /sbin/btrfs ]; then
|
||||
/sbin/btrfs device scan
|
||||
fi
|
||||
|
||||
# Find root device if a label or UUID was given:
|
||||
if echo $ROOTDEV | grep -q "LABEL=" || \
|
||||
echo $ROOTDEV | grep -q "UUID=" ; then
|
||||
ROOTDEV=$(findfs $ROOTDEV)
|
||||
fi
|
||||
|
||||
# Clean up after LUKS unlock using a keyfile:
|
||||
if grep -q mountkey /proc/mounts 2>/dev/null ; then
|
||||
umount -l /mountkey
|
||||
rmdir /mountkey 2>/dev/null
|
||||
fi
|
||||
|
||||
# Resume state from swap
|
||||
if [ "$RESUMEDEV" != "" ]; then
|
||||
# Find resume device if a label or UUID was given:
|
||||
if echo $RESUMEDEV | grep -q "LABEL=" || \
|
||||
echo $RESUMEDEV | grep -q "UUID=" ; then
|
||||
RESUMEDEV=$(findfs $RESUMEDEV)
|
||||
elif ls -l $RESUMEDEV | grep -q "^l" ; then
|
||||
RESUMEDEV=$(readlink -f $RESUMEDEV)
|
||||
fi
|
||||
echo "Trying to resume from $RESUMEDEV"
|
||||
RESMAJMIN=$(ls -l $RESUMEDEV | tr , : | awk '{ print $5$6 }')
|
||||
echo $RESMAJMIN > /sys/power/resume
|
||||
fi
|
||||
|
||||
# Switch to real root partition:
|
||||
/sbin/udevadm settle --timeout=10
|
||||
echo 0x0100 > /proc/sys/kernel/real-root-dev
|
||||
mount -o ro${ROOTFLAGS:+,$ROOTFLAGS} -t $ROOTFS $ROOTDEV /mnt
|
||||
|
||||
if [ ! -r /mnt/sbin/init ]; then
|
||||
echo "ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead."
|
||||
echo " You can try to fix it. Type 'exit' when things are done."
|
||||
echo
|
||||
/bin/sh
|
||||
fi
|
||||
else
|
||||
echo
|
||||
echo "RESCUE mode"
|
||||
echo
|
||||
echo " You can try to fix or rescue your system now. If you want"
|
||||
echo " to boot into your fixed system, mount your root filesystem"
|
||||
echo " read-only under /mnt:"
|
||||
echo
|
||||
echo " # mount -o ro -t filesystem root_device /mnt"
|
||||
echo
|
||||
echo " Type 'exit' when things are done."
|
||||
echo
|
||||
/bin/sh
|
||||
fi
|
||||
|
||||
# Mount additional filesystems
|
||||
if [ -f /addfstab ]; then
|
||||
while read DEV MNTPNT FS OPTS DUMP PASSNO ; do
|
||||
if echo $DEV | grep -qE '(LABEL|UUID)=' ; then
|
||||
DEV=$(findfs $DEV)
|
||||
fi
|
||||
echo $DEV "/mnt/"$MNTPNT $FS "ro,"$OPTS $DUMP $PASSNO >> /etc/fstab
|
||||
done < /addfstab
|
||||
mount -a
|
||||
fi
|
||||
|
||||
# Need to make sure OPTIONS+="db_persist" exists for all dm devices
|
||||
# That should be handled in /sbin/mkinitrd now
|
||||
/sbin/udevadm info --cleanup-db
|
||||
/sbin/udevadm control --exit
|
||||
|
||||
unset ERR
|
||||
mount -o move /proc /mnt/proc
|
||||
mount -o move /sys /mnt/sys
|
||||
mount -o move /run /mnt/run
|
||||
|
||||
[ "$DEVTMPFS" = "1" ] && mount -o move /dev /mnt/dev
|
||||
echo "${INITRD}: exiting"
|
||||
exec switch_root /mnt $INIT $RUNLEVEL
|
834
testing/source/mkinitrd/mkinitrd
Normal file
834
testing/source/mkinitrd/mkinitrd
Normal file
|
@ -0,0 +1,834 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2004 Slackware Linux, Inc., Concord, CA, USA
|
||||
# Copyright 2004 Patrick J. Volkerding, Concord, CA, USA
|
||||
# Copyright 2007, 2008, 2009, 2010, 2011, 2015, 2016, 2017 Patrick J. Volkerding, Sebeka, MN, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Modified by Robby Workman <rworkman@slackware.com> 26 November 2007
|
||||
# to add support for mkinitrd.conf - No additional license terms added
|
||||
# Modified by Alan Hicks <alan@slackware.com> 27 November 2007 to enable
|
||||
# passing arguments to kernel modules - No additional license terms added
|
||||
# volkerdi - feel free to remove these :)
|
||||
# Modified by Eric Hameleers <alien@slackware.com> 3 April 2008
|
||||
# to add support custom keymaps - No additional license terms added
|
||||
# Modified by Patrick Volkerding <volkerdi@slackware.com> 17 Dec 2008
|
||||
# Added support to bail out if kernel modules are requested for a kernel
|
||||
# version that is not installed (thanks to Eric Hameleers), be more
|
||||
# verbose about showing modules added to the initrd (thanks to
|
||||
# Ellington Santos), and if "mount" returns /dev/root as the root device,
|
||||
# use readlink to resolve the device pointed to by the /dev/root
|
||||
# symlink, changed modprobe to use --ignore-install to avoid catching
|
||||
# custom "install" lines and causing /sbin/modprobe to be copied to the
|
||||
# initrd (thanks to Ken Milmore).
|
||||
# Of course, license terms remain unchanged.
|
||||
# Modified by Eric Hameleers <alien@slackware.com> 3 March 2010
|
||||
# Add lukskey option (-K). Automatically add kernel modules listed in
|
||||
# load-kernel-modules if that file is executable.
|
||||
# Yada yada yada.
|
||||
# Modified by Patrick Volkerding <volkerdi@slackware.com> 21 August 2012
|
||||
# Add Btrfs multi-device filesystem support option (-B).
|
||||
# Modified by Robby Workman <rworkman@slackware.com> 08 March 2017
|
||||
# to add support for TRIM on LUKS root devs
|
||||
# Modified by Patrick Volkerding <volkerdi@slackware.com> 29 June 2017
|
||||
# Add support for prepending a microcode update archive (-P).
|
||||
# Modified by Patrick Volkerding <volkerdi@slackware.com> 12 July 2017
|
||||
# Add support for including Slackware and kernel versions in the
|
||||
# output filename. Thanks to SeB.
|
||||
# Modified by Patrick Volkerding <volkerdi@slackware.com> 04 Feb 2019
|
||||
# Allow specifying more than one kernel version.
|
||||
# Modified by Robby Workman <rworkman@slackware.com> 05 September 2019
|
||||
# to add libargon2 and libgcc_s for cryptsetup LUKS2 support; add
|
||||
# jfs and xfs repair tools to initrd if those filesystems are used;
|
||||
# fixes and enhancements to docs
|
||||
# Modified by Piter Punk <piterpunk@slackware.com> 25 April 2022
|
||||
# Add support to specify additional filesystems to be mounted by
|
||||
# initrd. Useful for those that have a separated '/usr'
|
||||
|
||||
MKINITRD_VERSION=1.4.11
|
||||
|
||||
COMMAND_LINE="$0 $*"
|
||||
|
||||
# Don't include these things from /lib/udev/ in the initrd image
|
||||
LIBUDEV_BLACKLIST="\
|
||||
ipod-set-info \
|
||||
iphone-set-info \
|
||||
check-mtp-device \
|
||||
check-ptp-camera \
|
||||
udev-configure-printer \
|
||||
rules.d/60-openobex.rules \
|
||||
rules.d/73-seat-late.rules \
|
||||
rules.d/85-regulatory.rules \
|
||||
"
|
||||
|
||||
print_usage() {
|
||||
cat << EOF
|
||||
Usage: mkinitrd [OPTION]
|
||||
|
||||
mkinitrd creates an initial ramdisk (actually an initramfs cpio+gzip
|
||||
archive) used to load kernel modules that are needed to mount the
|
||||
root filesystem, or other modules that might be needed before the
|
||||
root filesystem is available. Other binaries may be added to the
|
||||
initrd, and the script is easy to modify. Be creative. :-)
|
||||
|
||||
-F Use the contents of /etc/mkinitrd.conf (optional)
|
||||
If this is used in conjunction with any other options passed
|
||||
on the command line, the command-line options will override
|
||||
the config file options. See mkinitrd.conf(5) for details.
|
||||
-c Clear the existing initrd tree first
|
||||
-f Filesystem to use for root partition (must be used with -r)
|
||||
--help Display this message
|
||||
-h Device to resume from hibernation. Needs to be the name of
|
||||
the swap partition holding the hibernation image.
|
||||
-k Kernel version to use
|
||||
-l Custom keymap to load. Like, 'nl' or 'de-latin1-nodeadkeys'
|
||||
-m A colon (:) delimited list of kernel modules to load.
|
||||
Additional options may be added to use when loading the
|
||||
kernel modules (but in this case the entire list must be
|
||||
wrapped with double quotes). Any dependencies of requested
|
||||
modules will also be added to the initrd.
|
||||
-o Output image (default /boot/initrd.gz)
|
||||
-r Root partition device (must be used with -f)
|
||||
-s Initrd source tree (default /boot/initrd-tree/)
|
||||
-u Include udev in the initrd
|
||||
-w Time to wait until all disks are detected
|
||||
-C A colon (:) delimited list of luks encrypted block devices to be
|
||||
unlocked by the initrd using cryptsetup. All devices that must
|
||||
be unlocked in order to access the root filesystem must be
|
||||
specified. (Use with '-r' parameter).
|
||||
-T A colon (:) delimited list of luks encrypted block devices to be
|
||||
passed the "--allow-discards" option when unlocked by the initrd
|
||||
using cryptsetup. This has the effect of allowing TRIM on SSD drives.
|
||||
Be sure your SSD supports this feature (correctly) before enabling
|
||||
it. See fstrim(8) for more information.
|
||||
-L Add support for LVM partitions
|
||||
-K Use a USB key (fat-formatted) to unlock the root LUKS volume
|
||||
The parameter value is filename of a keyfile, as well as the label
|
||||
(or uuid) of the partition this file is on. This way, you can unlock
|
||||
your computer automatically if you have a USB stick with your LUKS
|
||||
key inserted at boot. A passphrase will still be asked if the LUKS
|
||||
key can not be found.
|
||||
For example, if your USB thumb drive has a FAT partition with label
|
||||
"TRAVELSTICK" and the actual keyfile is called "/keys/alien.luks",
|
||||
then you need to pass: -K LABEL=TRAVELSTICK:/keys/alien.luks
|
||||
-B Add /sbin/btrfs to enable scanning for a root filesystem that is
|
||||
part of a Btrfs multi-device filesystem.
|
||||
-M Add the files in /etc/modprobe.d/ and /lib/modprobe.d/ to the initrd
|
||||
-P Prepend the output image with the microcode CPIO archive given in
|
||||
arguments.
|
||||
-R Add support for RAID partitions
|
||||
-MNT Additional filesystems to be mounted by initrd. Multiple mount
|
||||
entries can be specified in a list separated by colon (:).
|
||||
-V Display version number
|
||||
|
||||
A simple example: Build an initrd for a reiserfs root partition:
|
||||
|
||||
mkinitrd -c -m reiserfs
|
||||
|
||||
Another example: Build an initrd image using Linux 2.6.35.4-smp kernel
|
||||
modules for a system with an ext4 root partition on /dev/sdb3:
|
||||
|
||||
mkinitrd -c -k 2.6.35.4-smp -m mbcache:jbd:ext4 -f ext4 -r /dev/sdb3
|
||||
|
||||
Note that if you are already logged in with /dev/sdb3 as your /
|
||||
partition, and it is running ext4, this command works just the same:
|
||||
|
||||
mkinitrd -c -m ext4
|
||||
|
||||
If run without options, mkinitrd will rebuild an initrd image using
|
||||
the contents of the $SOURCE_TREE directory, or, if that directory
|
||||
does not exist it will be created and populated, and then mkinitrd
|
||||
will exit.
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
create_new_source_tree() {
|
||||
mkdir -p $SOURCE_TREE
|
||||
# Make sure the kernel module directories exist:
|
||||
for kver in $(echo ${KERNEL_VERSION} | tr ':' '\n') ; do
|
||||
mkdir -p $SOURCE_TREE/lib/modules/${kver}
|
||||
done
|
||||
# Add the initrd-tree skeleton:
|
||||
( cd $SOURCE_TREE ; tar xzf /usr/share/mkinitrd/initrd-tree.tar.gz )
|
||||
# Make sure we have any block devices that might be needed:
|
||||
|
||||
SLOPPY_DEV_LIST=$(cat /proc/partitions)
|
||||
for device in $SLOPPY_DEV_LIST ; do
|
||||
if [ ! -r $SOURCE_TREE/dev/$device ]; then
|
||||
if [ -b /dev/$device ]; then
|
||||
if [ -L /dev/$device ]; then
|
||||
cp -a --parents $(readlink -e /dev/$device) $SOURCE_TREE
|
||||
fi
|
||||
cp -a --parents /dev/$device $SOURCE_TREE
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
clear_source_tree() {
|
||||
if [ -d "$SOURCE_TREE" ]; then
|
||||
rm -rf $SOURCE_TREE
|
||||
fi
|
||||
}
|
||||
|
||||
build_initrd_image() {
|
||||
# Make sure we have any block devices that might be needed:
|
||||
SLOPPY_DEV_LIST=$(cat /proc/partitions)
|
||||
for device in $SLOPPY_DEV_LIST ; do
|
||||
if [ ! -r $SOURCE_TREE/dev/$device ]; then
|
||||
if [ -b /dev/$device ]; then
|
||||
if [ -L /dev/$device ]; then
|
||||
cp -a --parents $(readlink -e /dev/$device) $SOURCE_TREE
|
||||
fi
|
||||
cp -a --parents /dev/$device $SOURCE_TREE
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# Use the output image name written in the initrd-tree if present:
|
||||
if [ ! -z "$(cat $SOURCE_TREE/initrd-name)" ]; then
|
||||
OUTPUT_IMAGE=$(cat $SOURCE_TREE/initrd-name)
|
||||
if [ "$OUTPUT_IMAGE" = "$(basename $OUTPUT_IMAGE)" ]; then
|
||||
OUTPUT_IMAGE=/boot/$OUTPUT_IMAGE
|
||||
fi
|
||||
mkdir -p $(dirname $OUTPUT_IMAGE)
|
||||
fi
|
||||
# Wrap the initrd as an initramfs image and move it into place:
|
||||
( cd $SOURCE_TREE
|
||||
rm -f $OUTPUT_IMAGE
|
||||
find . | cpio -o -H newc | gzip -9c > $OUTPUT_IMAGE
|
||||
)
|
||||
|
||||
if [ ! -z "${MICROCODE_ARCH}" ] ; then
|
||||
cat ${MICROCODE_ARCH} ${OUTPUT_IMAGE} > ${OUTPUT_IMAGE}.2
|
||||
mv ${OUTPUT_IMAGE}.2 ${OUTPUT_IMAGE}
|
||||
fi
|
||||
echo "$OUTPUT_IMAGE created."
|
||||
echo "Be sure to run lilo again if you use it."
|
||||
}
|
||||
|
||||
badconf_file() {
|
||||
# This won't really help with what's *wrong* with the file,
|
||||
# but it will at least give them a clue that there's a problem
|
||||
echo "/etc/mkinitrd.conf is bad or does not exist."
|
||||
echo "If the file does not exist, do not pass -F to mkinitrd."
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
unify_libs() {
|
||||
awk '/=. \// { print $3 }' | sort -u
|
||||
}
|
||||
|
||||
copy_libs() {
|
||||
# First copy the essential glibc files:
|
||||
find /lib /lib64 -name "ld-*so*" -o -name "libnss_files*so*" -o -name "libnss_compat*so*" 2> /dev/null | xargs -I'{}' cp -P --parents '{}' $SOURCE_TREE/
|
||||
|
||||
# Then copy all remaining libs our initrd files link against:
|
||||
COUNT=1
|
||||
PRFX=$(tempfile --prefix ldd-)
|
||||
TMPFILE=${PRFX}${COUNT}
|
||||
|
||||
find $SOURCE_TREE -type f -exec ldd {} 2>/dev/null \; | unify_libs > $TMPFILE
|
||||
while [ "$COUNT" != "0" ]; do
|
||||
COUNT=$((COUNT+1))
|
||||
for i in $(cat ${TMPFILE}) ; do
|
||||
ldd $i 2>/dev/null
|
||||
done | unify_libs > ${PRFX}${COUNT}
|
||||
if [ $(cat $TMPFILE ${PRFX}${COUNT} | sort |uniq -u | wc -l) -eq 0 ]; then
|
||||
COUNT=0
|
||||
else
|
||||
TMPFILE=${PRFX}${COUNT}
|
||||
fi
|
||||
# emergency eject lever:
|
||||
if [ "$COUNT" = "42" ]; then
|
||||
COUNT=0
|
||||
fi
|
||||
done
|
||||
|
||||
for i in $(cat ${PRFX}* | sort -u) ; do
|
||||
cp -P --parents ${i}* $SOURCE_TREE
|
||||
done
|
||||
|
||||
(
|
||||
cd $SOURCE_TREE
|
||||
for i in $(find -L . -type l -exec readlink -m /{} \; 2>/dev/null ) ; do
|
||||
cp -P --parents ${i} $SOURCE_TREE
|
||||
done
|
||||
)
|
||||
|
||||
rm ${PRFX}*
|
||||
}
|
||||
|
||||
copy_modconf() {
|
||||
mkdir -p $SOURCE_TREE/etc $SOURCE_TREE/lib
|
||||
cp -a /etc/modprobe.d $SOURCE_TREE/etc
|
||||
cp -a /lib/modprobe.d $SOURCE_TREE/lib/
|
||||
}
|
||||
|
||||
# Normalize the string $1 by replacing occurences of
|
||||
# recognized tags by their current values.
|
||||
#
|
||||
# this version take the following tags into account:
|
||||
# %KVER% (kernel version)
|
||||
# %SLACKVER% (slackware version)
|
||||
#
|
||||
function normalize_string() {
|
||||
echo "$1" | sed -e "s?%KVER%?${KERNEL_VERSION}?g" \
|
||||
-e "s?%SLACKVER%?$(cat /etc/slackware-version|cut -f2 -d" ")?g"
|
||||
}
|
||||
|
||||
# If --help is given, print_usage and exit:
|
||||
if echo $* | grep -wq '\--help' ; then
|
||||
print_usage
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# If -V given, print version and exit:
|
||||
if echo $* | grep -wq '\-V' ; then
|
||||
echo "mkinitrd version $MKINITRD_VERSION"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Default values if these aren't previously set.
|
||||
# Might be set from config file or by -s and -o options too.
|
||||
SOURCE_TREE=${SOURCE_TREE:-/boot/initrd-tree}
|
||||
OUTPUT_IMAGE=${OUTPUT_IMAGE:-""}
|
||||
KERNEL_VERSION=${KERNEL_VERSION:-"$(uname -r)"}
|
||||
# The initrd requires udev to function correctly:
|
||||
UDEV=1
|
||||
|
||||
# Default actions without options:
|
||||
if [ -z "$1" ]; then
|
||||
# We need a sensible default for this special case:
|
||||
OUTPUT_IMAGE=$(normalize_string ${OUTPUT_IMAGE:-/boot/initrd.gz})
|
||||
# If the output tree doesn't exist, create it and then exit:
|
||||
if [ ! -d $SOURCE_TREE ]; then
|
||||
echo "Nothing found at location $SOURCE_TREE, so we will create an"
|
||||
echo -n "initrd directory structure there... "
|
||||
create_new_source_tree
|
||||
echo "done."
|
||||
echo
|
||||
echo "Now cd to $SOURCE_TREE and install some modules in your"
|
||||
echo "module directory (lib/modules/${KERNEL_VERSION}). Then see init"
|
||||
echo "for more information (there are a few other files to edit)."
|
||||
echo "Finally, run mkinitrd again once the initrd-tree is ready,"
|
||||
echo "and $OUTPUT_IMAGE will be created from it."
|
||||
echo
|
||||
exit 0
|
||||
else
|
||||
# If the source tree does exist, the default is to build the initrd
|
||||
# image from it and then exit:
|
||||
build_initrd_image
|
||||
exit 0
|
||||
fi
|
||||
fi # default no-option actions
|
||||
|
||||
# Parse for the use config file option first or else the other command
|
||||
# line options can not override /etc/mkinitrd.conf.
|
||||
for opt in "$@"; do
|
||||
if [ "$opt" = "-F" ]; then
|
||||
if [ -e /etc/mkinitrd.conf ]; then
|
||||
. /etc/mkinitrd.conf || badconf_file
|
||||
else
|
||||
badconf_file
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Parse options:
|
||||
while [ ! -z "$1" ]; do
|
||||
case $1 in
|
||||
-c)
|
||||
CLEAR_TREE=1
|
||||
shift
|
||||
;;
|
||||
-f)
|
||||
ROOTFS="$2"
|
||||
shift 2
|
||||
;;
|
||||
-h)
|
||||
RESUMEDEV="$2"
|
||||
shift 2
|
||||
;;
|
||||
-k)
|
||||
KERNEL_VERSION="$2"
|
||||
shift 2
|
||||
;;
|
||||
-l)
|
||||
KEYMAP="$2"
|
||||
shift 2
|
||||
;;
|
||||
-m)
|
||||
MODULE_LIST="$2"
|
||||
shift 2
|
||||
;;
|
||||
-o)
|
||||
# canonicalize filename:
|
||||
OUTPUT_IMAGE="$(readlink -m $2)"
|
||||
shift 2
|
||||
;;
|
||||
-r)
|
||||
ROOTDEV="$2"
|
||||
shift 2
|
||||
;;
|
||||
-s)
|
||||
# canonicalize filename:
|
||||
SOURCE_TREE="$(readlink -m $2)"
|
||||
shift 2
|
||||
;;
|
||||
-u)
|
||||
UDEV=1
|
||||
shift
|
||||
;;
|
||||
-w)
|
||||
WAIT="$2"
|
||||
shift 2
|
||||
;;
|
||||
-C)
|
||||
CRYPT=1
|
||||
LUKSDEV="$2"
|
||||
shift 2
|
||||
;;
|
||||
-K)
|
||||
LUKSKEY="$2"
|
||||
shift 2
|
||||
;;
|
||||
-T)
|
||||
LUKSTRIM="$2"
|
||||
shift 2
|
||||
;;
|
||||
-L)
|
||||
LVM=1
|
||||
shift
|
||||
;;
|
||||
-B)
|
||||
BTRFS=1
|
||||
shift
|
||||
;;
|
||||
-M)
|
||||
MODCONF=1
|
||||
shift
|
||||
;;
|
||||
-P)
|
||||
# canonicalize filename:
|
||||
MICROCODE_ARCH="$(readlink -m $2)"
|
||||
if [ ! -e "${MICROCODE_ARCH}" ] ; then
|
||||
echo "Error, the microcode cpio archive ${MICROCODE_ARCH} does not exist."
|
||||
exit 1
|
||||
fi
|
||||
shift 2
|
||||
;;
|
||||
-MNT)
|
||||
MOUNT_LIST="$2"
|
||||
shift 2
|
||||
;;
|
||||
-R)
|
||||
RAID=1
|
||||
shift
|
||||
;;
|
||||
*) # unknown, prevent infinite loop
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Resolve TAGS (i.e %KVER%, %SLACKVER%) found in OUTPUT_IMAGE.
|
||||
#
|
||||
# Note:
|
||||
# ----
|
||||
# This must be done after all options have been handled and
|
||||
# not when handling case '-o' because -k can be passed after
|
||||
# -o in which case, the tag %KVER% would be replaced with the
|
||||
# current kernel version instead of version passed with -k.
|
||||
#
|
||||
if echo "$OUTPUT_IMAGE" | grep -qE "%KVER%|%SLACKVER%" ; then
|
||||
OUTPUT_IMAGE="$(normalize_string $OUTPUT_IMAGE)"
|
||||
fi
|
||||
|
||||
# If kernel modules are needed but the kernel version is absent, exit now:
|
||||
for kver in $(echo ${KERNEL_VERSION} | tr ':' '\n') ; do
|
||||
if [ ! -d /lib/modules/$kver ]; then
|
||||
echo "ERROR: No /lib/modules/$kver kernel modules tree found for kernel \"$kver\""
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# If clearing source tree was requested, do that first
|
||||
if [ "$CLEAR_TREE" = "1" ]; then
|
||||
clear_source_tree
|
||||
fi
|
||||
|
||||
# If there's no $SOURCE_TREE, make one now:
|
||||
if [ ! -d "$SOURCE_TREE" ]; then
|
||||
create_new_source_tree
|
||||
fi
|
||||
|
||||
# If $ROOTDEV and $ROOTFS are not set, assume we want the
|
||||
# values for the currently mounted /
|
||||
# (unless we find that values are already set in the initrd-tree):
|
||||
if [ -z "$ROOTDEV" -a -z "$(cat $SOURCE_TREE/rootdev 2>/dev/null)" ]; then
|
||||
ROOTDEV=$(mount | grep ' on / ' | cut -f 1 -d ' ')
|
||||
if [ "$ROOTDEV" = "/dev/root" ]; then # find real root device
|
||||
ROOTDEV="/dev/$(readlink /dev/root)"
|
||||
fi
|
||||
fi
|
||||
if [ -z "$ROOTFS" -a -z "$(cat $SOURCE_TREE/rootfs 2>/dev/null)" ]; then
|
||||
ROOTFS=$(mount | grep ' on / ' | cut -f 5 -d ' ')
|
||||
fi
|
||||
# If needed, write them in the initrd-tree:
|
||||
if [ ! -z "$ROOTDEV" ]; then
|
||||
echo $ROOTDEV > $SOURCE_TREE/rootdev
|
||||
fi
|
||||
if [ ! -z "$ROOTFS" ]; then
|
||||
echo $ROOTFS > $SOURCE_TREE/rootfs
|
||||
fi
|
||||
|
||||
# Put a copy of the command line used to create this initrd in
|
||||
# initrd-tree/command_line:
|
||||
echo "$COMMAND_LINE" > $SOURCE_TREE/command_line
|
||||
|
||||
# If /etc/mkinitrd.conf exists, put a copy of that in there as well.
|
||||
# (May or may not have been used according to the -F option, but we'll
|
||||
# save a copy anyway just in case):
|
||||
if [ -e /etc/mkinitrd.conf ]; then
|
||||
cp -a /etc/mkinitrd.conf $SOURCE_TREE/mkinitrd.conf
|
||||
fi
|
||||
|
||||
# If $WAIT is not set, assume we need only one second
|
||||
# to have all devices done
|
||||
# (unless we find that value is already set in the initrd-tree):
|
||||
if [ -z "$WAIT" -a -z "$(cat $SOURCE_TREE/wait-for-root)" ]; then
|
||||
WAIT=1
|
||||
# ARM devices need even more time:
|
||||
case "$( uname -m )" in
|
||||
arm*) WAIT=4;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -z "$WAIT" ]; then
|
||||
echo $WAIT > $SOURCE_TREE/wait-for-root
|
||||
fi
|
||||
|
||||
# If no OUTPUT_IMAGE was specified, read it from the SOURCE_TREE if possible:
|
||||
OUTPUT_IMAGE=$(normalize_string ${OUTPUT_IMAGE:-"$(cat $SOURCE_TREE/initrd-name)"})
|
||||
# If we still have no value, apply the default:
|
||||
OUTPUT_IMAGE=${OUTPUT_IMAGE:-"/boot/initrd.gz"}
|
||||
# Finally, write the image name into the SOURCE_TREE:
|
||||
echo "$OUTPUT_IMAGE" > $SOURCE_TREE/initrd-name
|
||||
|
||||
# Fill /resumedev with the swap partition holding the hibernation image
|
||||
if [ ! -z "$RESUMEDEV" ]; then
|
||||
echo $RESUMEDEV > $SOURCE_TREE/resumedev
|
||||
fi
|
||||
|
||||
# Add custom keymap support if one was given
|
||||
if [ ! -z "$KEYMAP" ]; then
|
||||
echo $KEYMAP > $SOURCE_TREE/keymap
|
||||
cp /usr/share/mkinitrd/keymaps.tar.gz $SOURCE_TREE/etc/
|
||||
fi
|
||||
|
||||
# If LUKSDEV was set in the config file, then we need to set CRYPT=1
|
||||
if [ ! -z "$LUKSDEV" ]; then
|
||||
CRYPT=1
|
||||
fi
|
||||
|
||||
# Check for LUKSTRIM
|
||||
if [ ! -z "$LUKSTRIM" ]; then
|
||||
echo $LUKSTRIM > $SOURCE_TREE/lukstrim
|
||||
fi
|
||||
|
||||
# If LUKSKEY was set in the config file, then give it a warm welcome:
|
||||
if [ ! -z "$LUKSKEY" ]; then
|
||||
# $SOURCE_TREE/wait-for-root may have been configured earlier in the script,
|
||||
# but we require at least 5 seconds for the USB stick to settle
|
||||
# after insertion :
|
||||
if [ ! -s $SOURCE_TREE/wait-for-root ] || [ $(cat $SOURCE_TREE/wait-for-root) -lt 5 ]; then
|
||||
echo 5 > $SOURCE_TREE/wait-for-root
|
||||
fi
|
||||
|
||||
# Several extra modules are needed to support a vfat formatted USB stick...
|
||||
# assuming here we are using a western codepage.
|
||||
# This possibly adds doublures, but we clean up the MODULE_LIST further down!
|
||||
MODULE_LIST="${MODULE_LIST}:xhci-pci:ohci-pci:ehci-pci:xhci-hcd:ohci-hcd:ehci-hcd:uhci-hcd:usb-storage:hid:usbhid:fat:nls_cp437:nls_iso8859-1:msdos:vfat"
|
||||
|
||||
# Finally, write the lukskey to the initrd-tree:
|
||||
echo $LUKSKEY > $SOURCE_TREE/lukskey
|
||||
fi
|
||||
|
||||
# Include RAID support in initrd
|
||||
if [ ! -z "$RAID" ]; then
|
||||
if [ -r /sbin/mdadm -a -r /sbin/mdmon ]; then
|
||||
mkdir -p $SOURCE_TREE/sbin
|
||||
cp /sbin/mdadm $SOURCE_TREE/sbin/mdadm
|
||||
cp /sbin/mdmon $SOURCE_TREE/sbin/mdmon
|
||||
chmod 0755 $SOURCE_TREE/sbin/mdadm
|
||||
chmod 0755 $SOURCE_TREE/sbin/mdmon
|
||||
mkdir -p $SOURCE_TREE/lib/udev/rules.d
|
||||
echo 'KERNEL=="dm-[0-9]*", OPTIONS+="db_persist"' > \
|
||||
$SOURCE_TREE/lib/udev/rules.d/95-dm-initrd.rules
|
||||
if [ -r /etc/mdadm.conf ] ; then
|
||||
cp /etc/mdadm.conf $SOURCE_TREE/etc
|
||||
fi
|
||||
else
|
||||
echo "ERROR: mdadm and/or mdmon binary is missing, RAID support not installed"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Include Btrfs support in initrd
|
||||
if [ ! -z "$BTRFS" ]; then
|
||||
if [ -r /sbin/btrfs ]; then
|
||||
mkdir -p $SOURCE_TREE/sbin
|
||||
cp /sbin/btrfs $SOURCE_TREE/sbin/btrfs
|
||||
chmod 0755 $SOURCE_TREE/sbin/btrfs
|
||||
else
|
||||
echo "ERROR: btrfs binary is missing, Btrfs support not installed"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Include udev in initrd
|
||||
if [ ! -z "$UDEV" ]; then
|
||||
cp /sbin/udev* $SOURCE_TREE/sbin/
|
||||
cp -a /lib/udev $SOURCE_TREE/lib/
|
||||
# But we don't want all of /lib/udev
|
||||
for file in $(echo $LIBUDEV_BLACKLIST) ; do
|
||||
# Replace with a null script (avoids error spew):
|
||||
cat << EOF > $SOURCE_TREE/lib/udev/$file
|
||||
#!/bin/ash
|
||||
# This space is intentionally left blank
|
||||
EOF
|
||||
done
|
||||
fi
|
||||
|
||||
# Include LVM support in initrd
|
||||
if [ ! -z "$LVM" ]; then
|
||||
if [ -f /sbin/lvm ]; then
|
||||
mkdir -p $SOURCE_TREE/sbin
|
||||
cp /sbin/lvm $SOURCE_TREE/sbin/lvm
|
||||
( cd $SOURCE_TREE/sbin
|
||||
ln -s lvm vgchange 2>/dev/null
|
||||
ln -s lvm vgscan 2>/dev/null )
|
||||
else
|
||||
echo "LVM binary is missing, LVM support isn't installed"
|
||||
LVM=""
|
||||
fi
|
||||
fi
|
||||
|
||||
# Include cryptsetup (LUKS) support in initrd
|
||||
if [ ! -z "$CRYPT" ]; then
|
||||
if [ -e /usr/sbin/cryptsetup ]; then
|
||||
mkdir -p $SOURCE_TREE/sbin
|
||||
cp /usr/sbin/cryptsetup $SOURCE_TREE/sbin/cryptsetup
|
||||
find /lib /lib64 /usr/lib /usr/lib64 -name "libargon2*so*" 2> /dev/null | xargs -I'{}' cp -P --parents '{}' $SOURCE_TREE/
|
||||
find /lib /lib64 /usr/lib /usr/lib64 -name "libgcc_s*so*" 2> /dev/null | xargs -I'{}' cp -P --parents '{}' $SOURCE_TREE/
|
||||
MODULE_LIST="${MODULE_LIST}:algif_skcipher"
|
||||
if [ ! -e $SOURCE_TREE/sbin/udevadm ]; then
|
||||
cat << EOF > $SOURCE_TREE/sbin/udevadm
|
||||
#!/bin/sh
|
||||
sleep 3
|
||||
EOF
|
||||
chmod 0755 $SOURCE_TREE/sbin/udevadm
|
||||
fi
|
||||
|
||||
# Write the underlying luks device to the initrd-tree:
|
||||
echo $LUKSDEV > $SOURCE_TREE/luksdev
|
||||
else
|
||||
echo "Cryptsetup binary is missing, CRYPT support isn't installed"
|
||||
CRYPT=""
|
||||
fi
|
||||
fi
|
||||
|
||||
# Include device mapper in initrd (needed for LUKS and LVM)
|
||||
if [ ! -z "$CRYPT" -o ! -z "$LVM" ]; then
|
||||
cp /sbin/dmsetup $SOURCE_TREE/sbin/dmsetup
|
||||
find /lib /lib64 -name "libdevmapper*so*" 2> /dev/null | xargs -I'{}' cp -P --parents '{}' $SOURCE_TREE/
|
||||
if [ -z "${MODULE_LIST}" ] ; then
|
||||
MODULE_LIST="dm-mod"
|
||||
elif ! echo ${MODULE_LIST} | grep -q dm-mod ; then
|
||||
MODULE_LIST="$MODULE_LIST:dm-mod"
|
||||
fi
|
||||
# Ensure that dm-snapshot is included if LVM is used:
|
||||
if [ ! -z "$LVM" ]; then
|
||||
if ! echo ${MODULE_LIST} | grep -q dm-snapshot ; then
|
||||
MODULE_LIST="$MODULE_LIST:dm-snapshot"
|
||||
fi
|
||||
fi
|
||||
mkdir -p $SOURCE_TREE/lib/udev/rules.d
|
||||
echo 'KERNEL=="dm-[0-9]*", OPTIONS+="db_persist"' > \
|
||||
$SOURCE_TREE/lib/udev/rules.d/95-dm-initrd.rules
|
||||
fi
|
||||
|
||||
# If there is additional filesystems to be mounted, copy their configuration
|
||||
# from system's /etc/fstab:
|
||||
if [ ! -z "$MOUNT_LIST" ]; then
|
||||
for MOUNT_POINT in $(echo $MOUNT_LIST | tr : \ ); do
|
||||
grep '^[^#[:space:]]\+[[:space:]]\+'$MOUNT_POINT'[[:space:]]' /etc/fstab
|
||||
done > $SOURCE_TREE/addfstab
|
||||
fi
|
||||
|
||||
# Make module directories:
|
||||
for kver in $(echo ${KERNEL_VERSION} | tr ':' '\n') ; do
|
||||
if [ ! -d $SOURCE_TREE/lib/modules/$kver ]; then
|
||||
mkdir -p $SOURCE_TREE/lib/modules/$kver
|
||||
fi
|
||||
done
|
||||
|
||||
# Copy kmod/modprobe stuff to initrd:
|
||||
for i in kmod depmod insmod lsmod modinfo modprobe rmmod ; do
|
||||
rm -f $SOURCE_TREE/sbin/$i ;
|
||||
cp -a /sbin/$i $SOURCE_TREE/sbin ;
|
||||
done
|
||||
|
||||
# Make sure modules.builtin and modules.order are there (for kmod):
|
||||
for kver in $(echo ${KERNEL_VERSION} | tr ':' '\n') ; do
|
||||
cp /lib/modules/$kver/modules.{builtin,order} \
|
||||
$SOURCE_TREE/lib/modules/$kver
|
||||
done
|
||||
|
||||
# If an executable $SOURCE_TREE/load_kernel_modules already exists, then
|
||||
# we assume you will want to load the kernel modules mentioned in there.
|
||||
# This means, you do not have to explicitly add those on the commandline:
|
||||
if [ -x $SOURCE_TREE/load_kernel_modules ]; then
|
||||
MODULE_LIST="${MODULE_LIST}:$(cat $SOURCE_TREE/load_kernel_modules |grep "^modprobe" |rev |cut -d/ -f1 |rev |cut -d. -f1)"
|
||||
fi
|
||||
|
||||
# If the module list is not empty, copy the modules into place:
|
||||
if [ ! -z "$MODULE_LIST" ]; then
|
||||
if grep -q "#modprobe reiserfs" $SOURCE_TREE/load_kernel_modules ; then
|
||||
rm -f $SOURCE_TREE/load_kernel_modules
|
||||
touch $SOURCE_TREE/load_kernel_modules
|
||||
chmod 755 $SOURCE_TREE/load_kernel_modules
|
||||
echo "# This is a script used to load the kernel modules." >> $SOURCE_TREE/load_kernel_modules
|
||||
echo "# To use it, chmod it 755, and then add the insmod" >> $SOURCE_TREE/load_kernel_modules
|
||||
echo "# lines needed to load your modules, like this:" >> $SOURCE_TREE/load_kernel_modules
|
||||
echo >> $SOURCE_TREE/load_kernel_modules
|
||||
fi
|
||||
|
||||
# Sanitize the modules list first, before any further processing.
|
||||
# The awk command eliminates doubles without changing the order:
|
||||
MODULE_LIST=$(echo $MODULE_LIST |tr -s ':' '\n' |awk '!x[$0]++' |tr '\n' ':')
|
||||
MODULE_LIST=$(echo ${MODULE_LIST%:}) # Weed out a trailing ':'
|
||||
|
||||
# Count number of modules
|
||||
# This INDEX number gives us an easy way to find individual
|
||||
# modules and their arguments, as well as tells us how many
|
||||
# times to run through the list
|
||||
if ! echo $MODULE_LIST | grep ':' > /dev/null ; then # only 1 module specified
|
||||
INDEX=1
|
||||
else
|
||||
# Trim excess ':' which will screw this routine:
|
||||
MODULE_LIST=$(echo $MODULE_LIST | tr -s ':')
|
||||
INDEX=1
|
||||
while [ ! "$(echo "$MODULE_LIST" | cut -f $INDEX -d ':' )" = "" ]; do
|
||||
INDEX=$(expr $INDEX + 1)
|
||||
done
|
||||
INDEX=$(expr $INDEX - 1) # Don't include the null value
|
||||
fi
|
||||
|
||||
# Repeat these tasks for all kernel versions support has been requested for:
|
||||
for kver in $(echo ${KERNEL_VERSION} | tr ':' '\n') ; do
|
||||
|
||||
# Wrap everything in a while loop
|
||||
i=0
|
||||
while [ $i -ne $INDEX ]; do
|
||||
i=$(( $i + 1 ))
|
||||
|
||||
# FULL_MOD is the module plus any arguments (if any)
|
||||
# MODULE is the module name
|
||||
# ARGS is any optional arguments to be passed to the kernel
|
||||
FULL_MOD="$(echo "$MODULE_LIST" | cut -d ':' -f $i)"
|
||||
MODULE="$(echo "$FULL_MOD" | cut -d ' ' -f 1 )"
|
||||
# Test for arguments
|
||||
if echo "$FULL_MOD" | grep ' ' > /dev/null; then
|
||||
ARGS=" $(echo "$FULL_MOD" | cut -d ' ' -f 2- )"
|
||||
else
|
||||
unset ARGS
|
||||
fi
|
||||
|
||||
# Get MODULE deps and prepare modprobe lines
|
||||
/sbin/modprobe --set-version $kver --show-depends --ignore-install $MODULE 2>/dev/null \
|
||||
| grep "^insmod " | cut -f 2 -d ' ' | while read SRCMOD; do
|
||||
|
||||
# If jfs or xfs filesystems are in use, add the repair tools to the initrd:
|
||||
if [ "$(basename $SRCMOD .ko)" = "jfs" ]; then
|
||||
cp -a /sbin/jfs_fsck $SOURCE_TREE/sbin/
|
||||
elif [ "$(basename $SRCMOD .ko)" = "xfs" ]; then
|
||||
cp -a /sbin/xfs_repair $SOURCE_TREE/sbin/
|
||||
fi
|
||||
|
||||
if ! grep -Eq " $(basename $SRCMOD .ko)(\.| |$)" $SOURCE_TREE/load_kernel_modules 2>/dev/null ; then
|
||||
LINE="$(echo "modprobe -v $(basename ${SRCMOD%%.gz} .ko)" )"
|
||||
|
||||
# Test to see if arguments should be passed
|
||||
# Over-ride the previously defined LINE variable if so
|
||||
if [ "$(basename $SRCMOD .ko)" = "$MODULE" ]; then
|
||||
# SRCMOD and MODULE are same, ARGS can be passed
|
||||
LINE="$LINE$ARGS"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if ! grep -qx "$LINE" $SOURCE_TREE/load_kernel_modules ; then
|
||||
echo "$LINE" >> $SOURCE_TREE/load_kernel_modules
|
||||
fi
|
||||
|
||||
# Try to add the module to the initrd-tree. This should be done
|
||||
# even if it exists there already as we may have changed compilers
|
||||
# or otherwise caused the modules in the initrd-tree to need
|
||||
# replacement.
|
||||
if cp -a --parents $SRCMOD $SOURCE_TREE 2>/dev/null; then
|
||||
echo "OK: $SRCMOD added."
|
||||
# If a module needs firmware, copy that too
|
||||
/sbin/modinfo -F firmware "$SRCMOD" | sed 's/^/\/lib\/firmware\//' |
|
||||
while read SRCFW; do
|
||||
if cp -a --parents "$SRCFW" $SOURCE_TREE 2>/dev/null; then
|
||||
echo "OK: $SRCFW added."
|
||||
else
|
||||
echo "WARNING: Could not find firmware \"$SRCFW\""
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "WARNING: Could not find module \"$SRCMOD\""
|
||||
fi
|
||||
|
||||
done
|
||||
done
|
||||
|
||||
# Pregenerate the module dependency information
|
||||
/sbin/depmod -a -b $SOURCE_TREE $kver
|
||||
|
||||
done # repeat for all kernel versions
|
||||
|
||||
# Copy /{etc,lib}/modprobe.d/* if desired
|
||||
if [ ! -z $MODCONF ]; then
|
||||
copy_modconf
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Copy needed libraries
|
||||
copy_libs
|
||||
|
||||
# Make sure all libraries have symlinks:
|
||||
/sbin/ldconfig $(readlink -f $SOURCE_TREE)/lib/ 2> /dev/null
|
||||
/sbin/ldconfig $(readlink -f $SOURCE_TREE)/lib64/ 2> /dev/null
|
||||
/sbin/ldconfig
|
||||
|
||||
# And finally, build the initrd:
|
||||
build_initrd_image
|
||||
|
300
testing/source/mkinitrd/mkinitrd.8
Normal file
300
testing/source/mkinitrd/mkinitrd.8
Normal file
|
@ -0,0 +1,300 @@
|
|||
.\" -*- nroff -*-
|
||||
.ds g \" empty
|
||||
.ds G \" empty
|
||||
.\" Like TP, but if specified indent is more than half
|
||||
.\" the current line-length - indent, use the default indent.
|
||||
.de Tp
|
||||
.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
|
||||
.el .TP "\\$1"
|
||||
..
|
||||
.TH MKINITRD 8 "25 April 2022" "Slackware Version 15.0"
|
||||
.SH NAME
|
||||
mkinitrd \- create or rebuilt an initrd (initial ramdisk) using initramfs (simple cpio+gzip).
|
||||
.SH SYNOPSIS
|
||||
.B mkinitrd
|
||||
[
|
||||
.B \-F
|
||||
]
|
||||
[
|
||||
.B \-c
|
||||
]
|
||||
[
|
||||
.B \-f filesystem
|
||||
]
|
||||
[
|
||||
.B \-h hibernate_partition
|
||||
]
|
||||
[
|
||||
.B \-k kernel_version1:kernel_version2:kernel_version3...
|
||||
]
|
||||
[
|
||||
.B \-m module1:module2:module3...
|
||||
]
|
||||
[
|
||||
.B \-o output_file
|
||||
]
|
||||
[
|
||||
.B \-r root_device
|
||||
]
|
||||
[
|
||||
.B \-s source_tree
|
||||
]
|
||||
[
|
||||
.B \-u
|
||||
]
|
||||
[
|
||||
.B \-w wait_time
|
||||
]
|
||||
[
|
||||
.B \-C device1:device2:device3...
|
||||
]
|
||||
[
|
||||
.B \-K luks_keyfile
|
||||
]
|
||||
[
|
||||
.B \-P microcode_archive
|
||||
]
|
||||
[
|
||||
.B \-B
|
||||
]
|
||||
[
|
||||
.B \-L
|
||||
]
|
||||
[
|
||||
.B \-R
|
||||
]
|
||||
[
|
||||
.B \-V
|
||||
]
|
||||
.SH DESCRIPTION
|
||||
.B mkinitrd
|
||||
is used to build an initial ramdisk. An initial ramdisk is a very small
|
||||
set of files that are loaded into RAM and "mounted" (as initramfs doesn't
|
||||
actually use a filesystem) as the kernel boots (before the main root
|
||||
filesystem is mounted). The usual reason to use an initrd is to load kernel
|
||||
kernel modules in order to access the root partition. An initrd might also
|
||||
be required to unlock an encrypted device. Usually these modules are
|
||||
required to support the filesystem used by the root partition (e.g., ext4,
|
||||
jfs, xfs), or perhaps the controller that the hard drive is attached to
|
||||
(SCSI, RAID, etc). Essentially, there are so many different options
|
||||
available in modern Linux kernels that it isn't practical to try to ship
|
||||
many different kernels to try to cover everyone's needs. It's a lot more
|
||||
flexible to ship a generic kernel and a set of kernel modules for it.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-F
|
||||
Use the contents of /etc/mkinitrd.conf as options to mkinitrd (optional).
|
||||
If this is used in conjunction with any other options passed on the command
|
||||
line, the command-line options will override the config file options.
|
||||
.br
|
||||
See mkinitrd.conf(5) for details.
|
||||
.TP
|
||||
.B \-c
|
||||
Clear the existing initrd tree (by default in /boot/initrd-tree/) first.
|
||||
If this is not done, running mkinitrd will add additional modules to the
|
||||
existing initrd.
|
||||
.TP
|
||||
.B \-f filesystem
|
||||
Specify the filesystem to use for the root partition. If this isn't given,
|
||||
mount will usually figure it out. This option must be used together with the
|
||||
\-r option in order to be beneficial.
|
||||
.TP
|
||||
.B \--help
|
||||
Display a help summary.
|
||||
.TP
|
||||
.B \-h hibernate_partition
|
||||
Specify the swap partition holding the hibernation image.
|
||||
.TP
|
||||
.B \-k kernel version list
|
||||
Use kernel modules from the specified kernel version. mkinitrd will look
|
||||
for them in /lib/modules/(kernel version). This may be a single kernel version,
|
||||
or it may be a colon-delimited list of kernel versions.
|
||||
.TP
|
||||
.B \-l keymap
|
||||
Load an alternative keyboard mapping. All supported keyboard mappings
|
||||
can be found in /usr/share/mkinitrd/keymaps.tar.gz
|
||||
Leave the '.bmap' out when you supply this parameter. E.g. '-l nl' will
|
||||
add support for dutch keyboard mapping to the initrd.
|
||||
.TP
|
||||
.B \-m module list
|
||||
This is a list of colon-delimited modules to build into the initrd.
|
||||
Any dependencies of requested modules will also be added to the initrd.
|
||||
Additional options may be added to use when loading the kernel modules
|
||||
(but in this case the entire list must be wrapped with double quotes).
|
||||
.TP
|
||||
.B \-o output image
|
||||
The file to write the initrd to. (default: /boot/initrd.gz)
|
||||
.TP
|
||||
.BI \-r \ root_device
|
||||
Specify the device to be used as the root partition. If this isn't given, the
|
||||
kernel default will be used (which is usually fine). This option must be used
|
||||
together with the \-f option in order to be beneficial.
|
||||
.I root_device
|
||||
can be a device node path, UUID, or LABEL. See examples for \fB\-C\fR below.
|
||||
.TP
|
||||
.B \-s source tree
|
||||
The directory to use as the source for the initrd. (default: /boot/initrd-tree/)
|
||||
.TP
|
||||
.B \-u
|
||||
Include udev in the initrd (provided for backward compatibility, as udev is
|
||||
always included in the initrd).
|
||||
.TP
|
||||
.B \-w
|
||||
The -w option specifies how long to wait in seconds before assuming that all the
|
||||
drives are spun up and ready to go.
|
||||
.TP
|
||||
.BI \-C \ device_list
|
||||
A colon (:) delimited list of luks encrypted block devices to be unlocked by
|
||||
the initrd using cryptsetup.
|
||||
.I device_list
|
||||
may include any of: device node path, UUID, or LABEL. All devices that must be
|
||||
unlocked in order to access the root filesystem must be specified. For example:
|
||||
|
||||
-C /dev/sda2:/dev/sda3
|
||||
.br
|
||||
-C UUID=ec6dea40-c8d8-4590-850a-a757be60e45a
|
||||
.br
|
||||
-C LABEL=darkstar
|
||||
|
||||
Each unlocked device will be assigned an automatically generated luks device
|
||||
name of the form luks<device> where '<device>' will be the basename of the
|
||||
encrypted device node path. For example:
|
||||
|
||||
/dev/mapper/lukssda2
|
||||
|
||||
As a convenience to users, where -r specifies one of the device names listed
|
||||
on the -C option it will be automatically adjusted to use the correct luks
|
||||
device name. i.e.
|
||||
|
||||
"-C /dev/sda2 -r /dev/sda2" and
|
||||
"-C /dev/sda2 -r /dev/mapper/lukssda2"
|
||||
|
||||
are equivalent.
|
||||
.br
|
||||
(Use with '-r' option).
|
||||
.TP
|
||||
.B \-K luks_keyfile
|
||||
When using cryptsetup to encrypt your partition, you can use a keyfile instead
|
||||
of a passphrase to unlock the LUKS volume. The LUKSKEY variable holds the
|
||||
filename of a keyfile, as well as the label (or uuid) of the partition this
|
||||
file is on. This way, you can unlock your computer automatically if you have a
|
||||
USB stick with your LUKS key inserted at boot. A passphrase will still be asked
|
||||
if the LUKS key can not be found.
|
||||
.br
|
||||
For example, if your USB thumb drive has a FAT partition with label
|
||||
"TRAVELSTICK" and the actual keyfile is called "/keys/alien.luks", then
|
||||
you need to set:
|
||||
|
||||
-K LABEL=TRAVELSTICK:/keys/alien.luks
|
||||
.TP
|
||||
.B \-T device list
|
||||
A colon (:) delimited list of luks encrypted block devices to be passed the
|
||||
"--allow-discards" option when unlocked by the initrd using cryptsetup, e.g.
|
||||
|
||||
-T /dev/sda2:/dev/sda4
|
||||
|
||||
This has the effect of allowing TRIM on SSD drives. Be sure your SSD supports
|
||||
this feature (correctly) before enabling it. See fstrim(8) for more information.
|
||||
.TP
|
||||
.B \-P microcode_archive
|
||||
This option specifies a cpio archive containing updated microcode for your CPU.
|
||||
CPU manufacturers occasionally release such updates to fix bugs in the microcode
|
||||
currently embedded in the CPU. The microcode archive will be prepended to the
|
||||
output initrd, where the kernel will find it for early patching:
|
||||
|
||||
-P /boot/intel-ucode.cpio
|
||||
|
||||
.TP
|
||||
.B \-B
|
||||
This option adds the btrfs utility to the initrd so that multi-device filesystems
|
||||
will be picked up by a scan (/sbin/btrfs device scan). This is needed if the
|
||||
root filesystem is a Btrfs multi-device filesystem.
|
||||
.TP
|
||||
.B \-L
|
||||
This option adds LVM support to the initrd, if the tools are
|
||||
available on the system.
|
||||
.TP
|
||||
.B \-R
|
||||
This option adds RAID support to the initrd, if a static mdadm binary is
|
||||
available on the system.
|
||||
.TP
|
||||
.B \-M
|
||||
This option add the files in /etc/modprobe.d/ and /lib/modprobe.d/ to the initrd.
|
||||
.TP
|
||||
.B \-MNT mount_point_list
|
||||
List of filesystems to be mounted by initrd. Useful if libraries or commands that
|
||||
are outside the root filesystem are needed in early boot. Multiple filesystems can
|
||||
be listed separated by colon (:), e.g.
|
||||
|
||||
-MNT /usr:/usr/local
|
||||
|
||||
.TP
|
||||
.B \-V
|
||||
Display version information and exit.
|
||||
.SH EXAMPLES
|
||||
A simple example: Build an initrd for a reiserfs root partition:
|
||||
|
||||
mkinitrd -c -m reiserfs
|
||||
|
||||
Another example: Build an initrd image using Linux 2.6.33.1 kernel
|
||||
modules for a system with an ext3 root partition on /dev/sdb3:
|
||||
|
||||
mkinitrd -c -k 2.6.33.1 -m ext3 -f ext3 -r /dev/sdb3
|
||||
|
||||
An example of a single encrypted partition setup:
|
||||
.br
|
||||
As a user convenience, the value for the "-r" option may also be specified as
|
||||
"/dev/sda2" in this example:
|
||||
|
||||
mkinitrd -c -k 2.6.33.1 \\
|
||||
-m ext4:ehci-hcd:uhci-hcd:usbhid \\
|
||||
-f ext4 -r /dev/mapper/lukssda2 \\
|
||||
-C /dev/sda2 \\
|
||||
-l uk
|
||||
|
||||
Finally, A more complex example:
|
||||
.br
|
||||
This one is for a LVM Volume Group (rootvg) comprising of two LVM Physical
|
||||
Volumes, each of which is on a LUKS encrypted partition that will need to be
|
||||
unlocked before the root filesystem (/dev/rootvg/lvroot) can be accessed.
|
||||
|
||||
mkinitrd -c -k 2.6.29.6 \\
|
||||
-m ext4:ehci-hcd:uhci-hcd:usbhid \\
|
||||
-f ext4 -r /dev/rootvg/lvroot \\
|
||||
-L -C /dev/sda2:/dev/sdb2 \\
|
||||
-l uk
|
||||
|
||||
If run without options, mkinitrd will rebuild an initrd image using
|
||||
the contents of the $SOURCE_TREE directory, or, if that directory
|
||||
does not exist it will be created and populated, and then mkinitrd
|
||||
will exit. These options are handy for building an initrd mostly
|
||||
by hand. After creating /boot/initrd-tree/, you can add modules and
|
||||
edit files by hand, and then rerun mkinitrd to create the initrd.
|
||||
|
||||
Once the initrd is created, you'll need to tell your boot loader
|
||||
to load it. If you boot with LILO, you will need to add an initrd
|
||||
line to /etc/lilo.conf. Here's a section of lilo.conf that shows
|
||||
how to set this up:
|
||||
|
||||
# Linux bootable partition config begins
|
||||
image = /boot/vmlinuz-generic-2.6.33.1
|
||||
initrd = /boot/initrd.gz
|
||||
root = /dev/sda3
|
||||
label = Linux26331
|
||||
read-only
|
||||
# Linux bootable partition config ends
|
||||
|
||||
Note that the line "root = /dev/sda3" is not needed if the root device
|
||||
has been configured in the initrd image.
|
||||
|
||||
Once you've created the initrd and editing /etc/lilo.conf, you will
|
||||
need to run 'lilo' to write out the changed boot block. The next
|
||||
time you reboot the initrd should be loaded along with the kernel.
|
||||
|
||||
Have fun!
|
||||
|
||||
.SH SEE ALSO
|
||||
mkinitrd.conf (5)
|
||||
|
||||
.SH AUTHOR
|
||||
Patrick J. Volkerding <volkerdi@slackware.com>
|
198
testing/source/mkinitrd/mkinitrd.SlackBuild
Executable file
198
testing/source/mkinitrd/mkinitrd.SlackBuild
Executable file
|
@ -0,0 +1,198 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2016, 2017, 2018, 2021, 2022, 2023, 2024 Patrick J. Volkerding, Sebeka, MN, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PKGNAM=mkinitrd
|
||||
VERSION=${VERSION:-1.4.11}
|
||||
BB=1.32.1
|
||||
BUILD=${BUILD:-35}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) export ARCH=i686 ;;
|
||||
arm*) export ARCH=arm ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) export ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
TMP=${TMP:-/tmp}
|
||||
PKG=$TMP/package-mkinitrd
|
||||
|
||||
# Write a warning to stdout if the mkinitrd script has a different version:
|
||||
eval $( grep "^MKINITRD_VERSION=" $CWD/mkinitrd )
|
||||
if [ "$VERSION" != "$MKINITRD_VERSION" ]; then
|
||||
echo "The version of this package ($VERSION) is not equal to the version of the mkinitrd script ($MKINITRD_VERSION)."
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG
|
||||
cd $TMP
|
||||
rm -rf busybox-$BB
|
||||
tar xvf $CWD/busybox-$BB.tar.bz2 || tar xvf $CWD/busybox-$BB.tar.?z || exit 1
|
||||
cd busybox-$BB || exit 1
|
||||
|
||||
if [ -d $CWD/fixes-$BB ]; then
|
||||
for pfile in $CWD/fixes-$BB/*.patch ; do
|
||||
patch -p1 < $pfile || exit 1
|
||||
done
|
||||
fi
|
||||
|
||||
chown -R root:root .
|
||||
sed -e \
|
||||
's#^CONFIG_PREFIX=.*#CONFIG_PREFIX="'$PKG'/usr/share/mkinitrd/initrd-tree"#' \
|
||||
$CWD/busybox-dot-config > .config
|
||||
make oldconfig || exit 1
|
||||
make $NUMJOBS || make || exit 1
|
||||
|
||||
mkdir -p $PKG/usr/share/mkinitrd/initrd-tree/{bin,sbin}
|
||||
make install || exit 1
|
||||
rm -f $PKG/usr/share/mkinitrd/initrd-tree/linuxrc
|
||||
|
||||
# Copying additional files:
|
||||
cp -a $CWD/mkinitrd_command_generator.sh $PKG/usr/share/mkinitrd
|
||||
chown root:root $PKG/usr/share/mkinitrd/mkinitrd_command_generator.sh
|
||||
chmod 755 $PKG/usr/share/mkinitrd/mkinitrd_command_generator.sh
|
||||
cp -a $CWD/keymaps.tar.gz $PKG/usr/share/mkinitrd
|
||||
chown root:root $PKG/usr/share/mkinitrd/keymaps.tar.gz
|
||||
chmod 644 $PKG/usr/share/mkinitrd/keymaps.tar.gz
|
||||
|
||||
# Zip up the initrd-tree:
|
||||
( cd $PKG/usr/share/mkinitrd/initrd-tree
|
||||
tar xf $CWD/_initrd-tree.tar.gz
|
||||
cat $CWD/init > init
|
||||
|
||||
# Patch init:
|
||||
zcat $CWD/0001-Fix-LUKSTRIM-with-C-T-and-UUID.patch.gz | patch -p1 --verbose || exit 1
|
||||
|
||||
# These are useful for ARM:
|
||||
mknod -m 644 dev/random c 1 8
|
||||
mknod -m 644 dev/urandom c 1 9
|
||||
|
||||
tar czf ../initrd-tree.tar.gz .
|
||||
) || exit 1
|
||||
rm -rf $PKG/usr/share/mkinitrd/initrd-tree
|
||||
|
||||
# Add busybox docs:
|
||||
mkdir -p $PKG/usr/doc/busybox-$BB
|
||||
cp -a AUTHORS COPYING* INSTALL LICENSE README* TODO* \
|
||||
$PKG/usr/doc/busybox-$BB
|
||||
cp -a e2fsprogs/README $PKG/usr/doc/busybox-$BB/README.e2fsprogs
|
||||
cp -a libbb/README $PKG/usr/doc/busybox-$BB/README.libbb
|
||||
cp -a shell/README $PKG/usr/doc/busybox-$BB/README.shell
|
||||
cp -a testsuite/README $PKG/usr/doc/busybox-$BB/README.testsuite
|
||||
|
||||
mkdir -p $PKG/sbin
|
||||
cp -a $CWD/mkinitrd $PKG/sbin/mkinitrd
|
||||
chown root:root $PKG/sbin/mkinitrd
|
||||
chmod 755 $PKG/sbin/mkinitrd
|
||||
|
||||
# Patch to switch to mktemp:
|
||||
( cd $PKG/sbin ; zcat $CWD/mkinitrd.tempfile.to.mktemp.patch.gz | patch --verbose || exit 1) || exit 1
|
||||
# Patch mkinitrd to bail on no temp directory:
|
||||
( cd $PKG/sbin ; zcat $CWD/0002-bail-if-temp-dir-is-not-created.patch.gz | patch -p1 --verbose || exit 1) || exit 1
|
||||
# Don't include 40-usb_modeswitch.rules on the initrd:
|
||||
( cd $PKG/sbin ; zcat $CWD/0003-blacklist.40-usb_modeswitch.rules.patch.gz | patch -p1 --verbose || exit 1) || exit 1
|
||||
# Support modules compressed with xz:
|
||||
( cd $PKG/sbin ; zcat $CWD/0005-support-modules-compressed-with-xz.patch.gz | patch -p1 --verbose || exit 1) || exit 1
|
||||
# Ensure target directory for the module exists (cp regression workaround for coreutils-9.1):
|
||||
( cd $PKG/sbin ; zcat $CWD/0006-coreutils-9.1-ensure-target-dir-exists.patch.gz | patch -p1 --verbose || exit 1) || exit 1
|
||||
rm -f $PKG/sbin/mkinitrd.orig
|
||||
# Use -R if we detect the root partition is a partition of a RAID device:
|
||||
( cd $PKG/usr/share/mkinitrd ; zcat $CWD/0004-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch.gz | patch -p1 --verbose || exit 1) || exit 1
|
||||
rm -f $PKG/usr/share/mkinitrd/mkinitrd_command_generator.sh.orig
|
||||
# Fix for kmod-30:
|
||||
( cd $PKG/sbin ; zcat $CWD/0007-kmod30.patch.gz | patch -p1 --verbose || exit 1) || exit 1
|
||||
# Bugfix for previous RAID partition patch:
|
||||
( cd $PKG/usr/share/mkinitrd ; zcat $CWD/0008-fix-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch.gz | patch -p1 --verbose || exit 1) || exit 1
|
||||
rm -f $PKG/sbin/mkinitrd.orig
|
||||
# Don't include the 99-nfs.rules on the initrd:
|
||||
( cd $PKG/sbin ; zcat $CWD/0009-exclude-99-nfs.rules.patch.gz | patch -p1 --verbose || exit 1) || exit 1
|
||||
rm -f $PKG/sbin/mkinitrd.orig
|
||||
# Fix test for including JFS or XFS repair tools:
|
||||
( cd $PKG/sbin ; zcat $CWD/0010-fix-test-for-jfs-xfs-repair-tools.patch.gz | patch -p1 --verbose || exit 1) || exit 1
|
||||
rm -f $PKG/sbin/mkinitrd.orig
|
||||
|
||||
mkdir -p $PKG/usr/man/man{5,8}
|
||||
cat $CWD/mkinitrd.conf.5 | gzip -9c > $PKG/usr/man/man5/mkinitrd.conf.5.gz
|
||||
cat $CWD/mkinitrd.8 | gzip -9c > $PKG/usr/man/man8/mkinitrd.8.gz
|
||||
cat $CWD/mkinitrd_command_generator.8 | gzip -9c > $PKG/usr/man/man8/mkinitrd_command_generator.8.gz
|
||||
|
||||
mkdir -p $PKG/var/lib/pkgtools/setup
|
||||
cp -a $CWD/setup.01.mkinitrd $PKG/var/lib/pkgtools/setup
|
||||
chown root:root $PKG/var/lib/pkgtools/setup/setup.01.mkinitrd
|
||||
chmod 755 $PKG/var/lib/pkgtools/setup/setup.01.mkinitrd
|
||||
|
||||
mkdir -p $PKG/usr/sbin
|
||||
cp -a $CWD/geninitrd $PKG/usr/sbin
|
||||
chown root:root $PKG/usr/sbin/geninitrd
|
||||
chmod 755 $PKG/usr/sbin/geninitrd
|
||||
|
||||
mkdir -p $PKG/etc
|
||||
cp -a $CWD/mkinitrd.conf.sample $PKG/etc/mkinitrd.conf.sample
|
||||
# ARM systems often need more time to find devices:
|
||||
case "$( uname -m )" in
|
||||
arm*) sed -e 's@#WAIT="1"@#WAIT="4"@g' \
|
||||
-i $PKG/etc/mkinitrd.conf.sample;;
|
||||
esac
|
||||
chown root:root $PKG/etc/mkinitrd.conf.sample
|
||||
chmod 644 $PKG/etc/mkinitrd.conf.sample
|
||||
mkdir -p $PKG/etc/default
|
||||
cp -a $CWD/geninitrd.default $PKG/etc/default/geninitrd.new
|
||||
chown root:root $PKG/etc/default/geninitrd.new
|
||||
chmod 644 $PKG/etc/default/geninitrd.new
|
||||
|
||||
mkdir -p $PKG/usr/doc/mkinitrd-$VERSION
|
||||
sed $CWD/README.initrd \
|
||||
-e "s,@DATE@,$(date),g" \
|
||||
-e "s,@KERNEL_VERSION@,$(uname -r),g" \
|
||||
-e "s,@PACKAGE_VERSION@,$(uname -r | tr - _),g" \
|
||||
-e "s,@LILO_KERNEL_NAME@,$(echo $(uname -r) | tr -d . | tr -d - ),g" \
|
||||
-e "s,@MKINITRD_VERSION@,$VERSION,g" \
|
||||
-e "s,@ARCH@,$ARCH,g" \
|
||||
-e "s,@BUILD@,$BUILD,g" \
|
||||
> $PKG/usr/doc/mkinitrd-$VERSION/README.initrd
|
||||
|
||||
mkdir $PKG/boot
|
||||
ln -sf /usr/doc/mkinitrd-$VERSION/README.initrd $PKG/boot/README.initrd
|
||||
|
||||
find $PKG | xargs file | grep -e "executable" -e "shared object" \
|
||||
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $TMP/mkinitrd-$VERSION-$ARCH-$BUILD.txz
|
265
testing/source/mkinitrd/mkinitrd.conf.5
Normal file
265
testing/source/mkinitrd/mkinitrd.conf.5
Normal file
|
@ -0,0 +1,265 @@
|
|||
.\" mkinitrd.conf.5 Robby Workman <rworkman@slackware.com>
|
||||
.\" 28 August 2010 "
|
||||
|
||||
.TH MKINITRD.CONF 5 "25 April 2022" "Slackware 15.0"
|
||||
.SH NAME
|
||||
.B mkinitrd.conf(5)
|
||||
.SH SYNOPSIS
|
||||
.B mkinitrd.conf - optional configuration file for
|
||||
.I mkinitrd(8)
|
||||
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.I mkinitrd.conf
|
||||
file contains options to be passed to
|
||||
.I mkinitrd(8)
|
||||
on every run if mkinitrd is executed with the -F flag.
|
||||
.br
|
||||
It is intended as a fast and easy way for the system administrator to
|
||||
pass options to mkinitrd without having to type them on each execution.
|
||||
|
||||
Options passed to
|
||||
.I mkinitrd(8)
|
||||
on the command line will override any
|
||||
values set in the config file.
|
||||
|
||||
.SH OPTIONS AND SYNTAX
|
||||
|
||||
All options are in the format of OPTION="value"
|
||||
.br
|
||||
Unset variables have no effect.
|
||||
|
||||
.TP 5
|
||||
.I SOURCE_TREE
|
||||
This is the location for the initrd's source tree.
|
||||
.br
|
||||
Defaults to "/boot/initrd-tree"
|
||||
|
||||
.TP 5
|
||||
.I CLEAR_TREE
|
||||
This option specifies whether to clear the initrd source tree prior to
|
||||
creating the initrd.
|
||||
.br
|
||||
This requires a value of either "0" or "1" where 0=no and 1=yes
|
||||
.br
|
||||
Examples:
|
||||
.br
|
||||
CLEAR_TREE="0" # Do not clear initrd tree first
|
||||
.br
|
||||
CLEAR_TREE="1" # Clear initrd tree first
|
||||
|
||||
It is recommended to leave this unset and pass "-c" on the command line
|
||||
when clearing the tree is desired. Clearing the tree is not desirable
|
||||
if you wish to build support for more than one kernel into the initrd
|
||||
image.
|
||||
|
||||
.TP 5
|
||||
.I OUTPUT_IMAGE
|
||||
This is the location for the initrd image that is created.
|
||||
.br
|
||||
Defaults to "/boot/initrd.gz"
|
||||
.br
|
||||
If %KVER% and/or %SLACKVER% are present in the string, they will be replaced
|
||||
with $KERNEL_VERSION (e.g. "4.4.75-smp") and Slackware Version (e.g. "14.2")
|
||||
respectively in the name of the generated file.
|
||||
|
||||
.TP 5
|
||||
.I KERNEL_VERSION
|
||||
This is the kernel version for which the initrd should be created.
|
||||
.br
|
||||
Defaults to "$(uname -r)"
|
||||
|
||||
.TP 5
|
||||
.I KEYMAP
|
||||
This is the custom keyboard map that should be loaded instead of the
|
||||
default 'us' keymap.
|
||||
.br
|
||||
The file /usr/share/mkinitrd/keymaps.tar.gz contains all possible keymaps
|
||||
to choose from (omit the '.bmap' extension in the mkinitrd command)
|
||||
.br
|
||||
Example: KEYMAP="nl"
|
||||
|
||||
.TP 5
|
||||
.I MODULE_LIST
|
||||
This should be a colon-separated list of modules you wish to be included
|
||||
in the initrd image.
|
||||
.br
|
||||
Example: MODULE_LIST="ext3:mbcache:jbd"
|
||||
|
||||
If you have loadtime options that you need to specify when loading kernel
|
||||
modules, those can be added here as well.
|
||||
.br
|
||||
Example: MODULE_LIST="module1:module2 option=1:module3"
|
||||
|
||||
.TP 5
|
||||
.I LUKSDEV
|
||||
Contains a colon (:) delimited list of luks encrypted block devices to be
|
||||
unlocked by the initrd using cryptsetup. The list may include any of: device
|
||||
node path, UUID, or LABEL. All devices that must be unlocked in order to
|
||||
access the root filesystem must be specified.
|
||||
.sp
|
||||
Example: LUKSDEV="/dev/sda2:/dev/sda3"
|
||||
.br
|
||||
Example: LUKSDEV="UUID=ec6dea40-c8d8-4590-850a-a757be60e45a"
|
||||
.br
|
||||
Example: LUKSDEV="LABEL=darkstar"
|
||||
|
||||
Each unlocked device will be assigned an automatically generated luks device
|
||||
name of the form luks<device> where '<device>' will be the basename of the
|
||||
encrypted device. e.g.
|
||||
|
||||
/dev/mapper/lukssda2
|
||||
|
||||
As a convenience to users, if
|
||||
.I ROOTDEV
|
||||
(see below) specifies one of the device names listed in the
|
||||
.I LUKSDEV
|
||||
option, then it will be automatically adjusted to use the correct luks
|
||||
device name. i.e. when specifying
|
||||
.I "LUKSDEV=/dev/sda2"
|
||||
then
|
||||
.I "ROOTDEV=/dev/sda2"
|
||||
and
|
||||
.I "ROOTDEV=/dev/mapper/lukssda2"
|
||||
are equivalent.
|
||||
|
||||
.TP 5
|
||||
.I LUKSKEY
|
||||
When using cryptsetup to encrypt your partition, you can use a keyfile instead
|
||||
of a passphrase to unlock the LUKS volume. The LUKSKEY variable holds the
|
||||
filename of a keyfile, as well as the label (or uuid) of the partition this
|
||||
file is on. This way, you can unlock your computer automatically if you have a
|
||||
USB stick with your LUKS key inserted at boot. A passphrase will still be asked
|
||||
if the LUKS key can not be found.
|
||||
.br
|
||||
For example, if your USB thumb drive has a FAT partition with label
|
||||
"TRAVELSTICK" and the actual keyfile is called "/keys/alien.luks", then
|
||||
you need to set:
|
||||
.br
|
||||
LUKSKEY="LABEL=TRAVELSTICK:/keys/alien.luks"
|
||||
|
||||
.TP 5
|
||||
.I LUKSTRIM
|
||||
Contains a colon (:) delimited list of luks encrypted block devices to be
|
||||
passed the "--allow-discards" option when unlocked by the initrd using
|
||||
cryptsetup. This has the effect of allowing TRIM on SSD drives. Be sure
|
||||
your SSD supports this feature (correctly) before enabling it.
|
||||
.br
|
||||
See fstrim(8) for more information.
|
||||
.br
|
||||
Example: LUKSTRIM="/dev/sda2:/dev/sda4"
|
||||
|
||||
.TP 5
|
||||
.I ROOTDEV
|
||||
The device on which your root filesystem is located.
|
||||
May be a device node path, UUID, or LABEL. See LUKSDEV examples.
|
||||
.br
|
||||
Example: ROOTDEV="/dev/sda2"
|
||||
|
||||
If you are using cryptsetup and an encrypted root filesystem, be sure to
|
||||
read the option above for LUKSDEV or Bad Things will happen.
|
||||
|
||||
.TP 5
|
||||
.I ROOTFS
|
||||
The filesystem type of your root filesystem
|
||||
.br
|
||||
Example: ROOTFS="ext3"
|
||||
|
||||
.TP 5
|
||||
.I RAID
|
||||
This option adds the mdadm binary to the initrd to support RAID.
|
||||
Additional modules may be required, depending on your kernel
|
||||
configuration. If you wish to add LVM support to the initrd, then
|
||||
set this to 1; otherwise, leave it unset or set it to 0.
|
||||
.br
|
||||
Examples:
|
||||
.br
|
||||
RAID="0" # Do not add RAID support to initrd
|
||||
.br
|
||||
RAID="1" # Add RAID support to initrd
|
||||
|
||||
.TP 5
|
||||
.I LVM
|
||||
This option adds support for LVM partitions into the initrd.
|
||||
If you wish to add LVM support to the initrd, then set this to 1;
|
||||
otherwise, leave it unset or set it to 0.
|
||||
.br
|
||||
Examples:
|
||||
.br
|
||||
LVM="0" # Do not add LVM support to initrd
|
||||
.br
|
||||
LVM="1" # Add LVM support to initrd
|
||||
|
||||
.TP 5
|
||||
.I UDEV
|
||||
Use UDEV in the initrd.
|
||||
.br
|
||||
Examples:
|
||||
.br
|
||||
UDEV="0" # Do not use udev in the initrd
|
||||
.br
|
||||
UDEV="1" # Use udev in the initrd (this is the default)
|
||||
|
||||
.TP 5
|
||||
.I WAIT
|
||||
This defines the time to wait, in seconds, until all disks are detected.
|
||||
.br
|
||||
This is useful for allowing extra time that might be needed for slow usb disks or systems with large amounts of storage to become ready.
|
||||
.br
|
||||
If not defined, the default is 1 second.
|
||||
|
||||
.TP 5
|
||||
.I RESUMEDEV
|
||||
The swap partition holding your hibernation image.
|
||||
.br
|
||||
Example: RESUMEDEV="/dev/sda2"
|
||||
|
||||
.TP 5
|
||||
.I MODCONF
|
||||
This option defines whether to copy the module-init-tools config files
|
||||
from /etc/modprobe.d/ into the initrd. This will not usually be necessary,
|
||||
but if you need certain modules to be loaded with special options, and you
|
||||
have this configured in a file in /etc/modprobe.d/, this is one way to
|
||||
accomplish the desired goal.
|
||||
.br
|
||||
Examples:
|
||||
.br
|
||||
MODCONF="0" # Do not add /etc/modprobe.d/* to the initrd
|
||||
.br
|
||||
MODCONF="1" # Add /etc/modprobe.d/* to the initrd
|
||||
|
||||
.TP 5
|
||||
.I MICROCODE_ARCH
|
||||
This option specifies a cpio archive containing updated microcode for your CPU.
|
||||
CPU manufacturers occasionally release such updates to fix bugs in the microcode
|
||||
currently embedded in the CPU. The microcode archive will be prepended to the
|
||||
output initrd, where the kernel will find it for early patching.
|
||||
.br
|
||||
Examples:
|
||||
.br
|
||||
MICROCODE_ARCH="/boot/intel-ucode.cpio"
|
||||
|
||||
.TP 5
|
||||
.I MOUNT_LIST
|
||||
Lists additional filesystems to be mounted by initrd. Useful if libraries or
|
||||
commands that are outside root filesystem are needed in early boot. Multiple
|
||||
filesystems can be listed separated by colon (:). Device, filesystem type and
|
||||
options are copied from /etc/fstab.
|
||||
.br
|
||||
Example:
|
||||
.br
|
||||
MOUNT_LIST="/usr:/usr/local"
|
||||
|
||||
.SH FILES
|
||||
.I /etc/mkinitrd.conf
|
||||
.br
|
||||
See /etc/mkinitrd.conf.sample
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR mkinitrd "(8)"
|
||||
|
||||
.SH BUGS
|
||||
None known :-)
|
||||
|
||||
.SH MISCELLANEOUS
|
||||
Support for mkinitrd.conf was added in mkinitrd-1.3.0
|
21
testing/source/mkinitrd/mkinitrd.conf.sample
Normal file
21
testing/source/mkinitrd/mkinitrd.conf.sample
Normal file
|
@ -0,0 +1,21 @@
|
|||
# mkinitrd.conf.sample
|
||||
# See "man mkinitrd.conf" for details on the syntax of this file
|
||||
#
|
||||
#SOURCE_TREE="/boot/initrd-tree"
|
||||
#CLEAR_TREE="0"
|
||||
#OUTPUT_IMAGE="/boot/initrd.gz"
|
||||
#KERNEL_VERSION="$(uname -r)"
|
||||
#KEYMAP="us"
|
||||
#MODULE_LIST="ext4"
|
||||
#LUKSDEV="/dev/sda2"
|
||||
#LUKSTRIM="/dev/sda2" # verify support with 'hdparm -I $dev | grep TRIM'
|
||||
#LUKSKEY="LABEL=TRAVELSTICK:/keys/alienbob.luks"
|
||||
#ROOTDEV="/dev/sda1"
|
||||
#ROOTFS="ext4"
|
||||
#RESUMEDEV="/dev/sda2"
|
||||
#RAID="0"
|
||||
#LVM="0"
|
||||
#UDEV="1"
|
||||
#MODCONF="0"
|
||||
#MICROCODE_ARCH="/boot/intel-ucode.cpio"
|
||||
#WAIT="1"
|
19
testing/source/mkinitrd/mkinitrd.tempfile.to.mktemp.patch
Normal file
19
testing/source/mkinitrd/mkinitrd.tempfile.to.mktemp.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
From bbeb9d73191c1c79f5286fd3b1fdb5611fb11301 Mon Sep 17 00:00:00 2001
|
||||
From: "Patrick J. Volkerding" <volkerdi@slackware.com>
|
||||
Date: Sun Apr 26 18:51:23 CDT 2020
|
||||
Subject: [PATCH] Switch from tempfile to mktemp
|
||||
|
||||
Use the standard mktemp utility from GNU coreutils rather than the
|
||||
lesser-known tempfile utility from Debian of yore.
|
||||
|
||||
--- mkinitrd.orig 2019-09-04 23:37:08.000000000 -0500
|
||||
+++ mkinitrd 2020-04-26 18:46:22.352636100 -0500
|
||||
@@ -235,7 +235,7 @@
|
||||
|
||||
# Then copy all remaining libs our initrd files link against:
|
||||
COUNT=1
|
||||
- PRFX=$(tempfile --prefix ldd-)
|
||||
+ PRFX=$(mktemp --suffix -ldd)
|
||||
TMPFILE=${PRFX}${COUNT}
|
||||
|
||||
find $SOURCE_TREE -type f -exec ldd {} 2>/dev/null \; | unify_libs > $TMPFILE
|
187
testing/source/mkinitrd/mkinitrd_command_generator.8
Normal file
187
testing/source/mkinitrd/mkinitrd_command_generator.8
Normal file
|
@ -0,0 +1,187 @@
|
|||
'\" t
|
||||
.\" Title: mkinitrd_command_generator
|
||||
.\" Author: Eric Hameleers
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2016-02-07
|
||||
.\" Manual: Slackware Tools
|
||||
.\" Source: http://www.slackware.com 1.40
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "MKINITRD_COMMAND_GEN" "8" "2016-02-07" "http://www\&.slackware\&.com" "Slackware Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
mkinitrd_command_generator \- mkinitrd the easy way
|
||||
.SH "SYNOPSIS"
|
||||
.sp
|
||||
.nf
|
||||
mkinitrd_command_generator\&.sh [ \fIoptions\fR ] [ \fIkernel_filename\fR ]
|
||||
.fi
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\fB\-a \fR\fB\fIadditional params\fR\fR
|
||||
.RS 4
|
||||
Additional parameters to pass to mkinitrd\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-c | \-\-conf\fR
|
||||
.RS 4
|
||||
Show a suitable mkinitrd configuration file\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-h | \-\-help\fR
|
||||
.RS 4
|
||||
Show this help\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-i | \-\-interactive\fR
|
||||
.RS 4
|
||||
Navigate through menus instead of using commandline arguments\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-longhelp\fR
|
||||
.RS 4
|
||||
Show more detailed information/examples\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-k \fR\fB\fIkernelversion\fR\fR
|
||||
.RS 4
|
||||
Use specific kernel version\&. This may also be a colon-delimited list of kernel versions to use\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-m \fR\fB\fIadditional mods\fR\fR
|
||||
.RS 4
|
||||
Additional modules to pass to mkinitrd, separated by colons (:)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-l | \-\-lilo\fR
|
||||
.RS 4
|
||||
Only show lilo\&.conf section (requires a kernel_filename)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-r | \-\-run\fR
|
||||
.RS 4
|
||||
Only show
|
||||
\fImkinitrd\fR
|
||||
command\&.
|
||||
.RE
|
||||
.SH "DESCRIPTION"
|
||||
.sp
|
||||
This script is useful in situations where you require an initrd image to boot your computer\&.
|
||||
.sp
|
||||
For instance, when booting a kernel that does not have support for your storage or root filesystem built in (such as the Slackware \fIgeneric\fR kernels)\&.
|
||||
.sp
|
||||
When you run the script without parameters, it will examine your running system, your current kernel version and will output an example of a \fImkinitrd\fR commandline that you can use to generate an initrd image containing enough driver support to boot the computer\&.
|
||||
.sp
|
||||
You can make it more specific: when you add the filename of a kernel as parameter to the script, it will determine the kernel version from that kernel, and also give an example of the lines that you should add to your \fI/etc/lilo\&.conf\fR file\&.
|
||||
.sp
|
||||
If you want your initrd image to have a custom name instead of the default \fI/boot/initrd\&.gz\fR you can add it as another parameter to the script, as follows:
|
||||
.sp
|
||||
mkinitrd_command_generator\&.sh \-a "\-o \fI/boot/custom\&.gz\fR"
|
||||
.sp
|
||||
The arguments to the \fI\-a\fR parameter will be used as additional arguments to the \fImkinitrd\fR command\&.
|
||||
.sp
|
||||
If you need additional modules in the initrd image, apart from what the script determines, you can pass then to the script using the \fI\-m\fR parameter as follows:
|
||||
.sp
|
||||
mkinitrd_command_generator\&.sh \-m "uhci\-hcd:usbhid:hid:hid\-generic"
|
||||
.sp
|
||||
The above example adds support for USB keyboards to the initrd \- you may need that if you have encrypted your root partition and need to enter a passphrase using a USB keyboard\&.
|
||||
.sp
|
||||
Instead of copying and pasting the script\(cqs output, you can create an initrd by directly executing the output, like in this example:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
$(mkinitrd_command_generator\&.sh \-\-run /boot/vmlinuz\-generic\-4\&.4\&.1)
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.sp
|
||||
That used the \fI\-r\fR or \fI\-\-run\fR switch to make the script only write the \fImkinitrd\fR commandline to the terminal\&.
|
||||
.sp
|
||||
When you want to add a section for a specific kernel to \fI/etc/lilo\&.conf\fR directly, use the \fI\-l\fR or \fI\-\-lilo\fR switch and use a command like in this example:
|
||||
.sp
|
||||
mkinitrd_command_generator\&.sh \-\-lilo /boot/vmlinuz\-generic\-smp\-4\&.4\&.1 >>/etc/lilo\&.conf
|
||||
.sp
|
||||
That command will result in the following lines being added to your \fI/etc/lilo\&.conf\fR file (example for my hardware):
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\fI# Linux bootable partition config begins\fR
|
||||
\fI# initrd created with \*(Aqmkinitrd \-c \-k 4\&.4\&.1 \-m mbcache:jbd2:ext4 \-f ext4 \-r /dev/sda7 \-u \-o /boot/initrd\&.gz\fR\*(Aq
|
||||
image = /boot/vmlinuz\-generic\-4\&.4\&.1
|
||||
initrd = /boot/initrd\&.gz
|
||||
root = /dev/sda7
|
||||
label = 4\&.4\&.1
|
||||
read\-only
|
||||
\fI# Linux bootable partition config ends\fR
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.sp
|
||||
The last two examples show how easy it is to configure your computer for the use of an initrd if you need one\&. The only thing left to do afterwards is running \fIlilo\fR\&.
|
||||
.SH "EXIT STATUS"
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\fB0\fR Success
|
||||
\fB1\fR Failure
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.SH "FILES"
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
/usr/share/mkinitrd/mkinitrd_command_generator\&.sh
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.SH "BUGS"
|
||||
.sp
|
||||
Report bugs to Eric Hameleers <alien@slackware\&.com>
|
||||
.SH "SEE ALSO"
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
mkinitrd(1), lilo\&.conf(1)
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBEric Hameleers\fR
|
||||
.RS 4
|
||||
Author.
|
||||
.RE
|
892
testing/source/mkinitrd/mkinitrd_command_generator.sh
Normal file
892
testing/source/mkinitrd/mkinitrd_command_generator.sh
Normal file
|
@ -0,0 +1,892 @@
|
|||
#!/bin/sh
|
||||
# $Id: mkinitrd_command_generator.sh,v 1.45 2011/02/17 09:27:05 eha Exp eha $
|
||||
# Copyright 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
|
||||
# Copyright 2008, 2009, 2010, 2011 Eric Hameleers, Eindhoven, Netherlands
|
||||
# Contact: <alien@slackware.com>
|
||||
# Copyright 2008, 2009 PiterPUNK, Sao Paulo, SP, Brazil
|
||||
# Contact: <piterpunk@slackware.com>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for
|
||||
# any purpose with or without fee is hereby granted, provided that
|
||||
# the above copyright notice and this permission notice appear in all
|
||||
# copies.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
# -----------------------------------------------------------------------------
|
||||
#
|
||||
# Create an initrd which fits the system.
|
||||
# Take into account the use of LVM/LUKS/RAID.
|
||||
# Find out about any hardware drivers the system may need in an initrd when
|
||||
# booting from a generic lightweight kernel.
|
||||
#
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# The script's revision number will be displayed in the help text:
|
||||
REV=$( echo "$Revision: 1.45 $" | cut -d' ' -f2 )
|
||||
|
||||
# Define some essential parameter values:
|
||||
USING_LVM=""
|
||||
USING_LUKS=""
|
||||
USING_RAID=""
|
||||
MLIST=""
|
||||
REALDEV="" # The device that contains the LUKS volume
|
||||
BASEDEV="" # Lowest level device (raw block device or RAID volume)
|
||||
|
||||
FSTAB=${FSTAB:-"/etc/fstab"} # so we can test with alternate fstab files
|
||||
|
||||
# These are needed by -c and -i options:
|
||||
SOURCE_TREE=${SOURCE_TREE:-"/boot/initrd-tree"}
|
||||
CLEAR_TREE=${CLEAR_TREE:-1}
|
||||
KEYMAP=${KEYMAP:-"us"}
|
||||
UDEV=${UDEV:-1}
|
||||
# ARM devices need more time:
|
||||
case "$( uname -m )" in
|
||||
arm*) WAIT_DEFAULT=4;;
|
||||
*) WAIT_DEFAULT=1;;
|
||||
esac
|
||||
WAIT=${WAIT:-$WAIT_DEFAULT}
|
||||
|
||||
# A basic explanation of the commandline parameters:
|
||||
basic_usage() {
|
||||
cat <<-EOT
|
||||
|
||||
*** $(basename $0) revision $REV ***
|
||||
Usage:
|
||||
$(basename $0) [ options ] [ kernel_filename ]
|
||||
Options:
|
||||
-a <"additional params"> Additional parameters to pass to mkinitrd.
|
||||
-c | --conf Show a suitable mkinitrd configuration file.
|
||||
-h | --help Show this help.
|
||||
-i | --interactive Navigate through menus instead of using
|
||||
commandline arguments.
|
||||
--longhelp Show more detailed information/examples.
|
||||
-k <kernelversion> Use specific kernel version. Or, support
|
||||
more than one kernel version by passing a
|
||||
list of versions separated by colons (:).
|
||||
-m <"additional mods"> Additional modules to pass to mkinitrd,
|
||||
separated by colons (:).
|
||||
-l | --lilo Only show lilo.conf section
|
||||
(requires a kernel_filename).
|
||||
-r | --run Only show 'mkinitrd' command.
|
||||
EOT
|
||||
}
|
||||
|
||||
# More of a tutorial here:
|
||||
extended_usage() {
|
||||
cat <<-EOT
|
||||
|
||||
This script is useful in situations where you require an initrd image
|
||||
to boot your computer.
|
||||
For instance, when booting a kernel that does not have support for your
|
||||
storage or root filesystem built in (such as the Slackware 'generic'
|
||||
kernels').
|
||||
|
||||
* When you run the script without parameters, it will examine your
|
||||
running system, your current kernel version and will output an example
|
||||
of a 'mkinitrd' commandline that you can use to generate an initrd
|
||||
image containing enough driver support to boot the computer.
|
||||
|
||||
* You can make it more specific: when you add the filename of a kernel
|
||||
as parameter to the script, it will determine the kernel version from
|
||||
that kernel, and also give an example of the lines that you should add
|
||||
to your '/etc/lilo.conf' file.
|
||||
|
||||
* If you want your initrd image to have a custom name instead of the
|
||||
default '/boot/initrd.gz' you can add it as another parameter to the
|
||||
script, as follows:
|
||||
|
||||
$(basename $0) -a "-o /boot/custom.gz"
|
||||
|
||||
The arguments to the '-a' parameter will be used as additional arguments
|
||||
to the 'mkinitrd' command.
|
||||
|
||||
* If you need additional modules in the initrd image, apart from what
|
||||
the script determines, you can pass then to the script using the '-m'
|
||||
parameter as follows:
|
||||
|
||||
$(basename $0) -m "uhci-hcd:usbhid:hid_generic"
|
||||
|
||||
The above example adds support for USB keyboards to the initrd - you
|
||||
may need that if you have encrypted your root partition and need to
|
||||
enter a passphrase using a USB keyboard.
|
||||
|
||||
* Instead of copying and pasting the script's output, you can create
|
||||
an initrd by directly executing the output, like in this example:
|
||||
|
||||
EOT
|
||||
|
||||
echo " \$($(basename $0) --run /boot/vmlinuz-generic-smp-2.6.35.11-smp)"
|
||||
|
||||
cat <<-EOT
|
||||
|
||||
That used the '-r' or '--run' switch to make the script only write
|
||||
the 'mkinitrd' commandline to the terminal.
|
||||
|
||||
* When you want to add a section for a specific kernel to
|
||||
'/etc/lilo.conf' directly, use the '-l' or '--lilo' switch and use a
|
||||
command like in this example:
|
||||
|
||||
EOT
|
||||
|
||||
echo " $(basename $0) --lilo /boot/vmlinuz-generic-smp-2.6.35.11-smp >>/etc/lilo.conf"
|
||||
|
||||
cat <<-EOT
|
||||
|
||||
That command will result in the following lines being added to your
|
||||
'/etc/lilo.conf' file (example for my hardware):
|
||||
|
||||
# Linux bootable partition config begins
|
||||
# initrd created with 'mkinitrd -c -k 2.6.35.11-smp -m ata_generic:pata_amd:mbcache:jbd:ext3 -f ext3 -r /dev/hda7'
|
||||
image = /boot/vmlinuz-generic-smp-2.6.35.11-smp
|
||||
initrd = /boot/initrd.gz
|
||||
root = /dev/hda7
|
||||
label = 2.6.35.11-smp
|
||||
read-only
|
||||
# Linux bootable partition config ends
|
||||
|
||||
The last two examples show how easy it is to configure your computer
|
||||
for the use of an initrd if you need one. The only thing left to do
|
||||
afterwards is running 'lilo'.
|
||||
|
||||
EOT
|
||||
}
|
||||
|
||||
# Find the device that holds the root partition:
|
||||
get_root_device() {
|
||||
if [ -e $FSTAB ]; then
|
||||
RD=$(cat $FSTAB |tr '\t' ' ' |grep -v '^ *#' |tr -s ' ' |grep ' / ' |cut -f1 -d' ')
|
||||
if [ "$(echo $RD | cut -f1 -d=)" = "LABEL" -o "$(echo $RD | cut -f1 -d=)" = "UUID" -o "$(echo $RD | cut -f1 -d=)" = "PARTUUID" ]; then
|
||||
DKEY=$(echo $RD | cut -f1 -d=)
|
||||
# The value can be LABEL=foo or LABEL='foo' or LABEL="foo"
|
||||
DVAL=$(echo $RD | cut -f2 -d= | tr -d "'\042")
|
||||
RD=$(/sbin/blkid --match-token $DKEY=$DVAL --list-one --output device)
|
||||
fi
|
||||
else
|
||||
RD=$(grep -m1 "^/dev/.*[[:blank:]]/[[:blank:]]" /proc/mounts | cut -f1 -d' ')
|
||||
fi
|
||||
echo $RD
|
||||
}
|
||||
|
||||
# Get the root fs information:
|
||||
get_rootfs_type() {
|
||||
if $(type blkid 1>/dev/null 2>&1) ; then
|
||||
blkid -s TYPE -o value $ROOTDEV
|
||||
elif $(type vol_id 1>/dev/null 2>&1) ; then
|
||||
vol_id $ROOTDEV | grep ID_FS_TYPE | cut -f2 -d=
|
||||
else
|
||||
# As a fallback, use:
|
||||
cat $FSTAB |tr '\t' ' ' |grep -v '^ *#' |tr -s ' ' |grep ' / ' |cut -f3 -d' '
|
||||
fi
|
||||
}
|
||||
|
||||
# Add the module(s) needed for the root filesystem:
|
||||
add_rootfs_module() {
|
||||
local FSMOD
|
||||
FSMOD=$(/sbin/modprobe --set-version $KVER --show-depends ${ROOTFS} 2>/dev/null | while read LINE; do
|
||||
echo $(basename $(echo $LINE | cut -d' ' -f2) .ko )
|
||||
done)
|
||||
if [ -n "$FSMOD" ]; then
|
||||
[ -n "$MLIST" ] && echo "$MLIST:$(echo $FSMOD | tr ' ' ':')" \
|
||||
|| echo $FSMOD | tr ' ' ':'
|
||||
fi
|
||||
}
|
||||
|
||||
# Determine the list of kernel modules needed to support the root device:
|
||||
determine_blockdev_drivers() {
|
||||
# Walk the /sys tree to find kernel modules that are
|
||||
# required for our storage devices.
|
||||
# Thanks to PiterPUNK for help with this code.
|
||||
local MLIST
|
||||
MLIST=$(for i in $(find /sys/block/*/ -name "device" -print0 | xargs -0 -i'{}' readlink -f '{}' | sort -u); do
|
||||
/sbin/udevadm info --query=all --path=$i --attribute-walk | \
|
||||
sed -ne 's/^[[:blank:]]\+DRIVER[S]*=="\([^"]\+\)"$/\1/p' | \
|
||||
sed -e 's/^mmcblk$/mmc_block/' | \
|
||||
xargs -I@ /sbin/modprobe --set-version $KVER --show-depends @ \
|
||||
2>/dev/null | grep -v "builtin " | \
|
||||
while read LINE ; do
|
||||
echo $(basename $(echo $LINE | cut -d' ' -f2) .ko )
|
||||
done
|
||||
done)
|
||||
MLIST=$( echo $MLIST | tr ' ' ':' )
|
||||
echo $MLIST
|
||||
}
|
||||
|
||||
# Search for USB keyboards:
|
||||
function add_usb_keyboard() {
|
||||
local USBMOD
|
||||
if cat /proc/bus/input/devices | sed -e 's/^$/\$/g' | \
|
||||
tr "\n$" " \n" | grep -q " Phys=.*usb.* .*Handlers=.*kbd.*B:"; then
|
||||
USBMOD="xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-asus:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch"
|
||||
[ -n "$MLIST" ] && MLIST="$MLIST:$USBMOD" \
|
||||
|| MLIST="$USBMOD"
|
||||
fi
|
||||
echo $MLIST
|
||||
}
|
||||
|
||||
# Determine what USB Host Controller is in use
|
||||
function add_usb_hcd() {
|
||||
local USBMOD
|
||||
for i in $(ls -Ld /sys/module/*_hcd/drivers/* 2> /dev/null); do
|
||||
if ls -L $i | grep -q "[0-9a-f]*:" ; then
|
||||
USBMOD=$( echo $i | cut -f4 -d/ | tr "_" "-")
|
||||
[ -n "$MLIST" ] && MLIST="$MLIST:$USBMOD" \
|
||||
|| MLIST="$USBMOD"
|
||||
fi
|
||||
done
|
||||
echo $MLIST
|
||||
}
|
||||
|
||||
# Is the root partition on a (combination of) LVM/LUKS volume?
|
||||
check_luks_lvm_raid() {
|
||||
if $( lvdisplay -c $ROOTDEV 1>/dev/null 2>/dev/null ); then
|
||||
# Our root partition is on a LV:
|
||||
USING_LVM=1
|
||||
# Search the Physical Volume of our Logical Volume:
|
||||
MYVG=$( echo $(lvdisplay -c $ROOTDEV 2>/dev/null) | cut -d: -f2 )
|
||||
for LINE in $(pvdisplay -c) ; do
|
||||
VG=$(echo $LINE | cut -d: -f2)
|
||||
[ "$VG" = "$MYVG" ] && break
|
||||
done
|
||||
PV=$(echo $LINE | cut -d: -f1)
|
||||
# Check if there is a LUKS device underneath:
|
||||
if $( cryptsetup status $PV 1>/dev/null 2>/dev/null ) ; then
|
||||
# Our root partition's LV is on a LUKS volume:
|
||||
USING_LUKS=1
|
||||
REALDEV=$( cryptsetup status $PV | grep 'device: ' | tr -d ' ' | cut -d: -f2 )
|
||||
BASEDEV=$REALDEV
|
||||
else
|
||||
BASEDEV=$PV
|
||||
fi
|
||||
elif $( cryptsetup status $ROOTDEV 1>/dev/null 2>/dev/null ) ; then
|
||||
# Our root device is on a LUKS volume:
|
||||
USING_LUKS=1
|
||||
REALDEV=$( cryptsetup status $ROOTDEV | grep 'device: ' | tr -d ' ' | cut -d: -f2 )
|
||||
ROOTDEV=$(basename $ROOTDEV)
|
||||
# Check for LVM:
|
||||
for LV in $(lvdisplay -c 2>/dev/null | tr -d ' ' | cut -f1 -d:) ; do
|
||||
# Note: cryptsetup shows the real device, whereas
|
||||
# lvdisplay requires the /dev/<myvg>/... symlink to the real device.
|
||||
if [ "$(readlink $LV)" = "$REALDEV" ]; then
|
||||
REALDEV=$LV
|
||||
break
|
||||
fi
|
||||
done
|
||||
if $( lvdisplay -c $REALDEV 1>/dev/null 2>/dev/null ); then
|
||||
# Our root partition's LUKS device is on a LV:
|
||||
USING_LVM=1
|
||||
# Search the Physical Volume of our Logical Volume:
|
||||
MYVG=$( echo $(lvdisplay -c $REALDEV 2>/dev/null) | cut -d: -f2 )
|
||||
for LINE in $(pvdisplay -c) ; do
|
||||
VG=$(echo $LINE | cut -d: -f2)
|
||||
[ "$VG" = "$MYVG" ] && break
|
||||
done
|
||||
PV=$(echo $LINE | cut -d: -f1)
|
||||
BASEDEV=$PV
|
||||
else
|
||||
BASEDEV=$REALDEV
|
||||
fi
|
||||
else
|
||||
BASEDEV=$ROOTDEV
|
||||
fi
|
||||
|
||||
# Finally, we should check if base device is
|
||||
# a real block device or a RAID volume:
|
||||
for MD in $(cat /proc/mdstat | grep -w active | cut -d' ' -f1) ; do
|
||||
if [ "$BASEDEV" = "/dev/$MD" ]; then
|
||||
USING_RAID=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Before we start
|
||||
[ -x /bin/id ] && CMD_ID="/bin/id" || CMD_ID="/usr/bin/id"
|
||||
if [ "$($CMD_ID -u)" != "0" ]; then
|
||||
echo "You need to be root to run $(basename $0)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Parse the commandline parameters:
|
||||
while [ ! -z "$1" ]; do
|
||||
case $1 in
|
||||
--longhelp)
|
||||
basic_usage
|
||||
extended_usage
|
||||
exit 0
|
||||
;;
|
||||
-a)
|
||||
MKINIT_PARAMS="$2"
|
||||
shift 2
|
||||
;;
|
||||
-c|--conf)
|
||||
[ -n "$EMIT" ] && { echo "Do not mix incompatible parameters!"; exit 1; }
|
||||
EMIT="conf"
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
basic_usage
|
||||
exit 0
|
||||
;;
|
||||
-i|--interactive)
|
||||
INTERACTIVE=1
|
||||
shift
|
||||
;;
|
||||
-k)
|
||||
if [ "$2" = "" ]; then
|
||||
echo "Error: -k requires a kernel version."
|
||||
exit 1
|
||||
fi
|
||||
KVERLIST=$2
|
||||
shift 2
|
||||
;;
|
||||
-m)
|
||||
MKINIT_MODS=$2
|
||||
shift 2
|
||||
;;
|
||||
-l|--lilo)
|
||||
[ -n "$EMIT" ] && { echo "Do not mix incompatible parameters!"; exit 1; }
|
||||
EMIT="lilo"
|
||||
shift
|
||||
;;
|
||||
-L|--fromlilo)
|
||||
FROMLILO=1
|
||||
shift
|
||||
;;
|
||||
-r|--run)
|
||||
[ -n "$EMIT" ] && { echo "Do not mix incompatible parameters!"; exit 1; }
|
||||
EMIT="run"
|
||||
shift
|
||||
;;
|
||||
-R|--rootdev)
|
||||
ROOTDEV=$2
|
||||
shift 2
|
||||
;;
|
||||
-*)
|
||||
echo "Unsupported parameter '$1'!"
|
||||
exit 1
|
||||
;;
|
||||
*) # Everything else but switches (which start with '-') follows:
|
||||
if [ -f $1 ]; then
|
||||
KFILE=$1
|
||||
# Construction of KFILE's full filename:
|
||||
KFILEPATH=$(cd $(dirname $KFILE) && pwd)
|
||||
if [ -L $KFILE ]; then
|
||||
KFILE=$(readlink $KFILE)
|
||||
else
|
||||
KFILE=$(basename $KFILE)
|
||||
fi
|
||||
KFILE=${KFILEPATH}/$KFILE
|
||||
if [ -z "$(file $KFILE | grep -E 'Linux kernel x86 boot|x86 boot sector')" ]; then
|
||||
echo "File '$KFILE' does not look like it is a kernel file!"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "File $1 not found!"
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Determine what to show as output (other options may have set EMIT already)
|
||||
EMIT=${EMIT:-"all"}
|
||||
|
||||
# An EMIT value of 'lilo' requires a kernel filename as script parameter:
|
||||
if [ "$EMIT" = "lilo" ]; then
|
||||
if [ -z "$KFILE" ]; then
|
||||
echo "A kernel_filename is required with the '-l|--lilo' option!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Determine kernel version to use,
|
||||
# and check if modules for this kernel are actually present:
|
||||
if [ ! -z $KVERLIST ]; then
|
||||
for kernel_version in $(echo $KVERLIST | tr ":" "\n") ; do
|
||||
KVER=$kernel_version
|
||||
if [ ! -d /lib/modules/$KVER ]; then
|
||||
echo "Modules for kernel $KVER aren't installed."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ -z "$KVER" ]; then
|
||||
if [ -n "$KFILE" ]; then
|
||||
KVER="$(strings $KFILE | grep '([^ ]*@[^ ]*) #' | cut -f1 -d' ')"
|
||||
else
|
||||
KVER="$(uname -r)"
|
||||
fi
|
||||
fi
|
||||
if [ ! -d /lib/modules/$KVER ]; then
|
||||
echo "Modules for kernel $KVER aren't installed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Determine whether the user passed an alternate filename for the initrd:
|
||||
if [ -n "$MKINIT_PARAMS" ]; then
|
||||
SRCHLIST="$MKINIT_PARAMS"
|
||||
for ELEM in $MKINIT_PARAMS ; do
|
||||
SRCHLIST=$(echo $SRCHLIST | cut -d' ' -f2-) # cut ELEM from the list
|
||||
if [ "$ELEM" = "-o" ]; then
|
||||
IMGFILE=$(echo $SRCHLIST | cut -d' ' -f1)
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
IMGFILE=${IMGFILE:-"/boot/initrd.gz"}
|
||||
|
||||
# Get information about the root device / root filesystem:
|
||||
ROOTDEV=${ROOTDEV:-$(get_root_device)}
|
||||
ROOTFS=$(get_rootfs_type)
|
||||
|
||||
# Determine the list of kernel modules needed to support the root device:
|
||||
MLIST=$(determine_blockdev_drivers)
|
||||
|
||||
# Check if we are running in a kvm guest with virtio block device driver
|
||||
# (add all virtio modules, we sort out the doubles later):
|
||||
if echo $MLIST | grep -q "virtio"; then
|
||||
MLIST="$MLIST:virtio:virtio_balloon:virtio_blk:virtio_ring:virtio_pci:virtio_net"
|
||||
fi
|
||||
|
||||
# Determine if a USB keyboard is in use and include usbhid and hid_generic
|
||||
# to module list
|
||||
MLIST=$(add_usb_keyboard)
|
||||
|
||||
# If we use any USB module, try to determine the Host Controller
|
||||
if echo $MLIST | grep -q "usb"; then
|
||||
MLIST=$(add_usb_hcd)
|
||||
fi
|
||||
|
||||
# Check what combination of LUKS/LVM/RAID we have to support:
|
||||
# This sets values for USING_LUKS, USING_LVM, USING_RAID, REALDEV and BASEDEV.
|
||||
check_luks_lvm_raid
|
||||
|
||||
# This is the interactive part:
|
||||
if [ "$INTERACTIVE" = "1" ]; then
|
||||
if [ "$FROMLILO" != "1" ]; then
|
||||
dialog --stdout --title "WELCOME TO MKINITRD COMMAND GENERATOR" --msgbox "\
|
||||
The main goal of this utility is to create a good initrd to \
|
||||
fit your needs. It can detect what kernel you are running, \
|
||||
what is your root device, root filesystem, if you use encryption, \
|
||||
LVM, RAID, etc. \
|
||||
\n\n\
|
||||
Usually the probed values are OK and they will be the \
|
||||
defaults in all subsequent dialogs, but maybe you want \
|
||||
to change something. \n\
|
||||
If in doubt, leave the defaults." 0 0
|
||||
|
||||
KVER=$( ls -d1 --indicator-style=none /lib/modules/* | \
|
||||
awk -F/ -vVER=$KVER '{
|
||||
if ( VER == $NF ) {
|
||||
ONOFF="on"
|
||||
} else {
|
||||
ONOFF="off"
|
||||
} ; printf("%s \"\" %s\n",$NF,ONOFF) }' | \
|
||||
xargs dialog --stdout --title "CHOOSE KERNEL VERSION" \
|
||||
--default-item $KVER --radiolist "\
|
||||
Please, select the kernel version you want to create this initrd for." 0 0 4 )
|
||||
[ -z "$KVER" ] && exit 1
|
||||
|
||||
OLDROOTDEV=$ROOTDEV
|
||||
ROOTDEV=$( dialog --stdout --title "SELECT ROOT DEVICE" --inputbox "\
|
||||
Enter your root device. Root device is the one where your '/' filesystem \
|
||||
is mounted." 0 0 "$ROOTDEV" )
|
||||
[ -z "$ROOTDEV" ] && exit 1
|
||||
|
||||
# We need to re-check our defaults in case the user changed the default
|
||||
# value for ROOTDEV:
|
||||
[ "$OLDROOTDEV" != "$ROOTDEV" ] && check_luks_lvm_raid
|
||||
ROOTFS=$(get_rootfs_type)
|
||||
|
||||
ROOTFS=$( dialog --stdout --title "SELECT ROOT FILESYSTEM" --inputbox "\
|
||||
Enter the type of your root filesystem." 0 0 "$ROOTFS" )
|
||||
[ -z "$ROOTFS" ] && exit 1
|
||||
fi
|
||||
|
||||
MLIST=$(add_rootfs_module)
|
||||
|
||||
LLR=$( dialog --stdout --title "LVM/LUKS/RAID" --checklist "\
|
||||
Do you use some of those in your root filesystem? \
|
||||
If this is the case, please select one or more options." 12 45 3 \
|
||||
"LVM" "Logical Volume Manager" $([ "$USING_LVM" = "1" ] && echo on || echo off) \
|
||||
"LUKS" "Linux Unified Key Setup" $([ "$USING_LUKS" = "1" ] && echo on || echo off) \
|
||||
"RAID" "Linux Software RAID" $([ "$USING_RAID" = "1" ] && echo on || echo off))
|
||||
|
||||
if [ "$?" != "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $LLR | grep -q LUKS && USING_LUKS="1"
|
||||
echo $LLR | grep -q LVM && USING_LVM="1"
|
||||
echo $LLR | grep -q RAID && USING_RAID="1"
|
||||
|
||||
if [ "$USING_LUKS" = "1" ]; then
|
||||
REALDEV=$( dialog --stdout --title "LUKS ROOT DEVICE" --inputbox "\
|
||||
Please, enter your LUKS root device:" 0 0 "$REALDEV" )
|
||||
[ -z "$REALDEV" ] && exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Step out of the interactive loop for a moment. The next block needs to be
|
||||
# executed in all cases.
|
||||
|
||||
# We need to 'undouble' the MLIST array. Some people report that walking the
|
||||
# /sys tree produces duplicate modules in the list.
|
||||
# The awk command elimitates doubles without changing the order:
|
||||
MLIST=$( echo $MLIST | tr ':' '\n' | awk '!x[$0]++' | tr '\n' ' ' )
|
||||
MLIST=$( echo $MLIST | tr ' ' ':' )
|
||||
MLIST=$(echo ${MLIST%:}) # To weed out a trailing ':' which was reported once.
|
||||
|
||||
# Back to the interactive part:
|
||||
|
||||
if [ "$INTERACTIVE" = "1" ]; then
|
||||
MLIST=$( dialog --stdout --title "INITRD'S MODULE LIST" --inputbox "\
|
||||
The list here shows all modules needed to support your root filesystem \
|
||||
and boot from it. But you can change the list to use some alternative \
|
||||
or additional modules. If you don't know what to do, the default is safe." \
|
||||
0 0 "$MLIST" )
|
||||
if [ "$?" != "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
EXTRA=$( dialog --stdout --title "EXTRA CONFIGURATION" --checklist "\
|
||||
Now is your chance for some additional configuration. All of these \
|
||||
configurations are optional and you can stick to the defaults." 11 72 3 \
|
||||
"KEYMAP" "Select keyboard layout (default: US)" \
|
||||
$([ $USING_LUKS = 1 ] && echo on || echo off) \
|
||||
"RESUMEDEV" "Select device for 'suspend-to-disk' feature" off \
|
||||
"UDEV" "Use UDEV in the initrd for device configuration" $(test $UDEV -eq 1 && echo on || echo off) \
|
||||
"WAIT" "Add delay to allow detection of slow disks at boot" $(test $WAIT -gt $WAIT_DEFAULT && echo on || echo off) )
|
||||
if [ "$?" != "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if echo $EXTRA | grep -q KEYMAP ; then
|
||||
KEYMAP=$( dialog --stdout --title "KEYBOARD LAYOUT SELECTION" \
|
||||
--cancel-label "Skip" \
|
||||
--menu "You may select one of the following keyboard layouts. \
|
||||
If you do not select a keyboard map, 'us.map' \
|
||||
(the US keyboard layout) is the default. Use the UP/DOWN \
|
||||
arrow keys and PageUp/PageDown to scroll \
|
||||
through the whole list of choices." \
|
||||
22 55 11 \
|
||||
"qwerty/us.map" "" \
|
||||
"azerty/azerty.map" "" \
|
||||
"azerty/be-latin1.map" "" \
|
||||
"azerty/fr-latin0.map" "" \
|
||||
"azerty/fr-latin1.map" "" \
|
||||
"azerty/fr-latin9.map" "" \
|
||||
"azerty/fr-old.map" "" \
|
||||
"azerty/fr-pc.map" "" \
|
||||
"azerty/fr.map" "" \
|
||||
"azerty/wangbe.map" "" \
|
||||
"azerty/wangbe2.map" "" \
|
||||
"dvorak/ANSI-dvorak.map" "" \
|
||||
"dvorak/dvorak-l.map" "" \
|
||||
"dvorak/dvorak-r.map" "" \
|
||||
"dvorak/dvorak.map" "" \
|
||||
"dvorak/no-dvorak.map" "" \
|
||||
"fgGIod/tr_f-latin5.map" "" \
|
||||
"fgGIod/trf-fgGIod.map" "" \
|
||||
"olpc/es-olpc.map" "" \
|
||||
"olpc/pt-olpc.map" "" \
|
||||
"qwerty/bg-cp1251.map" "" \
|
||||
"qwerty/bg-cp855.map" "" \
|
||||
"qwerty/bg_bds-cp1251.map" "" \
|
||||
"qwerty/bg_bds-utf8.map" "" \
|
||||
"qwerty/bg_pho-cp1251.map" "" \
|
||||
"qwerty/bg_pho-utf8.map" "" \
|
||||
"qwerty/br-abnt.map" "" \
|
||||
"qwerty/br-abnt2.map" "" \
|
||||
"qwerty/br-latin1-abnt2.map" "" \
|
||||
"qwerty/br-latin1-us.map" "" \
|
||||
"qwerty/by-cp1251.map" "" \
|
||||
"qwerty/by.map" "" \
|
||||
"qwerty/bywin-cp1251.map" "" \
|
||||
"qwerty/cf.map" "" \
|
||||
"qwerty/cz-cp1250.map" "" \
|
||||
"qwerty/cz-lat2-prog.map" "" \
|
||||
"qwerty/cz-lat2.map" "" \
|
||||
"qwerty/cz-qwerty.map" "" \
|
||||
"qwerty/defkeymap.map" "" \
|
||||
"qwerty/defkeymap_V1.0.map" "" \
|
||||
"qwerty/dk-latin1.map" "" \
|
||||
"qwerty/dk.map" "" \
|
||||
"qwerty/emacs.map" "" \
|
||||
"qwerty/emacs2.map" "" \
|
||||
"qwerty/es-cp850.map" "" \
|
||||
"qwerty/es.map" "" \
|
||||
"qwerty/et-nodeadkeys.map" "" \
|
||||
"qwerty/et.map" "" \
|
||||
"qwerty/fi-latin1.map" "" \
|
||||
"qwerty/fi-latin9.map" "" \
|
||||
"qwerty/fi-old.map" "" \
|
||||
"qwerty/fi.map" "" \
|
||||
"qwerty/gr-pc.map" "" \
|
||||
"qwerty/gr.map" "" \
|
||||
"qwerty/hu101.map" "" \
|
||||
"qwerty/il-heb.map" "" \
|
||||
"qwerty/il-phonetic.map" "" \
|
||||
"qwerty/il.map" "" \
|
||||
"qwerty/is-latin1-us.map" "" \
|
||||
"qwerty/is-latin1.map" "" \
|
||||
"qwerty/it-ibm.map" "" \
|
||||
"qwerty/it.map" "" \
|
||||
"qwerty/it2.map" "" \
|
||||
"qwerty/jp106.map" "" \
|
||||
"qwerty/kazakh.map" "" \
|
||||
"qwerty/kyrgyz.map" "" \
|
||||
"qwerty/la-latin1.map" "" \
|
||||
"qwerty/lt.baltic.map" "" \
|
||||
"qwerty/lt.l4.map" "" \
|
||||
"qwerty/lt.map" "" \
|
||||
"qwerty/mk-cp1251.map" "" \
|
||||
"qwerty/mk-utf.map" "" \
|
||||
"qwerty/mk.map" "" \
|
||||
"qwerty/mk0.map" "" \
|
||||
"qwerty/nl.map" "" \
|
||||
"qwerty/nl2.map" "" \
|
||||
"qwerty/no-latin1.map" "" \
|
||||
"qwerty/no.map" "" \
|
||||
"qwerty/pc110.map" "" \
|
||||
"qwerty/pl.map" "" \
|
||||
"qwerty/pl1.map" "" \
|
||||
"qwerty/pl2.map" "" \
|
||||
"qwerty/pl3.map" "" \
|
||||
"qwerty/pl4.map" "" \
|
||||
"qwerty/pt-latin1.map" "" \
|
||||
"qwerty/pt-latin9.map" "" \
|
||||
"qwerty/pt.map" "" \
|
||||
"qwerty/ro.map" "" \
|
||||
"qwerty/ro_std.map" "" \
|
||||
"qwerty/ru-cp1251.map" "" \
|
||||
"qwerty/ru-ms.map" "" \
|
||||
"qwerty/ru-yawerty.map" "" \
|
||||
"qwerty/ru.map" "" \
|
||||
"qwerty/ru1.map" "" \
|
||||
"qwerty/ru2.map" "" \
|
||||
"qwerty/ru3.map" "" \
|
||||
"qwerty/ru4.map" "" \
|
||||
"qwerty/ru_win.map" "" \
|
||||
"qwerty/ruwin_alt-CP1251.map" "" \
|
||||
"qwerty/ruwin_alt-KOI8-R.map" "" \
|
||||
"qwerty/ruwin_alt-UTF-8.map" "" \
|
||||
"qwerty/ruwin_cplk-CP1251.map" "" \
|
||||
"qwerty/ruwin_cplk-KOI8-R.map" "" \
|
||||
"qwerty/ruwin_cplk-UTF-8.map" "" \
|
||||
"qwerty/ruwin_ct_sh-CP1251.map" "" \
|
||||
"qwerty/ruwin_ct_sh-KOI8-R.map" "" \
|
||||
"qwerty/ruwin_ct_sh-UTF-8.map" "" \
|
||||
"qwerty/ruwin_ctrl-CP1251.map" "" \
|
||||
"qwerty/ruwin_ctrl-KOI8-R.map" "" \
|
||||
"qwerty/ruwin_ctrl-UTF-8.map" "" \
|
||||
"qwerty/se-fi-ir209.map" "" \
|
||||
"qwerty/se-fi-lat6.map" "" \
|
||||
"qwerty/se-ir209.map" "" \
|
||||
"qwerty/se-lat6.map" "" \
|
||||
"qwerty/se-latin1.map" "" \
|
||||
"qwerty/sk-prog-qwerty.map" "" \
|
||||
"qwerty/sk-qwerty.map" "" \
|
||||
"qwerty/speakup-jfw.map" "" \
|
||||
"qwerty/speakupmap.map" "" \
|
||||
"qwerty/sr-cy.map" "" \
|
||||
"qwerty/sv-latin1.map" "" \
|
||||
"qwerty/tr_q-latin5.map" "" \
|
||||
"qwerty/tralt.map" "" \
|
||||
"qwerty/trf.map" "" \
|
||||
"qwerty/trq.map" "" \
|
||||
"qwerty/ttwin_alt-UTF-8.map.gz" "" \
|
||||
"qwerty/ttwin_cplk-UTF-8.map.gz" "" \
|
||||
"qwerty/ttwin_ct_sh-UTF-8.map.gz" "" \
|
||||
"qwerty/ttwin_ctrl-UTF-8.map.gz" "" \
|
||||
"qwerty/ua-cp1251.map.gz" "" \
|
||||
"qwerty/ua-utf-ws.map" "" \
|
||||
"qwerty/ua-utf.map" "" \
|
||||
"qwerty/ua-ws.map" "" \
|
||||
"qwerty/ua.map" "" \
|
||||
"qwerty/uk.map" "" \
|
||||
"qwerty/us-acentos.map" "" \
|
||||
"qwerty/us.map" "" \
|
||||
"qwertz/croat.map" "" \
|
||||
"qwertz/cz-us-qwertz.map" "" \
|
||||
"qwertz/cz.map" "" \
|
||||
"qwertz/de-latin1-nodeadkeys.map" "" \
|
||||
"qwertz/de-latin1.map" "" \
|
||||
"qwertz/de.map" "" \
|
||||
"qwertz/de_CH-latin1.map" "" \
|
||||
"qwertz/fr_CH-latin1.map" "" \
|
||||
"qwertz/fr_CH.map" "" \
|
||||
"qwertz/hu.map" "" \
|
||||
"qwertz/sg-latin1-lk450.map" "" \
|
||||
"qwertz/sg-latin1.map" "" \
|
||||
"qwertz/sg.map" "" \
|
||||
"qwertz/sk-prog-qwertz.map" "" \
|
||||
"qwertz/sk-qwertz.map" "" \
|
||||
"qwertz/slovene.map" "" )
|
||||
[ -n "$KEYMAP" ] && KEYMAP=$(basename $KEYMAP .map)
|
||||
fi
|
||||
|
||||
if echo $EXTRA | grep -q UDEV ; then
|
||||
UDEV=1
|
||||
fi
|
||||
|
||||
if echo $EXTRA | grep -q RESUMEDEV ; then
|
||||
# Print information about swap partitions:
|
||||
FREERAM=$(free -k | grep "^Mem:" | tr -s ' ' | cut -d' ' -f2)
|
||||
SWPINFO=""
|
||||
for SWPDEV in $(grep -w swap $FSTAB | cut -d' ' -f1) ; do
|
||||
SWPINFO="$SWPINFO $SWPDEV Linux swap partition $(fdisk -s $SWPDEV) KB \\n"
|
||||
[ $(fdisk -s $SWPDEV) -gt $FREERAM ] && RESUMEDEV=$SWPDEV
|
||||
done
|
||||
FREERAM=$(free -m | grep "^Mem:" | tr -s ' ' | cut -d' ' -f2)
|
||||
RESUMEDEV=$( dialog --stdout --no-collapse --title "HIBERNATE RESUME DEVICE" --inputbox "\
|
||||
When using suspend-to-disk feature (hibernate), your computer's RAM is copied \
|
||||
to a swap device when it shuts down. The kernel will resume from that RAM \
|
||||
image at boot. This means that the swap partition must not be smaller than \
|
||||
the amount of RAM you have ($FREERAM MB). \n\
|
||||
$SWPINFO \n\
|
||||
Please specify a swap partition to be used for hibernation:" \
|
||||
0 0 "$RESUMEDEV")
|
||||
[ -z "$RESUMEDEV" ] && exit 1
|
||||
fi
|
||||
|
||||
if echo $EXTRA | grep -q WAIT ; then
|
||||
WAIT=$( dialog --stdout --title "WAIT FOR ROOT DEVICE" --inputbox "\
|
||||
Some block devices are too slow to be detected properly at boot. USB storage \
|
||||
devices and some disk arrays have this 'feature'. To make your machine \
|
||||
boot properly, you can add some delay here, to wait until all your disks are \
|
||||
probed and detected. The time is in seconds:" 0 0 "$WAIT")
|
||||
[ -z "$WAIT" ] && exit 1
|
||||
fi
|
||||
|
||||
IMGFILE=$( dialog --stdout --title "INITRD IMAGE NAME" --inputbox "\
|
||||
Enter your initrd image filename." 0 0 "$IMGFILE" )
|
||||
[ -z "$IMGFILE" ] && exit 1
|
||||
|
||||
else
|
||||
MLIST=$(add_rootfs_module)
|
||||
fi
|
||||
|
||||
# Add any modules passed along on the commandline:
|
||||
if [ -n "$MKINIT_MODS" ]; then
|
||||
[ -n "$MLIST" ] && MLIST="$MLIST:$(echo $MKINIT_MODS | tr ' ' ':')" \
|
||||
|| MLIST="$(echo $MKINIT_MODS | tr ' ' ':')"
|
||||
fi
|
||||
|
||||
# Constructing the mkinitrd command:
|
||||
if [ -z $KVERLIST ]; then
|
||||
MKINIT="mkinitrd -c -k $KVER -f $ROOTFS -r $ROOTDEV"
|
||||
else
|
||||
MKINIT="mkinitrd -c -k $KVERLIST -f $ROOTFS -r $ROOTDEV"
|
||||
fi
|
||||
|
||||
# If we have a module list, add them:
|
||||
if ! [ -z "$MLIST" -o "$MLIST" = ":" ]; then
|
||||
MKINIT="$MKINIT -m $MLIST"
|
||||
fi
|
||||
|
||||
# Deal with LUKS/LVM/RAID:
|
||||
if [ "$USING_LUKS" = "1" ]; then
|
||||
MKINIT="$MKINIT -C $REALDEV"
|
||||
fi
|
||||
if [ "$USING_LVM" = "1" ]; then
|
||||
MKINIT="$MKINIT -L"
|
||||
fi
|
||||
if [ "$USING_RAID" = "1" ]; then
|
||||
MKINIT="$MKINIT -R"
|
||||
fi
|
||||
|
||||
if [ -n "$RESUMEDEV" ]; then
|
||||
# Add hibernation partition:
|
||||
MKINIT="$MKINIT -h $RESUMEDEV"
|
||||
fi
|
||||
if [ -n "$KEYMAP" -a "$KEYMAP" != "us" ]; then
|
||||
# Add non-us keyboard mapping:
|
||||
MKINIT="$MKINIT -l $KEYMAP"
|
||||
fi
|
||||
if [ $UDEV -eq 1 ]; then
|
||||
# Add UDEV support:
|
||||
MKINIT="$MKINIT -u"
|
||||
fi
|
||||
if [ -n "$WAIT" -a $WAIT -ne $WAIT_DEFAULT ]; then
|
||||
# Add non-default wait time:
|
||||
MKINIT="$MKINIT -w $WAIT"
|
||||
fi
|
||||
if ! echo "$MKINIT_PARAMS" | grep -q -- '-o ' ; then
|
||||
# Add default output filename:
|
||||
MKINIT="$MKINIT -o $IMGFILE"
|
||||
fi
|
||||
if [ -n "$MKINIT_PARAMS" ]; then
|
||||
# Add user-supplied additional parameters:
|
||||
MKINIT="$MKINIT $MKINIT_PARAMS"
|
||||
fi
|
||||
|
||||
# Notify the user:
|
||||
if [ "$EMIT" = "all" ]; then
|
||||
cat <<-EOT
|
||||
#
|
||||
# $(basename $0) revision $REV
|
||||
#
|
||||
# This script will now make a recommendation about the command to use
|
||||
# in case you require an initrd image to boot a kernel that does not
|
||||
# have support for your storage or root filesystem built in
|
||||
# (such as the Slackware 'generic' kernels').
|
||||
# A suitable 'mkinitrd' command will be:
|
||||
|
||||
$MKINIT
|
||||
EOT
|
||||
elif [ "$EMIT" = "run" ]; then
|
||||
echo "$MKINIT"
|
||||
elif [ "$EMIT" = "conf" ]; then
|
||||
cat <<-EOT
|
||||
SOURCE_TREE="$SOURCE_TREE"
|
||||
CLEAR_TREE="$CLEAR_TREE"
|
||||
OUTPUT_IMAGE="$IMGFILE"
|
||||
KERNEL_VERSION="$KVER"
|
||||
KEYMAP="$KEYMAP"
|
||||
MODULE_LIST="$(echo $MLIST | cut -f2 -d\ )"
|
||||
LUKSDEV="$REALDEV"
|
||||
ROOTDEV="$ROOTDEV"
|
||||
ROOTFS="$ROOTFS"
|
||||
RESUMEDEV="$RESUMEDEV"
|
||||
RAID="$USING_RAID"
|
||||
LVM="$USING_LVM"
|
||||
UDEV="$UDEV"
|
||||
WAIT="$WAIT"
|
||||
EOT
|
||||
fi
|
||||
|
||||
if [ -n "$KFILE" ]; then
|
||||
if [ "$EMIT" = "all" ]; then
|
||||
cat <<-EOT
|
||||
# An entry in 'etc/lilo.conf' for kernel '$KFILE' would look like this:
|
||||
EOT
|
||||
fi
|
||||
if [ "$EMIT" = "all" -o "$EMIT" = "lilo" ]; then
|
||||
# Compensate for the syntax used for the LUKS-on-LVM case:
|
||||
[ "$(basename $ROOTDEV)" = "$ROOTDEV" ] && BASE="/dev/mapper/" || BASE=""
|
||||
cat <<-EOT
|
||||
# Linux bootable partition config begins
|
||||
# initrd created with '$MKINIT'
|
||||
image = $KFILE
|
||||
initrd = $IMGFILE
|
||||
root = $BASE$ROOTDEV
|
||||
label = $KVER
|
||||
read-only
|
||||
# Linux bootable partition config ends
|
||||
EOT
|
||||
fi
|
||||
fi
|
51
testing/source/mkinitrd/setup.01.mkinitrd
Normal file
51
testing/source/mkinitrd/setup.01.mkinitrd
Normal file
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
#BLURB="Generate /boot/initrd.gz for the generic kernel"
|
||||
|
||||
# Load defaults:
|
||||
if [ -r etc/default/geninitrd ]; then
|
||||
. etc/default/geninitrd
|
||||
fi
|
||||
|
||||
if [ -z "$KERNEL_SYMLINK" ]; then
|
||||
KERNEL_SYMLINK="boot/vmlinuz-generic"
|
||||
elif [ "$(echo $KERNEL_SYMLINK | cut -b 1)" = "/" ]; then # trim to make a relative path
|
||||
KERNEL_SYMLINK="$(echo $KERNEL_SYMLINK | cut -b 2-)"
|
||||
fi
|
||||
|
||||
# Find the kernel version:
|
||||
if [ -r $KERNEL_SYMLINK ]; then
|
||||
KERNEL_VERSION=$(strings $KERNEL_SYMLINK | grep '([^ ]*@[^ ]*) #' | cut -f1 -d' ')
|
||||
fi
|
||||
|
||||
# Assume the kernel "name" aka flavor is just the second part of the symlink name:
|
||||
KERNEL_NAME="$(echo $KERNEL_SYMLINK | rev | cut -f 1 -d - | rev)"
|
||||
|
||||
# Sometimes mkinitrd_command_generator.sh does not detect LVM properly. Until I
|
||||
# get to the bottom of that, it's safer to just always include LVM support.
|
||||
LVM_OPTION="-L"
|
||||
|
||||
# Generate the initrd:
|
||||
if [ ! -z $KERNEL_VERSION ]; then
|
||||
dialog --title "GENERATING INITIAL RAMDISK" --infobox \
|
||||
"Generating an initial ramdisk for use with the $KERNEL_VERSION kernel. \
|
||||
The initial ramdisk contains kernel modules needed to mount the \
|
||||
root partition, and must be regenerated whenever the kernel is updated. To \
|
||||
regenerate the initrd, select this setup script from within pkgtool, or run \
|
||||
'geninitrd' which will produce an initial ramdisk (/boot/initrd.gz) for the \
|
||||
installed kernel." 8 70
|
||||
chroot . /usr/share/mkinitrd/mkinitrd_command_generator.sh -k $KERNEL_VERSION -a "$LVM_OPTION -o /boot/initrd-${KERNEL_VERSION}-${KERNEL_NAME}.img" | chroot . bash 1> /dev/null 2> /dev/null
|
||||
fi
|
||||
|
||||
if [ "$GENINITRD_NAMED_SYMLINK" = "true" ]; then
|
||||
( cd boot
|
||||
rm -f initrd-${KERNEL_NAME}.img
|
||||
ln -sf initrd-${KERNEL_VERSION}-${KERNEL_NAME}.img initrd-${KERNEL_NAME}.img
|
||||
)
|
||||
fi
|
||||
|
||||
if [ "$GENINITRD_INITRD_GZ_SYMLINK" = "true" ]; then
|
||||
( cd boot
|
||||
rm -f initrd.gz
|
||||
ln -sf initrd-${KERNEL_VERSION}-${KERNEL_NAME}.img initrd.gz
|
||||
)
|
||||
fi
|
19
testing/source/mkinitrd/slack-desc
Normal file
19
testing/source/mkinitrd/slack-desc
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|' on
|
||||
# the right side marks the last column you can put a character in. You must make
|
||||
# exactly 11 lines for the formatting to be correct. It's also customary to
|
||||
# leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
mkinitrd: mkinitrd (make an initial ramdisk)
|
||||
mkinitrd:
|
||||
mkinitrd: mkinitrd is a script to create an initial ramdisk that is loaded at
|
||||
mkinitrd: the same time as the kernel. The initial ramdisk may be responsible
|
||||
mkinitrd: for loading kernel modules (such a filesystem or SCSI controller
|
||||
mkinitrd: module) that are needed to mount the root filesystem.
|
||||
mkinitrd:
|
||||
mkinitrd: The "initrd" is implemented as an initramfs. See the kernel
|
||||
mkinitrd: documentation for more information on this, if you are interested.
|
||||
mkinitrd:
|
||||
mkinitrd:
|
Loading…
Reference in a new issue