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