Commit 787140ad6bb49422e2f114e9b8df18b242df00db
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull misc kbuild changes from Michal Marek: "There are only a few things in the misc branch: - Fix for bugon.cocci semantic patch - Kdevelop4 files are .gitignored - Put make binrpm-pkg on diet" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: scripts/package: binrpm-pkg do not create source and devel package .gitignore: Add Kdevelop4 project files bugon.cocci: fix Options at the macro
Showing 3 changed files Inline Diff
.gitignore
1 | # | 1 | # |
2 | # NOTE! Don't add files that are generated in specific | 2 | # NOTE! Don't add files that are generated in specific |
3 | # subdirectories here. Add them in the ".gitignore" file | 3 | # subdirectories here. Add them in the ".gitignore" file |
4 | # in that subdirectory instead. | 4 | # in that subdirectory instead. |
5 | # | 5 | # |
6 | # NOTE! Please use 'git ls-files -i --exclude-standard' | 6 | # NOTE! Please use 'git ls-files -i --exclude-standard' |
7 | # command after changing this file, to see if there are | 7 | # command after changing this file, to see if there are |
8 | # any tracked files which get ignored after the change. | 8 | # any tracked files which get ignored after the change. |
9 | # | 9 | # |
10 | # Normal rules | 10 | # Normal rules |
11 | # | 11 | # |
12 | .* | 12 | .* |
13 | *.o | 13 | *.o |
14 | *.o.* | 14 | *.o.* |
15 | *.a | 15 | *.a |
16 | *.s | 16 | *.s |
17 | *.ko | 17 | *.ko |
18 | *.so | 18 | *.so |
19 | *.so.dbg | 19 | *.so.dbg |
20 | *.mod.c | 20 | *.mod.c |
21 | *.i | 21 | *.i |
22 | *.lst | 22 | *.lst |
23 | *.symtypes | 23 | *.symtypes |
24 | *.order | 24 | *.order |
25 | *.elf | 25 | *.elf |
26 | *.bin | 26 | *.bin |
27 | *.gz | 27 | *.gz |
28 | *.bz2 | 28 | *.bz2 |
29 | *.lzma | 29 | *.lzma |
30 | *.xz | 30 | *.xz |
31 | *.lz4 | 31 | *.lz4 |
32 | *.lzo | 32 | *.lzo |
33 | *.patch | 33 | *.patch |
34 | *.gcno | 34 | *.gcno |
35 | modules.builtin | 35 | modules.builtin |
36 | Module.symvers | 36 | Module.symvers |
37 | *.dwo | 37 | *.dwo |
38 | 38 | ||
39 | # | 39 | # |
40 | # Top-level generic files | 40 | # Top-level generic files |
41 | # | 41 | # |
42 | /tags | 42 | /tags |
43 | /TAGS | 43 | /TAGS |
44 | /linux | 44 | /linux |
45 | /vmlinux | 45 | /vmlinux |
46 | /vmlinuz | 46 | /vmlinuz |
47 | /System.map | 47 | /System.map |
48 | /Module.markers | 48 | /Module.markers |
49 | 49 | ||
50 | # | 50 | # |
51 | # Debian directory (make deb-pkg) | 51 | # Debian directory (make deb-pkg) |
52 | # | 52 | # |
53 | /debian/ | 53 | /debian/ |
54 | 54 | ||
55 | # | 55 | # |
56 | # git files that we don't want to ignore even it they are dot-files | 56 | # git files that we don't want to ignore even it they are dot-files |
57 | # | 57 | # |
58 | !.gitignore | 58 | !.gitignore |
59 | !.mailmap | 59 | !.mailmap |
60 | 60 | ||
61 | # | 61 | # |
62 | # Generated include files | 62 | # Generated include files |
63 | # | 63 | # |
64 | include/config | 64 | include/config |
65 | include/generated | 65 | include/generated |
66 | arch/*/include/generated | 66 | arch/*/include/generated |
67 | 67 | ||
68 | # stgit generated dirs | 68 | # stgit generated dirs |
69 | patches-* | 69 | patches-* |
70 | 70 | ||
71 | # quilt's files | 71 | # quilt's files |
72 | patches | 72 | patches |
73 | series | 73 | series |
74 | 74 | ||
75 | # cscope files | 75 | # cscope files |
76 | cscope.* | 76 | cscope.* |
77 | ncscope.* | 77 | ncscope.* |
78 | 78 | ||
79 | # gnu global files | 79 | # gnu global files |
80 | GPATH | 80 | GPATH |
81 | GRTAGS | 81 | GRTAGS |
82 | GSYMS | 82 | GSYMS |
83 | GTAGS | 83 | GTAGS |
84 | 84 | ||
85 | *.orig | 85 | *.orig |
86 | *~ | 86 | *~ |
87 | \#*# | 87 | \#*# |
88 | 88 | ||
89 | # | 89 | # |
90 | # Leavings from module signing | 90 | # Leavings from module signing |
91 | # | 91 | # |
92 | extra_certificates | 92 | extra_certificates |
93 | signing_key.priv | 93 | signing_key.priv |
94 | signing_key.x509 | 94 | signing_key.x509 |
95 | x509.genkey | 95 | x509.genkey |
96 | 96 | ||
97 | # Kconfig presets | 97 | # Kconfig presets |
98 | all.config | 98 | all.config |
99 | |||
100 | # Kdevelop4 | ||
101 | *.kdev4 | ||
99 | 102 |
scripts/coccinelle/misc/bugon.cocci
1 | /// Use BUG_ON instead of a if condition followed by BUG. | 1 | /// Use BUG_ON instead of a if condition followed by BUG. |
2 | /// | 2 | /// |
3 | //# This makes an effort to find cases where BUG() follows an if | 3 | //# This makes an effort to find cases where BUG() follows an if |
4 | //# condition on an expression and replaces the if condition and BUG() | 4 | //# condition on an expression and replaces the if condition and BUG() |
5 | //# with a BUG_ON having the conditional expression of the if statement | 5 | //# with a BUG_ON having the conditional expression of the if statement |
6 | //# as argument. | 6 | //# as argument. |
7 | // | 7 | // |
8 | // Confidence: High | 8 | // Confidence: High |
9 | // Copyright: (C) 2014 Himangi Saraogi. GPLv2. | 9 | // Copyright: (C) 2014 Himangi Saraogi. GPLv2. |
10 | // Comments: | 10 | // Comments: |
11 | // Options: --no-includes, --include-headers | 11 | // Options: --no-includes --include-headers |
12 | 12 | ||
13 | virtual patch | 13 | virtual patch |
14 | virtual context | 14 | virtual context |
15 | virtual org | 15 | virtual org |
16 | virtual report | 16 | virtual report |
17 | 17 | ||
18 | //---------------------------------------------------------- | 18 | //---------------------------------------------------------- |
19 | // For context mode | 19 | // For context mode |
20 | //---------------------------------------------------------- | 20 | //---------------------------------------------------------- |
21 | 21 | ||
22 | @depends on context@ | 22 | @depends on context@ |
23 | expression e; | 23 | expression e; |
24 | @@ | 24 | @@ |
25 | 25 | ||
26 | *if (e) BUG(); | 26 | *if (e) BUG(); |
27 | 27 | ||
28 | //---------------------------------------------------------- | 28 | //---------------------------------------------------------- |
29 | // For patch mode | 29 | // For patch mode |
30 | //---------------------------------------------------------- | 30 | //---------------------------------------------------------- |
31 | 31 | ||
32 | @depends on patch@ | 32 | @depends on patch@ |
33 | expression e; | 33 | expression e; |
34 | @@ | 34 | @@ |
35 | 35 | ||
36 | -if (e) BUG(); | 36 | -if (e) BUG(); |
37 | +BUG_ON(e); | 37 | +BUG_ON(e); |
38 | 38 | ||
39 | //---------------------------------------------------------- | 39 | //---------------------------------------------------------- |
40 | // For org and report mode | 40 | // For org and report mode |
41 | //---------------------------------------------------------- | 41 | //---------------------------------------------------------- |
42 | 42 | ||
43 | @r@ | 43 | @r@ |
44 | expression e; | 44 | expression e; |
45 | position p; | 45 | position p; |
46 | @@ | 46 | @@ |
47 | 47 | ||
48 | if (e) BUG@p (); | 48 | if (e) BUG@p (); |
49 | 49 | ||
50 | @script:python depends on org@ | 50 | @script:python depends on org@ |
51 | p << r.p; | 51 | p << r.p; |
52 | @@ | 52 | @@ |
53 | 53 | ||
54 | coccilib.org.print_todo(p[0], "WARNING use BUG_ON") | 54 | coccilib.org.print_todo(p[0], "WARNING use BUG_ON") |
55 | 55 | ||
56 | @script:python depends on report@ | 56 | @script:python depends on report@ |
57 | p << r.p; | 57 | p << r.p; |
58 | @@ | 58 | @@ |
59 | 59 | ||
60 | msg="WARNING: Use BUG_ON" | 60 | msg="WARNING: Use BUG_ON" |
61 | coccilib.report.print_report(p[0], msg) | 61 | coccilib.report.print_report(p[0], msg) |
62 | 62 | ||
63 | 63 |
scripts/package/mkspec
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | 2 | # |
3 | # Output a simple RPM spec file. | 3 | # Output a simple RPM spec file. |
4 | # This version assumes a minimum of RPM 4.0.3. | 4 | # This version assumes a minimum of RPM 4.0.3. |
5 | # | 5 | # |
6 | # The only gothic bit here is redefining install_post to avoid | 6 | # The only gothic bit here is redefining install_post to avoid |
7 | # stripping the symbols from files in the kernel which we want | 7 | # stripping the symbols from files in the kernel which we want |
8 | # | 8 | # |
9 | # Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net> | 9 | # Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net> |
10 | # | 10 | # |
11 | 11 | ||
12 | # how we were called determines which rpms we build and how we build them | 12 | # how we were called determines which rpms we build and how we build them |
13 | if [ "$1" = "prebuilt" ]; then | 13 | if [ "$1" = "prebuilt" ]; then |
14 | PREBUILT=true | 14 | PREBUILT=true |
15 | else | 15 | else |
16 | PREBUILT=false | 16 | PREBUILT=false |
17 | fi | 17 | fi |
18 | 18 | ||
19 | # starting to output the spec | 19 | # starting to output the spec |
20 | if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then | 20 | if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then |
21 | PROVIDES=kernel-drm | 21 | PROVIDES=kernel-drm |
22 | fi | 22 | fi |
23 | 23 | ||
24 | PROVIDES="$PROVIDES kernel-$KERNELRELEASE" | 24 | PROVIDES="$PROVIDES kernel-$KERNELRELEASE" |
25 | __KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-/_/g"` | 25 | __KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-/_/g"` |
26 | 26 | ||
27 | echo "Name: kernel" | 27 | echo "Name: kernel" |
28 | echo "Summary: The Linux Kernel" | 28 | echo "Summary: The Linux Kernel" |
29 | echo "Version: $__KERNELRELEASE" | 29 | echo "Version: $__KERNELRELEASE" |
30 | # we need to determine the NEXT version number so that uname and | 30 | # we need to determine the NEXT version number so that uname and |
31 | # rpm -q will agree | 31 | # rpm -q will agree |
32 | echo "Release: `. $srctree/scripts/mkversion`" | 32 | echo "Release: `. $srctree/scripts/mkversion`" |
33 | echo "License: GPL" | 33 | echo "License: GPL" |
34 | echo "Group: System Environment/Kernel" | 34 | echo "Group: System Environment/Kernel" |
35 | echo "Vendor: The Linux Community" | 35 | echo "Vendor: The Linux Community" |
36 | echo "URL: http://www.kernel.org" | 36 | echo "URL: http://www.kernel.org" |
37 | 37 | ||
38 | if ! $PREBUILT; then | 38 | if ! $PREBUILT; then |
39 | echo "Source: kernel-$__KERNELRELEASE.tar.gz" | 39 | echo "Source: kernel-$__KERNELRELEASE.tar.gz" |
40 | fi | 40 | fi |
41 | 41 | ||
42 | echo "BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root" | 42 | echo "BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root" |
43 | echo "Provides: $PROVIDES" | 43 | echo "Provides: $PROVIDES" |
44 | echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :" | 44 | echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :" |
45 | echo "%define debug_package %{nil}" | 45 | echo "%define debug_package %{nil}" |
46 | echo "" | 46 | echo "" |
47 | echo "%description" | 47 | echo "%description" |
48 | echo "The Linux Kernel, the operating system core itself" | 48 | echo "The Linux Kernel, the operating system core itself" |
49 | echo "" | 49 | echo "" |
50 | echo "%package headers" | 50 | echo "%package headers" |
51 | echo "Summary: Header files for the Linux kernel for use by glibc" | 51 | echo "Summary: Header files for the Linux kernel for use by glibc" |
52 | echo "Group: Development/System" | 52 | echo "Group: Development/System" |
53 | echo "Obsoletes: kernel-headers" | 53 | echo "Obsoletes: kernel-headers" |
54 | echo "Provides: kernel-headers = %{version}" | 54 | echo "Provides: kernel-headers = %{version}" |
55 | echo "%description headers" | 55 | echo "%description headers" |
56 | echo "Kernel-headers includes the C header files that specify the interface" | 56 | echo "Kernel-headers includes the C header files that specify the interface" |
57 | echo "between the Linux kernel and userspace libraries and programs. The" | 57 | echo "between the Linux kernel and userspace libraries and programs. The" |
58 | echo "header files define structures and constants that are needed for" | 58 | echo "header files define structures and constants that are needed for" |
59 | echo "building most standard programs and are also needed for rebuilding the" | 59 | echo "building most standard programs and are also needed for rebuilding the" |
60 | echo "glibc package." | 60 | echo "glibc package." |
61 | echo "" | 61 | echo "" |
62 | echo "%package devel" | 62 | echo "%package devel" |
63 | echo "Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel" | 63 | echo "Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel" |
64 | echo "Group: System Environment/Kernel" | 64 | echo "Group: System Environment/Kernel" |
65 | echo "AutoReqProv: no" | 65 | echo "AutoReqProv: no" |
66 | echo "%description -n kernel-devel" | 66 | echo "%description -n kernel-devel" |
67 | echo "This package provides kernel headers and makefiles sufficient to build modules" | 67 | echo "This package provides kernel headers and makefiles sufficient to build modules" |
68 | echo "against the $__KERNELRELEASE kernel package." | 68 | echo "against the $__KERNELRELEASE kernel package." |
69 | echo "" | 69 | echo "" |
70 | 70 | ||
71 | if ! $PREBUILT; then | 71 | if ! $PREBUILT; then |
72 | echo "%prep" | 72 | echo "%prep" |
73 | echo "%setup -q" | 73 | echo "%setup -q" |
74 | echo "" | 74 | echo "" |
75 | fi | 75 | fi |
76 | 76 | ||
77 | echo "%build" | 77 | echo "%build" |
78 | 78 | ||
79 | if ! $PREBUILT; then | 79 | if ! $PREBUILT; then |
80 | echo "make clean && make %{?_smp_mflags}" | 80 | echo "make clean && make %{?_smp_mflags}" |
81 | echo "" | 81 | echo "" |
82 | fi | 82 | fi |
83 | 83 | ||
84 | echo "%install" | 84 | echo "%install" |
85 | echo 'KBUILD_IMAGE=$(make image_name)' | 85 | echo 'KBUILD_IMAGE=$(make image_name)' |
86 | echo "%ifarch ia64" | 86 | echo "%ifarch ia64" |
87 | echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules' | 87 | echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules' |
88 | echo "%else" | 88 | echo "%else" |
89 | echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules' | 89 | echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules' |
90 | echo "%endif" | 90 | echo "%endif" |
91 | echo 'mkdir -p $RPM_BUILD_ROOT'"/lib/firmware/$KERNELRELEASE" | 91 | echo 'mkdir -p $RPM_BUILD_ROOT'"/lib/firmware/$KERNELRELEASE" |
92 | 92 | ||
93 | echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{?_smp_mflags} KBUILD_SRC= mod-fw= modules_install' | 93 | echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{?_smp_mflags} KBUILD_SRC= mod-fw= modules_install' |
94 | echo 'INSTALL_FW_PATH=$RPM_BUILD_ROOT'"/lib/firmware/$KERNELRELEASE" | 94 | echo 'INSTALL_FW_PATH=$RPM_BUILD_ROOT'"/lib/firmware/$KERNELRELEASE" |
95 | echo 'make INSTALL_FW_PATH=$INSTALL_FW_PATH' firmware_install | 95 | echo 'make INSTALL_FW_PATH=$INSTALL_FW_PATH' firmware_install |
96 | echo "%ifarch ia64" | 96 | echo "%ifarch ia64" |
97 | echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE" | 97 | echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE" |
98 | echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/" | 98 | echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/" |
99 | echo "%else" | 99 | echo "%else" |
100 | echo "%ifarch ppc64" | 100 | echo "%ifarch ppc64" |
101 | echo "cp vmlinux arch/powerpc/boot" | 101 | echo "cp vmlinux arch/powerpc/boot" |
102 | echo "cp arch/powerpc/boot/"'$KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" | 102 | echo "cp arch/powerpc/boot/"'$KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" |
103 | echo "%else" | 103 | echo "%else" |
104 | echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" | 104 | echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" |
105 | echo "%endif" | 105 | echo "%endif" |
106 | echo "%endif" | 106 | echo "%endif" |
107 | 107 | ||
108 | echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install' | 108 | echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install' |
109 | echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" | 109 | echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" |
110 | 110 | ||
111 | echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE" | 111 | echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE" |
112 | 112 | ||
113 | echo "%ifnarch ppc64" | 113 | echo "%ifnarch ppc64" |
114 | echo 'cp vmlinux vmlinux.orig' | 114 | echo 'cp vmlinux vmlinux.orig' |
115 | echo 'bzip2 -9 vmlinux' | 115 | echo 'bzip2 -9 vmlinux' |
116 | echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2" | 116 | echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2" |
117 | echo 'mv vmlinux.orig vmlinux' | 117 | echo 'mv vmlinux.orig vmlinux' |
118 | echo "%endif" | 118 | echo "%endif" |
119 | 119 | ||
120 | if ! $PREBUILT; then | ||
120 | echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}" | 121 | echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}" |
121 | echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE" | 122 | echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE" |
122 | echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude=firmware --exclude .config.old --exclude .missing-syscalls.d\"" | 123 | echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude=firmware --exclude .config.old --exclude .missing-syscalls.d\"" |
123 | echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)" | 124 | echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)" |
124 | echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE" | 125 | echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE" |
125 | echo "ln -sf /usr/src/kernels/$KERNELRELEASE build" | 126 | echo "ln -sf /usr/src/kernels/$KERNELRELEASE build" |
126 | echo "ln -sf /usr/src/kernels/$KERNELRELEASE source" | 127 | echo "ln -sf /usr/src/kernels/$KERNELRELEASE source" |
128 | fi | ||
127 | 129 | ||
128 | echo "" | 130 | echo "" |
129 | echo "%clean" | 131 | echo "%clean" |
130 | echo 'rm -rf $RPM_BUILD_ROOT' | 132 | echo 'rm -rf $RPM_BUILD_ROOT' |
131 | echo "" | 133 | echo "" |
132 | echo "%post" | 134 | echo "%post" |
133 | echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then" | 135 | echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then" |
134 | echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm" | 136 | echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm" |
135 | echo "cp /boot/System.map-$KERNELRELEASE /boot/System.map-$KERNELRELEASE-rpm" | 137 | echo "cp /boot/System.map-$KERNELRELEASE /boot/System.map-$KERNELRELEASE-rpm" |
136 | echo "rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE" | 138 | echo "rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE" |
137 | echo "/sbin/installkernel $KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm" | 139 | echo "/sbin/installkernel $KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm" |
138 | echo "rm -f /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm" | 140 | echo "rm -f /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm" |
139 | echo "fi" | 141 | echo "fi" |
140 | echo "" | 142 | echo "" |
141 | echo "%files" | 143 | echo "%files" |
142 | echo '%defattr (-, root, root)' | 144 | echo '%defattr (-, root, root)' |
143 | echo "%dir /lib/modules" | 145 | echo "%dir /lib/modules" |
144 | echo "/lib/modules/$KERNELRELEASE" | 146 | echo "/lib/modules/$KERNELRELEASE" |
145 | echo "%exclude /lib/modules/$KERNELRELEASE/build" | 147 | echo "%exclude /lib/modules/$KERNELRELEASE/build" |
146 | echo "%exclude /lib/modules/$KERNELRELEASE/source" | 148 | echo "%exclude /lib/modules/$KERNELRELEASE/source" |
147 | echo "/lib/firmware/$KERNELRELEASE" | 149 | echo "/lib/firmware/$KERNELRELEASE" |
148 | echo "/boot/*" | 150 | echo "/boot/*" |
149 | echo "" | 151 | echo "" |
150 | echo "%files headers" | 152 | echo "%files headers" |
151 | echo '%defattr (-, root, root)' | 153 | echo '%defattr (-, root, root)' |
152 | echo "/usr/include" | 154 | echo "/usr/include" |
153 | echo "" | 155 | echo "" |
156 | if ! $PREBUILT; then | ||
154 | echo "%files devel" | 157 | echo "%files devel" |
155 | echo '%defattr (-, root, root)' | 158 | echo '%defattr (-, root, root)' |
156 | echo "/usr/src/kernels/$KERNELRELEASE" | 159 | echo "/usr/src/kernels/$KERNELRELEASE" |
157 | echo "/lib/modules/$KERNELRELEASE/build" | 160 | echo "/lib/modules/$KERNELRELEASE/build" |
158 | echo "/lib/modules/$KERNELRELEASE/source" | 161 | echo "/lib/modules/$KERNELRELEASE/source" |
159 | echo "" | 162 | echo "" |
163 | fi | ||
160 | 164 |