├── README.md ├── build.sh ├── build_DVD.sh ├── image-i386.tar.lzma └── sources.list /README.md: -------------------------------------------------------------------------------- 1 | buildscript 2 | =========== 3 | 4 | x-mario build script -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # lxgames-build.sh -- creates an LXgames LiveCD ISO, based on lubuntu-build.sh 3 | # Author: Thanh Nguyen 4 | # Based heavily on HOWTO information by 5 | # Julien Lavergne 6 | # Version: 20110303 7 | 8 | set -eu # Be strict 9 | 10 | # Script parameters: arch mirror gnomelanguage release 11 | # Arch to build ISO for, i386 or amd64 12 | arch=${1:-i386} 13 | # Ubuntu mirror to use 14 | #mirror=${2:-"http://192.168.1.200:3142/ubuntu.ctu.edu.vn/archive"} 15 | mirror=${2:-"http://vn.archive.ubuntu.com/ubuntu/"} 16 | # Set of GNOME language packs to install. 17 | # Use '\*' for all langs, 'en' for English. 18 | # Install language with the most popcon 19 | gnomelanguage=${3:-'{en}'} # 20 | # Release name, used by debootstrap. Examples: lucid, maverick, natty. 21 | release=${4:-precise} 22 | 23 | # Necessary data files 24 | datafiles="image-${arch}.tar.lzma sources.list" 25 | # Necessary development tool packages to be installed on build host 26 | devtools="debootstrap genisoimage p7zip-full squashfs-tools ubuntu-dev-tools" 27 | 28 | # Make sure we have the data files we need 29 | for i in $datafiles 30 | do 31 | if [ ! -f $i ]; then 32 | echo "$0: ERROR: data file `pwd`/$i not found" 33 | exit 1 34 | fi 35 | done 36 | 37 | # Make sure we have the tools we need installed 38 | sudo apt-get -q install $devtools -y --no-install-recommends 39 | 40 | # Create and populate the chroot using debootstrap 41 | [ -d chroot ] && sudo rm -R chroot/ 42 | # Debootstrap outputs a lot of 'Information' lines, which can be ignored 43 | sudo debootstrap --arch=${arch} ${release} chroot ${mirror} # 2>&1 |grep -v "^I: " 44 | # Use /etc/resolv.conf from the host machine during the build 45 | sudo cp -v /etc/resolv.conf chroot/etc/resolv.conf 46 | 47 | # Copy the source.list to enable universe / multiverse in the chroot, and eventually additional repos. 48 | sudo cp -v sources.list chroot/etc/apt/sources.list 49 | 50 | # Work *inside* the chroot 51 | sudo chroot chroot </tmp/manifest.$$ 179 | sudo cp -v /tmp/manifest.$$ image/casper/filesystem.manifest 180 | sudo cp -v image/casper/filesystem.manifest image/casper/filesystem.manifest-desktop 181 | rm /tmp/manifest.$$ 182 | 183 | # Remove packages from filesystem.manifest-desktop 184 | # (language and extra for more hardware support) 185 | REMOVE='gparted plymouth-theme-ubuntu-text plymouth-theme-lubuntu-logo plymouth-theme-ubuntu-text plymouth-theme-script ubiquity ubiquity-frontend-gtk casper live-initramfs user-setup discover1 186 | xresprobe libdebian-installer4 pptp-linux ndiswrapper-utils-1.9 187 | ndisgtk linux-wlan-ng libatm1 setserial b43-fwcutter 188 | linux-headers-generic indicator-session indicator-application 189 | language-pack-*' 190 | for i in $REMOVE 191 | do 192 | sudo sed -i "/${i}/d" image/casper/filesystem.manifest-desktop 193 | done 194 | 195 | # Now squash the live filesystem 196 | echo "$0: Starting mksquashfs at $(date -u) ..." 197 | sudo mksquashfs chroot image/casper/filesystem.squashfs -noappend -no-progress 198 | echo "$0: Finished mksquashfs at $(date -u )" 199 | 200 | # Generate md5sum.txt checksum file 201 | cd image && sudo find . -type f -print0 |xargs -0 sudo md5sum |grep -v "\./md5sum.txt" >md5sum.txt 202 | 203 | # Generate a small temporary ISO so we get an updated boot.cat 204 | IMAGE_NAME=${IMAGE_NAME:-"X-Mario ${release} $(date -u +%Y%m%d) - ${arch}"} 205 | ISOFILE=xmario-${release}-$(date -u +%Y%m%d)-${arch}.iso 206 | sudo mkisofs -r -V "$IMAGE_NAME" -cache-inodes -J -l \ 207 | -b isolinux/isolinux.bin -c isolinux/boot.cat \ 208 | -no-emul-boot -boot-load-size 4 -boot-info-table \ 209 | --publisher "X-Mario Packaging Team" \ 210 | --volset "Ubuntu Linux http://www.ubuntu.com" \ 211 | -p "${DEBFULLNAME:-$USER} <${DEBEMAIL:-on host $(hostname --fqdn)}>" \ 212 | -A "$IMAGE_NAME" \ 213 | -m filesystem.squashfs \ 214 | -o ../$ISOFILE.tmp . 215 | 216 | # Mount the temp ISO and copy boot.cat out of it 217 | tempmount=/tmp/$0.tempmount.$$ 218 | mkdir $tempmount 219 | loopdev=$(sudo losetup -f) 220 | sudo losetup $loopdev ../$ISOFILE.tmp 221 | sudo mount -r -t iso9660 $loopdev $tempmount 222 | sudo cp -vp $tempmount/isolinux/boot.cat isolinux/ 223 | sudo umount $loopdev 224 | sudo losetup -d $loopdev 225 | rmdir $tempmount 226 | 227 | # Generate md5sum.txt checksum file (now with new improved boot.cat) 228 | sudo find . -type f -print0 |xargs -0 sudo md5sum |grep -v "\./md5sum.txt" >md5sum.txt 229 | 230 | # Remove temp ISO file 231 | sudo rm ../$ISOFILE.tmp 232 | 233 | # Create an X-Mario ISO from the image directory tree 234 | sudo mkisofs -r -V "$IMAGE_NAME" -cache-inodes -J -l \ 235 | -allow-limited-size -udf \ 236 | -b isolinux/isolinux.bin -c isolinux/boot.cat \ 237 | -no-emul-boot -boot-load-size 4 -boot-info-table \ 238 | --publisher "X-Mario Packaging Team" \ 239 | --volset "Ubuntu Linux http://www.ubuntu.com" \ 240 | -p "${DEBFULLNAME:-$USER} <${DEBEMAIL:-on host $(hostname --fqdn)}>" \ 241 | -A "$IMAGE_NAME" \ 242 | -o ../$ISOFILE . 243 | 244 | # Fix up ownership and permissions on newly created ISO file 245 | sudo chown $USER:$USER ../$ISOFILE 246 | chmod 0444 ../$ISOFILE 247 | 248 | # Create the associated md5sum file 249 | cd .. 250 | md5sum $ISOFILE >${ISOFILE}.md5 251 | -------------------------------------------------------------------------------- /build_DVD.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # lxgames-build.sh -- creates an LXgames LiveCD ISO, based on lubuntu-build.sh 3 | # Author: Thanh Nguyen 4 | # Based heavily on HOWTO information by 5 | # Julien Lavergne 6 | # Version: 20110303 7 | 8 | set -eu # Be strict 9 | 10 | # Script parameters: arch mirror gnomelanguage release 11 | # Arch to build ISO for, i386 or amd64 12 | arch=${1:-i386} 13 | # Ubuntu mirror to use 14 | mirror=${2:-"http://192.168.1.200:3142/ubuntu.ctu.edu.vn/archive"} 15 | # Set of GNOME language packs to install. 16 | # Use '\*' for all langs, 'en' for English. 17 | # Install language with the most popcon 18 | gnomelanguage=${3:-'{en}'} # 19 | # Release name, used by debootstrap. Examples: lucid, maverick, natty. 20 | release=${4:-precise} 21 | 22 | # Necessary data files 23 | datafiles="image-${arch}.tar.lzma sources.list" 24 | # Necessary development tool packages to be installed on build host 25 | devtools="debootstrap genisoimage p7zip-full squashfs-tools ubuntu-dev-tools" 26 | 27 | # Make sure we have the data files we need 28 | for i in $datafiles 29 | do 30 | if [ ! -f $i ]; then 31 | echo "$0: ERROR: data file `pwd`/$i not found" 32 | exit 1 33 | fi 34 | done 35 | 36 | # Make sure we have the tools we need installed 37 | sudo apt-get -q install $devtools -y --no-install-recommends 38 | 39 | # Create and populate the chroot using debootstrap 40 | [ -d chroot ] && sudo rm -R chroot/ 41 | # Debootstrap outputs a lot of 'Information' lines, which can be ignored 42 | sudo debootstrap --arch=${arch} ${release} chroot ${mirror} # 2>&1 |grep -v "^I: " 43 | # Use /etc/resolv.conf from the host machine during the build 44 | sudo cp -v /etc/resolv.conf chroot/etc/resolv.conf 45 | 46 | # Copy the source.list to enable universe / multiverse in the chroot, and eventually additional repos. 47 | sudo cp -v sources.list chroot/etc/apt/sources.list 48 | 49 | # Work *inside* the chroot 50 | sudo chroot chroot </tmp/manifest.$$ 247 | sudo cp -v /tmp/manifest.$$ image/casper/filesystem.manifest 248 | sudo cp -v image/casper/filesystem.manifest image/casper/filesystem.manifest-desktop 249 | rm /tmp/manifest.$$ 250 | 251 | # Remove packages from filesystem.manifest-desktop 252 | # (language and extra for more hardware support) 253 | REMOVE='gparted ubiquity ubiquity-frontend-gtk casper live-initramfs user-setup discover1 254 | xresprobe libdebian-installer4 pptp-linux ndiswrapper-utils-1.9 255 | ndisgtk linux-wlan-ng libatm1 setserial b43-fwcutter 256 | linux-headers-generic indicator-session indicator-application 257 | language-pack-*' 258 | for i in $REMOVE 259 | do 260 | sudo sed -i "/${i}/d" image/casper/filesystem.manifest-desktop 261 | done 262 | 263 | # Now squash the live filesystem 264 | echo "$0: Starting mksquashfs at $(date -u) ..." 265 | sudo mksquashfs chroot image/casper/filesystem.squashfs -noappend -no-progress 266 | echo "$0: Finished mksquashfs at $(date -u )" 267 | 268 | # Generate md5sum.txt checksum file 269 | cd image && sudo find . -type f -print0 |xargs -0 sudo md5sum |grep -v "\./md5sum.txt" >md5sum.txt 270 | 271 | # Generate a small temporary ISO so we get an updated boot.cat 272 | IMAGE_NAME=${IMAGE_NAME:-"X-Mario ${release} $(date -u +%Y%m%d) - ${arch}"} 273 | ISOFILE=xmario-${release}-$(date -u +%Y%m%d)-${arch}.iso 274 | sudo mkisofs -r -V "$IMAGE_NAME" -cache-inodes -J -l \ 275 | -b isolinux/isolinux.bin -c isolinux/boot.cat \ 276 | -no-emul-boot -boot-load-size 4 -boot-info-table \ 277 | --publisher "X-Mario Packaging Team" \ 278 | --volset "Ubuntu Linux http://www.ubuntu.com" \ 279 | -p "${DEBFULLNAME:-$USER} <${DEBEMAIL:-on host $(hostname --fqdn)}>" \ 280 | -A "$IMAGE_NAME" \ 281 | -m filesystem.squashfs \ 282 | -o ../$ISOFILE.tmp . 283 | 284 | # Mount the temp ISO and copy boot.cat out of it 285 | tempmount=/tmp/$0.tempmount.$$ 286 | mkdir $tempmount 287 | loopdev=$(sudo losetup -f) 288 | sudo losetup $loopdev ../$ISOFILE.tmp 289 | sudo mount -r -t iso9660 $loopdev $tempmount 290 | sudo cp -vp $tempmount/isolinux/boot.cat isolinux/ 291 | sudo umount $loopdev 292 | sudo losetup -d $loopdev 293 | rmdir $tempmount 294 | 295 | # Generate md5sum.txt checksum file (now with new improved boot.cat) 296 | sudo find . -type f -print0 |xargs -0 sudo md5sum |grep -v "\./md5sum.txt" >md5sum.txt 297 | 298 | # Remove temp ISO file 299 | sudo rm ../$ISOFILE.tmp 300 | 301 | # Create an X-Mario ISO from the image directory tree 302 | sudo mkisofs -r -V "$IMAGE_NAME" -cache-inodes -J -l \ 303 | -allow-limited-size -udf \ 304 | -b isolinux/isolinux.bin -c isolinux/boot.cat \ 305 | -no-emul-boot -boot-load-size 4 -boot-info-table \ 306 | --publisher "X-Mario Packaging Team" \ 307 | --volset "Ubuntu Linux http://www.ubuntu.com" \ 308 | -p "${DEBFULLNAME:-$USER} <${DEBEMAIL:-on host $(hostname --fqdn)}>" \ 309 | -A "$IMAGE_NAME" \ 310 | -o ../$ISOFILE . 311 | 312 | # Fix up ownership and permissions on newly created ISO file 313 | sudo chown $USER:$USER ../$ISOFILE 314 | chmod 0444 ../$ISOFILE 315 | 316 | # Create the associated md5sum file 317 | cd .. 318 | md5sum $ISOFILE >${ISOFILE}.md5 319 | -------------------------------------------------------------------------------- /image-i386.tar.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/xmario_buildscript/8ff0b7061f848793f021f534c7e578e18cc06091/image-i386.tar.lzma -------------------------------------------------------------------------------- /sources.list: -------------------------------------------------------------------------------- 1 | # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to 2 | # newer versions of the distribution. 3 | 4 | deb http://192.168.1.200:3142/ubuntu.ctu.edu.vn/archive/ precise main restricted 5 | # deb-src http://192.168.1.200:3142/ubuntu.ctu.edu.vn/archive/ precise restricted main multiverse universe 6 | 7 | ## Major bug fix updates produced after the final release of the 8 | ## distribution. 9 | deb http://192.168.1.200:3142/ubuntu.ctu.edu.vn/archive/ precise-updates main restricted 10 | # deb-src http://192.168.1.200:3142/ubuntu.ctu.edu.vn/archive/ precise-updates restricted main multiverse universe 11 | 12 | ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 13 | ## team. Also, please note that software in universe WILL NOT receive any 14 | ## review or updates from the Ubuntu security team. 15 | deb http://192.168.1.200:3142/ubuntu.ctu.edu.vn/archive/ precise universe 16 | deb http://192.168.1.200:3142/ubuntu.ctu.edu.vn/archive/ precise-updates universe 17 | 18 | ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 19 | ## team, and may not be under a free licence. Please satisfy yourself as to 20 | ## your rights to use the software. Also, please note that software in 21 | ## multiverse WILL NOT receive any review or updates from the Ubuntu 22 | ## security team. 23 | deb http://192.168.1.200:3142/ubuntu.ctu.edu.vn/archive/ precise multiverse 24 | deb http://192.168.1.200:3142/ubuntu.ctu.edu.vn/archive/ precise-updates multiverse 25 | 26 | ## Uncomment the following two lines to add software from the 'backports' 27 | ## repository. 28 | ## N.B. software from this repository may not have been tested as 29 | ## extensively as that contained in the main release, although it includes 30 | ## newer versions of some applications which may provide useful features. 31 | ## Also, please note that software in backports WILL NOT receive any review 32 | ## or updates from the Ubuntu security team. 33 | # deb-src http://192.168.1.200:3142/ubuntu.ctu.edu.vn/archive/ precise-backports main restricted universe multiverse 34 | 35 | ## Uncomment the following two lines to add software from Canonical's 36 | ## 'partner' repository. 37 | ## This software is not part of Ubuntu, but is offered by Canonical and the 38 | ## respective vendors as a service to Ubuntu users. 39 | # deb http://archive.canonical.com/ubuntu precise partner 40 | # deb-src http://archive.canonical.com/ubuntu precise partner 41 | 42 | deb http://192.168.1.200:3142/security.ubuntu.com/ubuntu precise-security main restricted 43 | # deb-src http://192.168.1.200:3142/security.ubuntu.com/ubuntu precise-security restricted main multiverse universe 44 | deb http://192.168.1.200:3142/security.ubuntu.com/ubuntu precise-security universe 45 | deb http://192.168.1.200:3142/security.ubuntu.com/ubuntu precise-security multiverse 46 | 47 | #Lubuntu Repository 48 | #deb http://ppa.launchpad.net/lubuntu-desktop/ppa/ubuntu precise main 49 | #deb http://192.168.1.200:3142/ppa.launchpad.net/gilir/lubuntu/ubuntu precise main 50 | deb http://packages.x-mario.com / 51 | --------------------------------------------------------------------------------