wok-next view linux-uml/receipt @ rev 16030

busybox: enable FEATURE_SUID_CONFIG_QUIET
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Mar 08 10:43:44 2014 +0000 (2014-03-08)
parents 7135114c39e7
children 889f25f00105
line source
1 # SliTaz package receipt.
3 PACKAGE="linux-uml"
4 SOURCE="linux"
5 VERSION="3.2.53"
6 KBASEVER="3.2"
7 CATEGORY="base-system"
8 SHORT_DESC="The User Mode Linux kernel."
9 MAINTAINER="pascal.bellard@slitaz.org"
10 LICENSE="GPL2"
11 TARBALL="$SOURCE-$KBASEVER.tar.xz"
12 WEB_SITE="http://www.kernel.org/"
13 WGET_URL="ftp://ftp.kernel.org/pub/linux/kernel/v3.0/$TARBALL"
14 [ "$KBASEVER" != "$VERSION" ] &&
15 PATCH="$(dirname $WGET_URL)/patch-$VERSION.xz" &&
16 EXTRA_SOURCE_FILES="$(basename $PATCH)"
18 BUILD_DEPENDS="bash perl busybox-boot"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 cd $src
24 if [ "$KBASEVER" != "$VERSION" ]; then
25 [ -s $SRC/$(basename $PATCH) ] ||
26 wget $PATCH -O $SRC/$(basename $PATCH)
27 xzcat $SRC/$(basename $PATCH) | patch -Np1
28 touch done.patch-$VERSION
29 fi
30 cp /usr/share/boot/initrd initrd.cpio
31 sed -i 's/uname -m/echo i386/;s|/bin/bash|/bin/ash|g' Makefile
32 make ARCH=um mrproper
33 cat > mini.config << EOF &&
34 CONFIG_BINFMT_ELF=y
35 CONFIG_LBD=y
36 CONFIG_BLK_DEV=y
37 CONFIG_BLK_DEV_LOOP=y
38 CONFIG_STDERR_CONSOLE=y
39 CONFIG_SSL=y
40 CONFIG_UNIX98_PTYS=y
41 CONFIG_PROC_FS=y
42 CONFIG_SYSFS_FS=y
43 CONFIG_IKCONFIG=y
44 CONFIG_IKCONFIG_PROC=y
45 CONFIG_UML_NET=y
46 CONFIG_UML_NET_TUNTAP=y
47 CONFIG_STATIC_LINK=y
48 CONFIG_BLK_DEV_INITRD=y
49 CONFIG_PTY_CHAN=y
50 CONFIG_TTY_CHAN=y
51 CONFIG_NET=y
52 CONFIG_INET=y
53 CONFIG_UML_NET=y
54 CONFIG_UML_NET_TUNTAP=y
55 CONFIG_BLK_DEV_UBD=y
56 CONFIG_EXT4_FS=y
57 CONFIG_EXT4_USE_FOR_EXT23=y
58 CONFIG_EXT4_FS_XATTR=y
59 CONFIG_EXT4_FS_POSIX_ACL=y
60 CONFIG_FUSE_FS=y
61 CONFIG_ISO9660_FS=y
62 CONFIG_VFAT_FS=y
63 CONFIG_TMPFS=y
64 CONFIG_SWAP=y
65 CONFIG_SYSVIPC=y
66 CONFIG_SYSVIPC_SYSCTL=y
67 CONFIG_SYSVIPC_COMPAT=y
68 CONFIG_PACKET=y
69 CONFIG_UNIX=y
70 CONFIG_NETFILTER=y
71 CONFIG_NETFILTER_ADVANCED=y
72 CONFIG_NF_CONNTRACK=y
73 CONFIG_NETFILTER_XTABLES=y
74 CONFIG_NF_DEFRAG_IPV4=y
75 CONFIG_NF_CONNTRACK_IPV4=y
76 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
77 CONFIG_IP_NF_IPTABLES=y
78 CONFIG_IP_NF_FILTER=y
79 CONFIG_IP_NF_TARGET_REJECT=y
80 CONFIG_NF_NAT=y
81 CONFIG_NF_NAT_NEEDED=y
82 CONFIG_IP_NF_TARGET_MASQUERADE=y
83 CONFIG_IP_NF_TARGET_REDIRECT=y
84 CONFIG_NETDEVICES=y
85 CONFIG_TUN=y
86 CONFIG_INITRAMFS_SOURCE="initrd.cpio"
87 EOF
88 make ARCH=um allnoconfig KCONFIG_ALLCONFIG=mini.config &&
89 make ARCH=um
90 }
92 # Rules to gen a SliTaz package suitable for Tazpkg.
93 genpkg_rules()
94 {
95 mkdir -p $fs/boot
96 cp $src/linux $fs/boot/linux-uml-$VERSION
97 cat > $fs/boot/vm-uml <<EOT
98 #!/bin/sh
100 # /etc/inittab: "tty21::respawn:/bin/su -c '/boot/vm-uml 1 /boot/guests/slitaz.img 2 512m' nobody"
101 n=\${1:-0}
102 tap=tap\$n
103 args="rw root=/dev/null"
104 dev="initrd=\$(ls -r /boot/rootfs*.gz | sed q)"
105 if [ -n "\$2" ]; then
106 args="ro root=620\${3:-1} screen=text sound=noconf"
107 dev="ubd0=\$2"
108 fi
110 cd \$(dirname \$0)
111 ifconfig \$tap 192.168.\$n.1
112 ./linux-uml-$VERSION \$dev mem=\${4:-512m} fakehd fake_ide ubd=3 con0=fd:0,fd:1 \\
113 con=pts ssl=pts eth0=tuntap,\$tap,fe:f0:00:00:00:0\$n,192.168.\$n.1 \\
114 \$args cpuinfo=\$(sed '/model name/!d;s/.*: //;s/ /_/g;q' /proc/cpuinfo)
115 EOT
116 chmod 755 $fs/boot/vm-uml
117 }