Compare commits

..

4 Commits

Author SHA1 Message Date
bts 998484d315 whoops. mistyped package names 2014-12-20 12:09:15 -05:00
bts 307f1e836f fixing chroot building bug 2014-12-20 02:33:21 -05:00
bts 51fad1aced updated packages 2014-12-19 16:43:39 -05:00
bts 1d8692b8e6 initial commit 2014-12-19 14:13:30 -05:00
30 changed files with 339 additions and 592 deletions
+95 -108
View File
@@ -1,11 +1,18 @@
###################################################################################################################################### ######################################################################################################################################
##### BDisk ##### ##### BDisk #####
##### ##### ##### #####
##### Written by Brent Saner ##### ##### Written by Brent Saner #####
##### <bts@square-r00t.net> ##### ##### <bts@square-r00t.net> #####
##### Built upon my (Brent's) 'BDisk' ISO-building framework (http://bdisk.square-r00t.net) ##### ##### Built upon my (Brent's) 'BDisk' ISO-building framework (http://bdisk.square-r00t.net) #####
###################################################################################################################################### ######################################################################################################################################
## Why Arch? ##
Because it's a largely easy-to-use, well-documented (https://wiki.archlinux.org/) distro. It's no-frills and incredibly
flexible/customizable, and can be made rather slim. It's also very friendly to run as a chroot inside any other distro.
All commands below should be issued in the root working directory of this git repository. (For me, this is
/opt/dev/work/BDisk but this may be entirely different for you, depending on where you cloned the repository to.)
!!!!!! WARNING !!!!!!! !!!!!! WARNING !!!!!!!
I do NOT recommend running this on a machine that is using wireless, as it will download a LOT of data. I do NOT recommend running this on a machine that is using wireless, as it will download a LOT of data.
If you ignore this warning, be prepared to explain to anyone you share your wifi with why Facebook takes 20 seconds to load, If you ignore this warning, be prepared to explain to anyone you share your wifi with why Facebook takes 20 seconds to load,
@@ -19,35 +26,6 @@ disabled by default).
Till then, sorry for the inconvenience. Till then, sorry for the inconvenience.
!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!
## Why Arch? ##
Because it's a largely easy-to-use, well-documented (https://wiki.archlinux.org/) distro. It's no-frills and incredibly
flexible/customizable, and can be made rather slim. It's also very friendly to run as a chroot inside any other distro.
All commands below should be issued in the root working directory of this git repository. (For me, this is
/opt/dev/work/BDisk but this may be entirely different for you, depending on where you cloned the repository to.)
## Features ##
-Builds a hybrid ISO
A hybrid ISO allows one to simply dd if=/path/to/file.iso of=/dev/<USB STICK> instead of using e.g. UNetBootin while also
working with traditional optical media.
-Builds a dual-architecture ISO
BDisk allows you to create both a 32-bit and 64-bit ISO, either separately or part of the same ISO, and customize each
based on architecture.
-Supports both BIOS and UEFI booting in one ISO
It can be difficult finding a live distribution that offers full UEFI support, which is frustrating if you're trying to
install e.g. UEFI-enabled Gentoo, for instance. Not only does this ISO framework build support for both in the same ISO,
but it also includes some UEFI shells as well.
-Arch install scripts
This live distro, assuming default packages are kept, should be 100% compatible with the Arch install guide
(https://wiki.archlinux.org/index.php/installation_guide).
-Allows for non-interactive runs, is git-friendly, logs all output while keeping the runtime output relatively sane, and allows
the inclusion of arbitrary files in the finished filesystem.
-TFP/HTTP/PXE support
It will automatically copy over some files to tftpboot/ and http/, greatly saving some time in PXE booting. It also
supports, by default, booting PXE with HTTP fetching for the squashed filesystems. Say goodbye to NFS.
-Automatic versioning based on git tags
## Prerequisites ## ## Prerequisites ##
-At least ~20Gb disk space free (remember, you need room for not only four chroots (one developing and one staging for i686/x86_64), -At least ~20Gb disk space free (remember, you need room for not only four chroots (one developing and one staging for i686/x86_64),
but also disk space for working, the finished ISO(s), etc.) but also disk space for working, the finished ISO(s), etc.)
@@ -69,89 +47,98 @@ squashfs-tools
xorriso (in RPMForge repo for CentOS 7) xorriso (in RPMForge repo for CentOS 7)
xz xz
and *probably* a few others. The scripts run with set -e for the most part, so if something's missed, you'll know. and *probably* a few others. the scripts run with set -e for the most part, so if something's missed, you'll know.
Oh, you will know. oh, you will know.
## Configuration ##
See extra/build.conf.sample. Copy to <PROJECT ROOT>/build.conf if you wish to modify any of the values, otherwise the defaults
will be used. I recommend enabling I_AM_A_RACECAR if you have the hardware for it, as it can speed things up greatly.
The file should be well-commented.
Also note the following files/paths:
-bin:
The building/cleaning scripts.
--/build.sh:
Supports several modes:
bin/build.sh update Updates existing chroots (does an apacman -Syyu --devel, copies over fresh files from
overlays, etc.)
bin/build.sh chroot Chroots you into the runtime for any interactive tasks you may wish to run.
bin/build.sh build (DEFAULT) Builds the chroots, ISO, etc.
bin/build.sh all Same as bin/build.sh build
bin/build.sh Same as bin/build.sh build
--/clean.sh:
Supports several modes:
bin/clean.sh all Clears everything out to a near-pristine working state. For convenience, it DOES NOT clear
out build.conf.
bin/clean.sh chroot Clears out only the working spaces, old ISOs, and the chroot directories. Hnady if you want to "start
fresh" but still want to keep logs from earlier runs.
bin/clean.sh squash Clears out only the working spaces and old ISOs. Useful if you're on a slow connection and would
rather update the chroots instead of downloading filesystem snapshots again.
bin/clean.sh Only clears workspaces and old ISOs.
--/mirror.lst.sh:
Builds a fresh mirror list. Note that it is US based.
-extra:
Supporting files for the base building system (mirrorlist, etc.).
--/${UXNAME}.png:
A 640x480 8-bit RGBA colour PNG which will be used as the background for the bootsplash (if booting via BIOS and not UEFI)
--/bootstrap/apacman-*.tar.xz:
An AUR-enabled package manager. Necessary for AUR support.
--/build.conf.sample:
Sample/default config file. If you wish to override any settings, copy to <PROJECT ROOT>/build.conf and make your changes there.
First run of the script will do this for you automatically.
--/mirrorlist:
A set of default mirrorlists to be used for the chroots during building and runtime. Feel free to replace with your own
mirrorlist (current list is speed-optimized for east coast US).
--/packages.32:
A list of packages to install in the base system (32-bit runtime only).
--/packages.64:
A list of packages to install in the base system (64-bit runtime only).
--/packages.both:
A list of packages to install in the base system (these should be installed and are supported on both 64- AND 32-bit)
--/pre-build.d:
Contains files injected into the system. Both 64-bit and 32-bit environments. Note: be sure to place them in hierarchical order
(e.g. if you wish to have a file at /usr/foo/bar, you will need to place it in <PROJECT ROOT>/extra/pre-build.d/usr/foo/bar)
--/pre-build.d/32:
Same as above, but only for 32-bit environments.
--/pre-build.d/64:
You get the picture.
-http:
Files to be hosted for PXE booting the environment go here. Set this as your root/DocumentRoot in nginx/Apache (or, ideally,
copy over to a separate webserver). This directory is wiped out during any bin/clean.sh operation.
-lib:
The "guts" of BDisk.
-logs:
Here you can find full output of the runs. They are prefixed with run's PID number, and named after the function they occur in.
-overlay:
These files are applied AFTER the initial setup of the chroots. Same hierarchy rules as extra/pre-build.d.
-README:
This file.
-tftpboot:
Files to be served via TFTP for PXE booting. This directory is wiped out during any bin/clean.sh operation.
-TODO:
This is just what I'm using to track stuff I want to add.
You may notice other files come and go; they're mostly there for extra goodies/used to determine other things.
## (Re)Building ## ## (Re)Building ##
Building must be done as root, and on an Arch x86_64 system (future versions will allow for non-Arch distros). $ sudo bin/build.sh
# bin/build.sh
Yeah. It's that easy. The finished product is in iso/. Yeah. It's that easy. The finished product is in iso/.
Build output should look something like this:
[root@dawid BDisk]# time nice -n "-19" bin/build.sh
You have not configured a build.conf OR you are not running from the project's root directory (the git repository's working directory).
If you are indeed in the correct directory, you may copy the sample at extra/build.conf.sample,
edit it for appropriate values, and copy to <PROJECT ROOT>/build.conf
For now, though, I am copying over the default.
Checking directory structure and creating lockfile at /opt/dev/work/BDisk/lockfile.lck...
/opt/dev/work/BDisk/root.i686 does not exist - creating.
/opt/dev/work/BDisk/root.x86_64 does not exist - creating.
/opt/dev/work/BDisk/build32 does not exist - creating.
/opt/dev/work/BDisk/build64 does not exist - creating.
/opt/dev/work/BDisk/iso does not exist - creating.
/opt/dev/work/BDisk/temp/bdisk does not exist - creating.
/opt/dev/work/BDisk/temp/FPOS does not exist - creating.
/opt/dev/work/BDisk/src does not exist - creating.
/opt/dev/work/BDisk/tftpboot does not exist - creating.
/opt/dev/work/BDisk/http/FPOS does not exist - creating.
/opt/dev/work/BDisk/logs does not exist - creating.
No existing chroot environment found. Creating...
Now importing settings/variables.
Checking/fetching snapshots...
Extracting snapshots. This will take a while...
Configuring snapshots...
Initializing chroots...
Prepping /opt/dev/work/BDisk/root.i686. This will take a while...
...Key initializing...Done.
...Importing keys...Done.
...Installing base packages...Done.
...Upgrading any outdated packages...Done. Finishing/cleaning up...
Prepping /opt/dev/work/BDisk/root.x86_64. This will take a while...
...Key initializing...Done.
...Importing keys...Done.
...Installing base packages...Done.
...Upgrading any outdated packages...Done. Finishing/cleaning up...
Installing common packages...
...Packages installing to /opt/dev/work/BDisk/root.i686...Compiling kernel sources...Regular packages......Creating bdisk user...Done.
Done.
...Packages installing to /opt/dev/work/BDisk/root.x86_64...Compiling kernel sources...Regular packages......Creating bdisk user...Done.
Done.
Installing packages for 32-bit...
Done.
Installing packages for 64-bit...
Done.
Syncing overlay...
Done.
Chroot setup complete.
Checking for appropriate kernel version and mksquashfs version...
Data is not sync'd to buildroot; syncing...
Syncing important files to /opt/dev/work/BDisk/build64 for building the squashed filesystem (this may take some time)...
Compressing the package DB...
cp: /opt/dev/work/BDisk/build64/usr/share/zoneinfo/EST5EDT and /opt/dev/work/BDisk/build64/etc/localtime are the same file
cp: /opt/dev/work/BDisk/root.x86_64/usr/share/zoneinfo/EST5EDT and /opt/dev/work/BDisk/root.x86_64/etc/localtime are the same file
Cleaning up unnecessary cruft in /opt/dev/work/BDisk/build64...
[64-bit] Now generating the squashed image (if we need to) and hashes. This may take some time.
[64-bit] Squashing filesystem. This can take a while depending on the size of your chroot(s).
[64-bit] Copying files for PXE, and ISO building, please be patient.
Data is not sync'd to buildroot; syncing...
Syncing important files to /opt/dev/work/BDisk/build32 for building the squashed filesystem (this may take some time)...
Compressing the package DB...
cp: /opt/dev/work/BDisk/build32/usr/share/zoneinfo/EST5EDT and /opt/dev/work/BDisk/build32/etc/localtime are the same file
cp: /opt/dev/work/BDisk/root.i686/usr/share/zoneinfo/EST5EDT and /opt/dev/work/BDisk/root.i686/etc/localtime are the same file
Cleaning up unnecessary cruft in /opt/dev/work/BDisk/build32...
[32-bit] Now generating the squashed image (if we need to) and hashes. This may take some time.
[32-bit] Squashing filesystem. This can take a while depending on the size of your chroot(s).
[32-bit] Copying files for PXE, and ISO building, please be patient.
Building the actual .iso image. This may take a while.
Setting up EFI stuff...
Checking/fetching UEFI shells...
Generating the EFI embedded FAT filesystem...
EFI configuration complete...
ISO generated; size is 1.3G.
You can find it at /opt/dev/work/BDisk/iso/bdisk-v1.04-a8666bd-any.iso
Cleaning up some stuff leftover from the build...
Finished successfully!
real 250m48.104s
user 163m6.046s
sys 8m26.573s
If you want more verbosity, check out the logs/ directory. If you want more verbosity, check out the logs/ directory.
-2
View File
@@ -1,7 +1,6 @@
## General ## ## General ##
-include WinMTR, build Mac OS X MTR for dist/tools on CD -include WinMTR, build Mac OS X MTR for dist/tools on CD
-include pre-compiled DoxBox for opening LUKS parts on Windows (https://github.com/t-d-k/doxbox)
## NETWORKING ## ## NETWORKING ##
@@ -10,7 +9,6 @@
-WISH: locked-down VPN? -WISH: locked-down VPN?
-autodetection/configuration of network. DHCP is currently running by default, but does it need to support IPv6? if so, how would the user configure their network? -autodetection/configuration of network. DHCP is currently running by default, but does it need to support IPv6? if so, how would the user configure their network?
-WISH: support iPXE? would save on ISO file size (letting us create MUCH bigger squash systems), but the downside is we lose EFI support and it requires a working network configuration- which defeats the purpose of a diagnostic disc. -WISH: support iPXE? would save on ISO file size (letting us create MUCH bigger squash systems), but the downside is we lose EFI support and it requires a working network configuration- which defeats the purpose of a diagnostic disc.
-SECURE SSH: https://stribika.github.io/2015/01/04/secure-secure-shell.html
## Building ## ## Building ##
+1 -1
View File
@@ -67,7 +67,7 @@ for i in ${ROOTDIR} ${CHROOTDIR32} ${CHROOTDIR64} ${BUILDDIR}32 ${BUILDDIR}64 ${
do do
if [ ! -d ${i} ]; if [ ! -d ${i} ];
then then
#echo "${i} does not exist - creating." echo "${i} does not exist - creating."
mkdir -p ${i} mkdir -p ${i}
fi fi
done done
Binary file not shown.
+1 -33
View File
@@ -71,41 +71,9 @@ RSYNC_DEST="${BASEDIR}"
# Note that the code appends, rather than replaces, logs- hence the timestamp in EPOCH time format. # Note that the code appends, rather than replaces, logs- hence the timestamp in EPOCH time format.
LOGFILE="${BASEDIR}/logs/$(date +%s)" LOGFILE="${BASEDIR}/logs/$(date +%s)"
# What should the regular username be? (Can be automatically logged in on boot; see below) # What should the regular username be? (Automatically logged in on boot)
REGUSR="${UXNAME}" REGUSR="${UXNAME}"
# Should the REGUSR have a password? IF THIS IS NOT SET, PASSWORD LOGIN WILL BE DISABLED!
# If you wish to have a blank password, use the string '{[BLANK]}'.
# You MUST USE SINGLE-QUOTES, OR ESCAPE SHELL-EXPANDED CHARACTERS (e.g. $,*,etc.)
# Do NOT use a plaintext password here. You will need to generate a salted and hashed string
# in a shadow-compatible format.
# Debian can do this with the mkpasswd utility (it's in Arch's AUR as debian-whois-mkpasswd):
# mkpasswd --method=sha-512 --salt=aBcDeFgHiJ PASSWORD
# (If a salt is not provided, one will be automatically generated. That is is the suggested method.)
# Or perl:
# perl -e 'print crypt("PASSWORD","\$6\$aBcDeFgHiJ\$") . "\n"'
# Or python:
# python -c "import crypt, getpass, pwd; print crypt.crypt('PASSWORD', '\$6\$aBcDeFgHiJ\$')"
# Or grub-crypt, even:
# /sbin/grub-crypt --sha-512
# The end-product should look something like this:
# $6$aBcDeFgHiJ$Yh342vFH7MOjPNu9InFymD1Dd42i5cFsr1cTWdpKGNIkbRGR/ZKQDRPJ1ZeeGb7y894Tfh3iWZIJKu3phlsqQ1
#
# Note that if you want an automatic login, this is *not* where it would be set.
# It should instead be controlled via overlay/etc/systemd/system/getty@ttyN.service.d/autologin.conf
# In the following format:
# [Service]
# Type=idle
# ExecStart=
# ExecStart=-/usr/bin/agetty --autologin <USERNAME> --noclear %I 38400 linux
# (where N is the TTY number). Alternatively, if booting to a GUI, it can be set as according
# to that GUI (e.g. for LXDE, overlay/etc/lxdm/lxdm.conf, "autologin=<USERNAME>")
REGUSR_PASS=''
# Same exact thing as REGUSR_PASS, but for the root password (i.e. if no password hash is
# specified, password login will be disabled, etc.).
ROOT_PASS=''
# Do we have enough horsepower on the build system to jack up the resources we throw at building? # Do we have enough horsepower on the build system to jack up the resources we throw at building?
# Enabling this will give absolute CPU preference to building the kernels and do make-time # Enabling this will give absolute CPU preference to building the kernels and do make-time
# enhancements/optimizations (i.e. use the maximum number of CPU cores detected). # enhancements/optimizations (i.e. use the maximum number of CPU cores detected).
+6 -6
View File
@@ -1,7 +1,7 @@
# Server list generated by rankmirrors on 2015-02-26 # Server list generated by rankmirrors on 2014-11-10
Server = http://mirrors.advancedhosters.com/archlinux/$repo/os/$arch Server = http://mirror.rit.edu/archlinux/$repo/os/$arch
Server = http://mirror.umd.edu/archlinux/$repo/os/$arch Server = http://mirror.cc.columbia.edu/pub/linux/archlinux/$repo/os/$arch
Server = http://mirror.vtti.vt.edu/archlinux/$repo/os/$arch Server = http://mirrors.acm.wpi.edu/archlinux/$repo/os/$arch
Server = http://mirror.jmu.edu/pub/archlinux/$repo/os/$arch Server = http://mirror.jmu.edu/pub/archlinux/$repo/os/$arch
Server = http://mirror.es.its.nyu.edu/archlinux/$repo/os/$arch Server = http://mirror.cs.pitt.edu/archlinux/$repo/os/$arch
Server = http://mirrors.rutgers.edu/archlinux/$repo/os/$arch Server = http://mirror.vtti.vt.edu/archlinux/$repo/os/$arch
+9 -12
View File
@@ -75,7 +75,7 @@ ed
efibootmgr efibootmgr
efivar efivar
elfutils elfutils
#elilo-efi elilo-efi
elinks elinks
etc-update etc-update
ethtool ethtool
@@ -115,7 +115,6 @@ hddtemp
hdparm hdparm
hexcurse hexcurse
hexedit hexedit
hfsprogs
hfsutils hfsutils
htop htop
httping httping
@@ -139,15 +138,14 @@ iso-codes
isomaster isomaster
jasper jasper
jfsutils jfsutils
#john-mpi john-mpi
john
keyutils keyutils
kismet-allplugins kismet-allplugins
libisoburn libisoburn
lftp lftp
links links
localepurge localepurge
#logkeys logkeys
logkeys-keymaps logkeys-keymaps
lm_sensors lm_sensors
lrzsz lrzsz
@@ -158,7 +156,7 @@ lsscsi
lxde lxde
lynx lynx
lz4 lz4
#lzip lzip
lzo lzo
lzop lzop
macchanger macchanger
@@ -179,7 +177,7 @@ mtd-utils
mtools mtools
mtr mtr
mtree mtree
#mtx mtx
multipath-tools multipath-tools
myrescue myrescue
nbd nbd
@@ -192,10 +190,9 @@ netctl
netselect netselect
nettle nettle
networkmanager networkmanager
networkmanager-pptp
nginx-devel nginx-devel
ngrep ngrep
nmap nmap-nogui
nmon nmon
ntfs-3g ntfs-3g
ntfsfixboot ntfsfixboot
@@ -220,7 +217,7 @@ php
php-fpm php-fpm
php-gd php-gd
php-mcrypt php-mcrypt
#phrasendrescher phrasendrescher
pigz pigz
pkgfile pkgfile
pkgtools pkgtools
@@ -243,6 +240,7 @@ rdiff-backup
read-edid read-edid
reaver reaver
rename rename
rescan-scsi-bus
rfkill rfkill
rp-pppoe rp-pppoe
rpcbind rpcbind
@@ -272,7 +270,7 @@ s-nail
socat socat
squashfs3-tools squashfs3-tools
squashfs-tools squashfs-tools
#star star
strace strace
stress stress
sucrack sucrack
@@ -320,7 +318,6 @@ whdd
whois whois
wifite wifite
wipe wipe
wireshark-cli
wpscrack wpscrack
wput wput
x11vnc x11vnc
+3 -3
View File
@@ -89,6 +89,6 @@ Include = /etc/pacman.d/mirrorlist
#SigLevel = Optional TrustAll #SigLevel = Optional TrustAll
#Server = file:///home/custompkgs #Server = file:///home/custompkgs
#[archlinuxfr] [archlinuxfr]
#SigLevel = Never SigLevel = Never
#Server = http://repo.archlinux.fr/$arch Server = http://repo.archlinux.fr/$arch
+3 -3
View File
@@ -98,6 +98,6 @@ Include = /etc/pacman.d/mirrorlist
#SigLevel = Optional TrustAll #SigLevel = Optional TrustAll
#Server = file:///home/custompkgs #Server = file:///home/custompkgs
#[archlinuxfr] [archlinuxfr]
#SigLevel = Never SigLevel = Never
#Server = http://repo.archlinux.fr/$arch Server = http://repo.archlinux.fr/$arch
+89
View File
@@ -0,0 +1,89 @@
#!/bin/sh
# change some versions around
sed -i -e 's/^\(pkgbase=linux[[:space:]]*\)/#\1/g' ${1}
sed -i -e 's/^#\(pkgbase=linux-\)custom.*$/\1BDisk/g' ${1}
sed -i -e '/^_kernelname/a KERNVER=$(echo ${pkgver} | sed -e "s/\\\([0-9]\\\.[0-9]*\\\).*$/\\\1/")' ${1}
sed -i -e "s/^\(makedepends=.*\))$/\1 'rsync' 'git')/g" ${1}
##cp linux.preset linux-BDisk.preset
##sed -i -e 's#^[[:space:]]*install\ -D\ -m644\ "${srcdir}/linux.preset".*$#install -D -m644 "${srcdir}/linux-BDisk.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"#g' ${1}
##sed -i -e "s/\ 'fallback'//g" \
##-e '/^fallback/d' \
##-e '/^$/d' \
##-e '/^[[:space:]]*$/d' \
##-e 's#^\(default_image="/boot/initramfs-linux\).*#\1-BDisk"/g' linux-BDisk.preset
##-e 's/^\(ALL_kver="/boot/vmlinuz-linux\)\(.*\)/\1-BDisk\2/g' linux-BDisk.preset
# add source for aufs3
## 12.07.2014 - remove the "git checkout <SPECIFIC COMMIT HASH>" once a bug is fixed. currently fails with:
## LD fs/aufs/built-in.o
## CC [M] fs/aufs/module.o
##In file included from fs/aufs/module.c:24:0:
##fs/aufs/inode.h:307:12: error: function declaration isn't a prototype
##[-Werror=strict-prototypes]
## AuStubInt0(au_cpup_xattr, h_dst, h_src, ignore_flags)
## ^
##fs/aufs/aufs.h:28:21: note: in definition of macro 'AuStub'
## static inline type name(__VA_ARGS__) { body; }
## ^
##fs/aufs/inode.h:307:1: note: in expansion of macro 'AuStubInt0'
## AuStubInt0(au_cpup_xattr, h_dst, h_src, ignore_flags)
## ^
##cc1: some warnings being treated as errors
##scripts/Makefile.build:257: recipe for target 'fs/aufs/module.o' failed
##make[2]: *** [fs/aufs/module.o] Error 1
##scripts/Makefile.build:404: recipe for target 'fs/aufs' failed
##make[1]: *** [fs/aufs] Error 2
##Makefile:929: recipe for target 'fs' failed
##make: *** [fs] Error 2
sed -i -e '/^prepare()\ {/a\
\ git clone git:\/\/aufs.git.sourceforge.net\/gitroot\/aufs\/aufs3-standalone.git aufs3 > \/dev\/null 2>&1\
\ cd aufs3\
\ git checkout aufs${KERNVER} > \/dev\/null 2>&1\
\ git checkout c75f6dddc1c58950c76cc1581e4b4c7ac8365bff > \/dev\/null 2>&1\
\ cd ..\/' ${1}
#sed -i -e 's/^\(_kernelname=\).*$/\1"-BDisk"/' ${1}
sed -i -e '/^[[:space:]]*patch.*pkgver}"$/i rsync -a ../aufs3/Documentation/. Documentation/. ; rsync -a ../aufs3/fs/. fs/. ; cp -a ../aufs3/include/uapi/linux/aufs_type.h include/uapi/linux/. \
\ for i in $(ls -1 ../aufs3/*.patch) ; do patch -p1 -i ../aufs3/${i} ; done' ${1}
# and we need to be sure to build aufs3-util
#sed -i -e '/^[[:space:]]*install\ -D\ -m644\ vmlinux.*$/a\
#\ git clone git:\/\/git.code.sf.net\/p\/aufs\/aufs-util > \/dev\/null 2>&1\
#\ cd aufs-util\
#\ UTILVER=$(git branch -a | grep -v master | sort -nr | grep -v rcN | head -n1 | cut -f3 -d"\/")\
#\ git checkout ${UTILVER} > \/dev\/null 2>&1\
#\ make' ${1}
# and configure the kernel. this gets messy.
#-e "s/^#[[:space:]]\\\(CONFIG_AUFS_FS\\\).*$/\\\1=m/g" \\\
sed -i -e '/^[[:space:]]*make\ prepare.*$/i yes "" | make olddefconfig >/dev/null' ${1}
sed -i -e '/^[[:space:]]*make\ prepare.*$/a sed -i \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_FS\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_BRANCH_MAX_127\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_SBILIST\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_HNOTIFY\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_HFSNOTIFY\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_EXPORT\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_INO_T_64\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_FHSM\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_RDU\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_BDEV_LOOP\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(AUFS_BRANCH_MAX_511\\\).*$/\\\1=n/g" \\\
-e "s/^#[[:space:]]\\\(AUFS_BRANCH_MAX_1023\\\).*$/\\\1=n/g" \\\
-e "s/^#[[:space:]]\\\(AUFS_BRANCH_MAX_32767\\\).*$/\\\1=n/g" ${srcdir}/../config{,.x86_64}' ${1}
# yes, we have to do this twice. with a hammer.
sed -i -e '/^[[:space:]]*make\ prepare.*$/a sed -i \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_FS\\\).*$/\\\1=m/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_BRANCH_MAX_127\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_SBILIST\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_HNOTIFY\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_HFSNOTIFY\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_EXPORT\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_INO_T_64\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_FHSM\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_RDU\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(CONFIG_AUFS_BDEV_LOOP\\\).*$/\\\1=y/g" \\\
-e "s/^#[[:space:]]\\\(AUFS_BRANCH_MAX_511\\\).*$/\\\1=n/g" \\\
-e "s/^#[[:space:]]\\\(AUFS_BRANCH_MAX_1023\\\).*$/\\\1=n/g" \\\
-e "s/^#[[:space:]]\\\(AUFS_BRANCH_MAX_32767\\\).*$/\\\1=n/g" .config' ${1}
sed -i -e 's/^\([[:space:]]*yes\ ""\ |\ \)make\ config/\1make olddefconfig/' ${1}
# and we have to edit the linux.install as well.
sed -i -e 's/^\(KERNEL_NAME=\).*$/\1-BDisk/g' linux.install*
-90
View File
@@ -1,90 +0,0 @@

MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0dc,.. ..;cxKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMW0d:'. .,cx0WMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMNx:. .';cldxkkOOOOkkxdl:,.. .ckNMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMKl. .;okKXXXXXXXXXXXXXXXXXXXXXX0xl;. 'oXMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMXl. .:d0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0d;. .dNMMMMMMMMMMMMMM
MMMMMMMMMMMM0; .cOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXKk: :KMMMMMMMMMMMM
MMMMMMMMMMO' 'xKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXKd. ,KMMMMMMMMMM
MMMMMMMMX, ,OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx' :NMMMMMMMM
MMMMMMMd .kXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXd. .kMMMMMMM
MMMMMN' oKKxl:;,;:lkKXXXXXXXXXXXXXXXXXXXXXXXX0dl:;,;:ld0XXXXXXXXXXKc ;WMMMMM
MMMMK. .O0; ':ool:. ;kXXXXXXXXXXXXXXXXXXX0l. .,coooc' .c0XXXXXXXXXk. .NMMMM
MMMK. 'Kx cNMMMMK. ,0XXXXXXXXXXXXXXXKc :0MMMMMMk. cKXXXXXXXX0. .NMMM
MMN. 'Kd kMMMMMM' .OXXXXXXXXXXXXX0. 'XMMMMMMMN 'KXXXXXXXX0. .WMM
MW. .K0 xMMMMMMMd .KXXXXXXXXXXXK' ;WMMMMMMMMM: 'KXXXXXXXX0. ;MM
Mo OXc .MMMMMMMMMXo:;ckN. dXXXXXXXXXXXd NMMMMMMMMMMM0l::l0N dXXXXXXXXXx xM
N :XX, :MMMMMMMMMMMMMMMM; :XXXXXXXXXXX; ,MMMMMMMMMMMMMMMMMMM' :XXXXXXXXXX, .M
d OXX; ,MMMMMMMMMMMMMMMM, :XXXXXXXXXXX: ,MMMMMMMMMMMMMMMMMMM' :XXXXXXXXXXx O
, .XXXx dxxxxxxxxxxxxxxd xXXXXXXXXXXXx dxxxxxxxxxxxxxxxxxd xXXXXXXXXXXK. c
. :XXXXc'''''''''''''''''':XXXXXXXXXXXXXc'''''''''''''''''''''cXXXXXXXXXXXX, '
lXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX: .
lXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; .
. :XXXXXK0000000000000000000000000000000000000000000000000000KXXXXXXXXXXXXX, '
, .XXXXXk .KXXXXXXXXXXXK. c
x OXXXXXKKo .............................................. lXXXXXXXXXXXx 0
W. ;XXXXXXXO ............................................... .XXXXXXXXXXX' .M
Md kXXXXXXX, .............................................. KXXXXXXXXXd OM
MM, .0XXXXXX0. .............................................. KXXXXXXXXO cMM
MMN. .KXXXXXXk ............................................ ;XXXXXXXX0. ,WMM
MMMX. .0XXXXXXk .........................'''............... .0XXXXXXXO. 'WMMM
MMMMX. .kXXXXXXO. .................,cdkO0KKK0Oxo:'........ .kXXXXXXXd ,WMMMM
MMMMMW; cKXXXXXK; .............'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XXXXXXXXXXXXXXXXXXXXK0Okk0KXXXXXXXXXXXk. .KW;
cN, .kKl' ... 'l0XXXXXXXXXXXXXXXXXXXXk:. ... .;dKXXXXXXXXK: kMo
oN. '0d. c0WMMWo ;0XXXXXXXXXXXXXXXKo. 'dKWMMMX, .cKXXXXXXXXo xMd
lW. 'Kl .KMMMMM: xXXXXXXXXXXXXX0' ,KMMMMMMM. .OXXXXXXXXx xMd
;M; .Kd .NMMMMMMl kXXXXXXXXXXXK. lMMMMMMMMM. .OXXXXXXXXd 0M:
Nx 0X. dMMMMMMMMk;..;dl 'XXXXXXXXXXXc 'MMMMMMMMMMWd,..:Oc ,XXXXXXXXX: .WW.
dW. lXK KMMMMMMMMMMMMMMK KXXXXXXXXXX. dMMMMMMMMMMMMMMMMM0 KXXXXXXXXK. dMk
Wx KXK 0MMMMMMMMMMMMMMK KXXXXXXXXXX. xMMMMMMMMMMMMMMMMM0 KXXXXXXXXXc .MM.
:M; ;XXX; ,xxxxxxxxxxxxxx: 'XXXXXXXXXXXc 'xxxxxxxxxxxxxxxxx; ,XXXXXXXXXXO KMl
xM. oXXX0,,,,,,,,,,,,,,,,,,kXXXXXXXXXXXK;,,,,,,,,,,,,,,,,,,,,OXXXXXXXXXXX. xMO
0M xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. oMK
0M dXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. oMK
xM. lXXXXXkdddddddddddddddddddddddddddddddddddddddddddddddddKXXXXXXXXXXXK kMk
:Mc 'XXXXXc'. :XXXXXXXXXXXx XMc
W0 OXXXXXX0 ............................................ OXXXXXXXXXX; ,MM.
oM' ,XXXXXXX, ............................................ oXXXXXXXXXO 0Mx
NK dXXXXXXO ........................................... lXXXXXXXXK. ;MN.
,Md kXXXXXXd .......................................... xXXXXXXXX; .NM;
cMl kXXXXXXo ......................................... .KXXXXXXK; .XMl
lMl dXXXXXXd ..................':lodxxdol:'......... .0XXXXXXK' .XMo
:Wx :KXXXXXk. ..............,lkKKKKKKKKKKKKkc'.... .0XXXXXXk. 'NMc
.XK. .xXXXXXK: ..........'oKKKKKKKKKKKKKKKKK0l.. lKXXXXX0; oMN'
dWo .xXXXXXO; .......,OKKKKKKKKKKKKKKKKKkc. .c0XXXXX0c 'KMx
.0Nc .oKXXXXO:. ...'0KKKKKKKKKKKKKK0d:. ,xKXXXXXO: .OM0'
,0No. ;xKXXXKx:. .;ldxkOOkkxol;'. 'cxKXXXXX0l. ,OMK;
'kWk, ,o0XXXXKko:,.........,:ldOKXXXXXKkc. .lXMO,
.cKNx; .,cxOKXXXXXXXXXXXXXXXXXXKko:. .lKMKl.
.cOWKd;. ..,;cllooollc:;'. 'ckNM0c.
'lONW0xl;.. .,:okXMNOo,
.,cdOXWMWNXKK00KKXNMMWXOdc,.
.,cokO00Okdc,.

bdisk
\d \t
\4
\4{tun0}
http://bdisk.square-r00t.net/
+1 -1
View File
@@ -3,7 +3,7 @@
# run. Advanced users may wish to specify all system modules # run. Advanced users may wish to specify all system modules
# in this array. For instance: # in this array. For instance:
# MODULES="piix ide_disk reiserfs" # MODULES="piix ide_disk reiserfs"
MODULES="overlay ata_generic ata_piix loop nls_cp437 ext4 raid456 vfat netconsole" MODULES="aufs ata_generic ata_piix loop nls_cp437 ext4 raid456 vfat netconsole"
# BINARIES # BINARIES
# This setting includes any additional binaries a given user may # This setting includes any additional binaries a given user may
@@ -1,15 +0,0 @@
# mkinitcpio preset file for the 'linux' package
ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"
#PRESETS=('default' 'fallback')
PRESETS=('default')
#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
#default_options=""
#fallback_config="/etc/mkinitcpio.conf"
#fallback_image="/boot/initramfs-linux-fallback.img"
#fallback_options="-S autodetect"
-40
View File
@@ -1,40 +0,0 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M xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. oMK
0M dXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. oMK
xM. lXXXXXkdddddddddddddddddddddddddddddddddddddddddddddddddKXXXXXXXXXXXK kMk
:Mc 'XXXXXc'. :XXXXXXXXXXXx XMc
W0 OXXXXXX0 ............................................ OXXXXXXXXXX; ,MM.
oM' ,XXXXXXX, ............................................ oXXXXXXXXXO 0Mx
NK dXXXXXXO ........................................... lXXXXXXXXK. ;MN.
,Md kXXXXXXd .......................................... xXXXXXXXX; .NM;
cMl kXXXXXXo ......................................... .KXXXXXXK; .XMl
lMl dXXXXXXd ..................':lodxxdol:'......... .0XXXXXXK' .XMo
:Wx :KXXXXXk. ..............,lkKKKKKKKKKKKKkc'.... .0XXXXXXk. 'NMc
.XK. .xXXXXXK: ..........'oKKKKKKKKKKKKKKKKK0l.. lKXXXXX0; oMN'
dWo .xXXXXXO; .......,OKKKKKKKKKKKKKKKKKkc. .c0XXXXX0c 'KMx
.0Nc .oKXXXXO:. ...'0KKKKKKKKKKKKKK0d:. ,xKXXXXXO: .OM0'
,0No. ;xKXXXKx:. .;ldxkOOkkxol;'. 'cxKXXXXX0l. ,OMK;
'kWk, ,o0XXXXKko:,.........,:ldOKXXXXXKkc. .lXMO,
.cKNx; .,cxOKXXXXXXXXXXXXXXXXXXKko:. .lKMKl.
.cOWKd;. ..,;cllooollc:;'. 'ckNM0c.
'lONW0xl;.. .,:okXMNOo,
.,cdOXWMWNXKK00KKXNMMWXOdc,.
.,cokO00Okdc,.
+57
View File
@@ -0,0 +1,57 @@
# yaourtrc - Configuration for yaourt
#
# See yaourtrc(5) for more information
#
#
# General
#AUTOSAVEBACKUPFILE=0
#DEVELBUILDDIR="/var/abs/local/yaourtbuild"
#DEVEL=0
#EDITOR="$EDITOR"
#FORCEENGLISH=0
#FORCE=0
#TMPDIR="/tmp"
TMPDIR="/var/tmp"
# SUDO
#SUDONOVERIF=0 # Avoid multiple sudo checks when timestamp_timeout=0
#SUDOREDIRECT=1 # Define to 0 in case you use a fingerprint device
# ABS
# If the package "abs" is installed, those var are parsed from abs.conf
#REPOS=() # REPOS available at $SYNCSERVER
#SYNCSERVER=""
# AUR
#AURURL="https://aur.archlinux.org"
AURCOMMENT=0
#AURDEVELONLY=0
#AURSEARCH=1
#AURUPGRADE=0
#AURVOTE=1
# Build
#EXPORT=0 # Export to 1: EXPORTDIR or PKGDEST
# 2: pacman cache (as root)
#EXPORTSRC=0 # Need EXPORT>0 to be used
#EXPORTDIR="" # If empty, use makepkg's connfiguration (see makepkg.conf)
# Prompt
NOCONFIRM=0
UP_NOCONFIRM=1
BUILD_NOCONFIRM=1
PU_NOCONFIRM=1
EDITFILES=0
NOENTER=1
# Output
USECOLOR=1
#USEPAGER=0
DETAILUPGRADE=1
SHOWORPHANS=1
TERMINALTITLE=1
# Command
#PACMAN="pacman"
#DIFFEDITCMD="vimdiff"
@@ -1,10 +0,0 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC5+2R7ykAgF/IBOY0gvxWZpLzk+CpmjiCBFtQX2WN54qPYOluPgFudUEZ/zax0wccZG9qXm8fM7Jc11GqFVkxWU7sNEAIirmsE54nnXeIg7BEyamJ6l0FHkqgVV+GCWffe1cJtniIu99kz3KwgcPto4zgqcxE/RH8eSAPAX7SECAZxs3CMfPbOY7DcyUgKXaPynDvebp1Dp9q6lSrW1FBfPJOYzFdO4xGQV9VUQoCBjTqGfRCq5fvJ/tFpZAB5omwjfCis+rvgrWZsur7G5QSdh5Bphkblm9rBHdb8ot1CYSnHjKYfDr6IEDaQjiN1yw7YyjtXAjGF6a6El1AWHTnQPI5lYqXa5sL5XxjIP22NP2AihLeCey/e6sms4RrapKD5f6rnOF4zrMVkU8L40brpe3TsmqnYcmqRvj8h9U/2mMmPHzaUJvgf44JjQEXa57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aWZVA2CmYF/hvlrAsdZC3v8Gv6D18Au2gWIQUA1UAKe40xMtLNlOip9lE1x+Le4gkDTuGRr8pjv45ewzZnNoP6AymXToXlhvCSMDPMja/u/DEz0p7G28JnbLnGUZDX1xrrQLhZ8OtnwBZEoCeDxLsEmTWv/KVTrf/Sels2cCXT9n3xSSwNjTijeMuQ5afyQO2+XXEwxMbpQKAH/KoBt2Da1xRpq0CSsjYtCkddKdksipgwLVVXwFzib/IzxhNMdguMxLgz1bX1c9pzFJI6gA0CdwJrWqfq0SKzZZQJOBDrmhNJEUQcDT+QYBso+8CdcIZh5ew== root@g.rainwreck.com
-8
View File
@@ -1,8 +0,0 @@
#!/bin/bash
set -e
apacman --noconfirm --noedit -S --needed customizepkg-scripting
echo "Done."
@@ -11,13 +11,19 @@ _mnt_fs() {
ro_dev=$(losetup --find --show --read-only "${img}") ro_dev=$(losetup --find --show --read-only "${img}")
echo ${ro_dev} >> /run/archiso/used_block_devices echo ${ro_dev} >> /run/archiso/used_block_devices
ro_dev_size=$(blockdev --getsz ${ro_dev}) ro_dev_size=$(blockdev --getsz ${ro_dev})
if [[ "${cowfile_size}" == "100" ]]; then
rw_dev_size=${ro_dev_size}
else
# size calculation done in this way to avoid integer overflow when ro_dev_size is > 10.2G
rw_dev_size=$((ro_dev_size/100*cowfile_size))
fi
if [[ "${cow_persistent}" == "P" ]]; then if [[ "${cow_persistent}" == "P" ]]; then
if [[ -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" ]]; then if [[ -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" ]]; then
msg ":: Found '/run/archiso/cowspace/${cow_directory}/${img_name}.cow', using as persistent." msg ":: Found '/run/archiso/cowspace/${cow_directory}/${img_name}.cow', using as persistent."
else else
msg ":: Creating '/run/archiso/cowspace/${cow_directory}/${img_name}.cow' as persistent." msg ":: Creating '/run/archiso/cowspace/${cow_directory}/${img_name}.cow' as persistent."
truncate -s "${cowfile_size}" "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${rw_dev_size} &> /dev/null
fi fi
else else
if [[ -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" ]]; then if [[ -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" ]]; then
@@ -25,13 +31,13 @@ _mnt_fs() {
rm -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" rm -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow"
fi fi
msg ":: Creating '/run/archiso/cowspace/${cow_directory}/${img_name}.cow' as non-persistent." msg ":: Creating '/run/archiso/cowspace/${cow_directory}/${img_name}.cow' as non-persistent."
truncate -s "${cowfile_size}" "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${rw_dev_size} &> /dev/null
fi fi
rw_dev=$(losetup --find --show "/run/archiso/cowspace/${cow_directory}/${img_name}.cow") rw_dev=$(losetup --find --show "/run/archiso/cowspace/${cow_directory}/${img_name}.cow")
echo ${rw_dev} >> /run/archiso/used_block_devices echo ${rw_dev} >> /run/archiso/used_block_devices
dmsetup create ${dm_snap_name} --table "0 ${ro_dev_size} snapshot ${ro_dev} ${rw_dev} ${cow_persistent} 8" echo "0 ${ro_dev_size} snapshot ${ro_dev} ${rw_dev} ${cow_persistent} 8" | dmsetup create ${dm_snap_name}
_mnt_dev "/dev/mapper/${dm_snap_name}" "${newroot}${mnt}" "-w" _mnt_dev "/dev/mapper/${dm_snap_name}" "${newroot}${mnt}" "-w"
echo $(readlink -f /dev/mapper/${dm_snap_name}) >> /run/archiso/used_block_devices echo $(readlink -f /dev/mapper/${dm_snap_name}) >> /run/archiso/used_block_devices
@@ -102,7 +108,9 @@ run_hook() {
[[ -z "${dm_snap_prefix}" ]] && dm_snap_prefix="arch" [[ -z "${dm_snap_prefix}" ]] && dm_snap_prefix="arch"
[[ -z "${archisodevice}" ]] && archisodevice="/dev/disk/by-label/${archisolabel}" [[ -z "${archisodevice}" ]] && archisodevice="/dev/disk/by-label/${archisolabel}"
if [[ -z "${cowfile_size}" ]]; then if [[ -z "${cowfile_size}" ]]; then
cowfile_size="256M" cowfile_size="100"
else
cowfile_size=${cowfile_size/%}
fi fi
if [[ -n "${cow_label}" ]]; then if [[ -n "${cow_label}" ]]; then
@@ -167,8 +175,8 @@ archiso_mount_handler() {
mkdir -p "/run/archiso/cowspace/${cow_directory}" mkdir -p "/run/archiso/cowspace/${cow_directory}"
_mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.sfs" "/run/archiso/sfs/airootfs" _mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.sfs" "/run/archiso/sfs/airootfs"
#_mnt_fs "/run/archiso/sfs/airootfs/airootfs.img" "${newroot}" "/" # _mnt_fs "/run/archiso/sfs/airootfs/airootfs.img" "${newroot}" "/"
mount --bind "/run/archiso/sfs/airootfs" "/new_root" mount --bind "run/archiso/sfs/airootfs" "/new_root"
if [[ "${copytoram}" == "y" ]]; then if [[ "${copytoram}" == "y" ]]; then
umount /run/archiso/bootmnt umount /run/archiso/bootmnt
@@ -1,18 +1,15 @@
# vim: set ft=sh: # vim: set ft=sh:
run_cleanuphook () { run_cleanuphook () {
msg ":: Mounting OverlayFS on / with tmpfs=rw, ${root}=ro ..." msg ":: Mounting aufs on / with tmpfs=rw, ${root}=ro ..."
modprobe overlay modprobe aufs
echo "Now attempting overlay mount..." echo "Now attempting aufs mount..."
#mkdir /new_root.hw mkdir /new_root.hw
mkdir -p /run/archiso/cowspace/upperdir /run/archiso/cowspace/workdir mount --move /new_root /new_root.hw
#mount --move /new_root /new_root.hw mkdir /dev/shm
#mkdir /dev/shm mount -t tmpfs none /dev/shm
#mount -t tmpfs none /dev/shm mount -t aufs none /new_root -o dirs=/dev/shm=rw:/new_root.hw=ro -o noatime
#mount -t overlay overlay -olowerdir=/new_root.hw,upperdir=/new_root,workdir=/dev/shm -o noatime
umount -l /new_root > /dev/null 2>&1
mount -t overlay -o lowerdir=/run/archiso/sfs/airootfs,upperdir=/run/archiso/cowspace/upperdir,workdir=/run/archiso/cowspace/workdir airootfs /new_root
pkill -9 dropbear #kill SSH (in preparation for the live system starting ssh on port 22 pkill -9 dropbear #kill SSH (in preparation for the live system starting ssh on port 22
} }
@@ -4,7 +4,7 @@ build()
{ {
add_module 'squashfs' add_module 'squashfs'
add_module 'loop' add_module 'loop'
add_module 'overlay' add_module 'aufs'
add_binary "sed" add_binary "sed"
add_binary "pkill" add_binary "pkill"
@@ -16,6 +16,6 @@ build()
help() help()
{ {
cat <<HELPEOF cat <<HELPEOF
Mount a squashed flat-file directory with OverlayFS on / Mount a squashed flat-file directory with AUFS3 on /
HELPEOF HELPEOF
} }
+1 -10
View File
@@ -1,19 +1,10 @@
function holla_atcha_boi { function holla_atcha_boi {
if [[ "${I_AM_A_RACECAR}" == "y" ]];
then
RACECAR_CHK='nice -n -19 '
else
RACECAR_CHK=""
fi
# Do we have an existing chroot set up yet? If not, create. # Do we have an existing chroot set up yet? If not, create.
if [[ ! -d "root.x86_64/root" || ! -d "root.i686/root" ]]; if [[ ! -d "root.x86_64/root" || ! -d "root.i686/root" ]];
then then
echo "No existing chroot environment found. Creating..." echo "No existing chroot environment found. Creating..."
rm -f ${LOCKFILE} rm -f ${LOCKFILE}
${RACECAR_CHK} ${BASEDIR}/lib/mk.chroot.sh ${BASEDIR}/lib/mk.chroot.sh
touch ${LOCKFILE} touch ${LOCKFILE}
fi fi
} }
+3 -9
View File
@@ -27,8 +27,8 @@ function jenny_craig () {
# sync over new changes and trim out the fat # sync over new changes and trim out the fat
rsync -a --delete ${CHROOTDIR}/. ${BUILDDIR}/. rsync -a --delete ${CHROOTDIR}/. ${BUILDDIR}/.
set +e set +e
cp -af ${BUILDDIR}/usr/share/zoneinfo/EST5EDT ${BUILDDIR}/etc/localtime > /dev/null 2>&1 cp -af ${BUILDDIR}/usr/share/zoneinfo/EST5EDT ${BUILDDIR}/etc/localtime
cp -af ${CHROOTDIR}/usr/share/zoneinfo/EST5EDT ${CHROOTDIR}/etc/localtime > /dev/null 2>&1 cp -af ${CHROOTDIR}/usr/share/zoneinfo/EST5EDT ${CHROOTDIR}/etc/localtime
set -e set -e
cp -af ${BUILDDIR}/usr/share/locale/locale.alias ${BUILDDIR}/tmp/. cp -af ${BUILDDIR}/usr/share/locale/locale.alias ${BUILDDIR}/tmp/.
echo "Cleaning up unnecessary cruft in ${BUILDDIR}..." echo "Cleaning up unnecessary cruft in ${BUILDDIR}..."
@@ -38,15 +38,11 @@ function jenny_craig () {
#rm -f ${BUILDDIR}/etc/localtime #rm -f ${BUILDDIR}/etc/localtime
rm -f ${BUILDDIR}/root/.bashrc rm -f ${BUILDDIR}/root/.bashrc
# DISABLE when no longer building custom kernel # DISABLE when no longer building custom kernel
#find ${BUILDDIR}/usr/lib/modules/ -maxdepth 1 -iname "*-ARCH" -exec rm -rf '{}' \; find ${BUILDDIR}/usr/lib/modules/ -maxdepth 1 -iname "*-ARCH" -exec rm -rf '{}' \;
for i in $(ls -1t ${BUILDDIR}/usr/lib/modules | tail -n "+2") ; do rm -rf ${BUILDDIR}/usr/lib/modules/${i} ; done
find ${BUILDDIR}/ -type f -name "*.pacnew" -exec rm -rf '{}' \;
sed -i -e '/^MAKEFLAGS=.*$/d' ${BUILDDIR}/etc/makepkg.conf
rm -rf ${BUILDDIR}/usr/share/locale/* rm -rf ${BUILDDIR}/usr/share/locale/*
mv -f ${BUILDDIR}/tmp/locale.alias ${BUILDDIR}/usr/share/locale/. mv -f ${BUILDDIR}/tmp/locale.alias ${BUILDDIR}/usr/share/locale/.
rm -rf ${BUILDDIR}/var/cache/pacman/* rm -rf ${BUILDDIR}/var/cache/pacman/*
rm -rf ${BUILDDIR}/var/cache/pkgfile/* rm -rf ${BUILDDIR}/var/cache/pkgfile/*
rm -rf ${BUILDDIR}/var/cache/apacman/pkg/*
rm -rf ${BUILDDIR}/var/lib/pacman/* rm -rf ${BUILDDIR}/var/lib/pacman/*
mkdir -p ${BUILDDIR}/var/lib/pacman/local mkdir -p ${BUILDDIR}/var/lib/pacman/local
rm -rf ${BUILDDIR}/var/abs/local/yaourtbuild/* rm -rf ${BUILDDIR}/var/abs/local/yaourtbuild/*
@@ -56,8 +52,6 @@ function jenny_craig () {
rm -rf ${BUILDDIR}/var/abs/* rm -rf ${BUILDDIR}/var/abs/*
rm -rf ${BUILDDIR}/run/* rm -rf ${BUILDDIR}/run/*
rm -rf ${BUILDDIR}/boot/* rm -rf ${BUILDDIR}/boot/*
#rm -rf ${BUILDDIR}/root/*
rm -rf ${BUILDDIR}/root/post-build.sh
rm -rf ${BUILDDIR}/usr/src/* rm -rf ${BUILDDIR}/usr/src/*
rm -rf ${BUILDDIR}/var/log/* rm -rf ${BUILDDIR}/var/log/*
rm -rf ${BUILDDIR}/.git rm -rf ${BUILDDIR}/.git
+1 -1
View File
@@ -24,7 +24,7 @@ function will_it_blend () {
if [[ "${I_AM_A_RACECAR}" == "y" ]]; if [[ "${I_AM_A_RACECAR}" == "y" ]];
then then
RACECAR_CHK='nice -n -19 ' RACECAR_CHK='nice -n "-19" '
else else
RACECAR_CHK="" RACECAR_CHK=""
fi fi
+2 -3
View File
@@ -4,7 +4,7 @@ function stuffy {
if [[ "${I_AM_A_RACECAR}" == "y" ]]; if [[ "${I_AM_A_RACECAR}" == "y" ]];
then then
RACECAR_CHK='nice -n -19 ' RACECAR_CHK='nice -n "-19" '
else else
RACECAR_CHK="" RACECAR_CHK=""
fi fi
@@ -62,8 +62,7 @@ EOF
FTSIZE=$(du -sc ${TEMPDIR}/{boot,EFI,loader} | tail -n1 | awk '{print $1}') FTSIZE=$(du -sc ${TEMPDIR}/{boot,EFI,loader} | tail -n1 | awk '{print $1}')
FATSIZE=$((${FTSIZE} + 64)) # let's give a little wiggle room FATSIZE=$((${FTSIZE} + 64)) # let's give a little wiggle room
${RACECAR_CHK}truncate -s "${FATSIZE}"K ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img ${RACECAR_CHK}truncate -s "${FATSIZE}"K ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img
${RACECAR_CHK}mkfs.vfat -F 32 -n ${DISTNAME}_EFI ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${RACECAR_CHK}mkfs.vfat -n ${DISTNAME}_EFI ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img >> "${LOGFILE}.${FUNCNAME}" 2>&1
#${RACECAR_CHK}mkfs.vfat -F32 -s2 -n ${DISTNAME}_EFI ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img >> "${LOGFILE}.${FUNCNAME}" 2>&1
mkdir -p ${SRCDIR}/efiboot mkdir -p ${SRCDIR}/efiboot
mount ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img ${SRCDIR}/efiboot mount ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img ${SRCDIR}/efiboot
mkdir -p ${SRCDIR}/efiboot/EFI/${DISTNAME} mkdir -p ${SRCDIR}/efiboot/EFI/${DISTNAME}
+1 -1
View File
@@ -12,7 +12,7 @@ function yo_dj () {
if [[ "${I_AM_A_RACECAR}" == "y" ]]; if [[ "${I_AM_A_RACECAR}" == "y" ]];
then then
RACECAR_CHK='nice -n -19 ' RACECAR_CHK='nice -n "-19" '
else else
RACECAR_CHK="" RACECAR_CHK=""
fi fi
+16 -11
View File
@@ -14,7 +14,7 @@ function mentos {
if [[ "${I_AM_A_RACECAR}" == "y" ]]; if [[ "${I_AM_A_RACECAR}" == "y" ]];
then then
RACECAR_CHK='nice -n -19 ' RACECAR_CHK='nice -n "-19" '
else else
RACECAR_CHK="" RACECAR_CHK=""
fi fi
@@ -37,13 +37,20 @@ function mentos {
local MIRROR=$(egrep '^Server' ${i}/etc/pacman.d/mirrorlist | head -n1 | sed -e 's/^Server\ =\ //g ; s#$repo.*#core/os/x86_64/#g') local MIRROR=$(egrep '^Server' ${i}/etc/pacman.d/mirrorlist | head -n1 | sed -e 's/^Server\ =\ //g ; s#$repo.*#core/os/x86_64/#g')
local NEWKERN=$(curl -s "${MIRROR}" | grep linux | awk '{print $3}' | cut -f2 -d\" | egrep '^linux-[0-9].*pkg.tar.xz$' | cut -f2 -d"-") local NEWKERN=$(curl -s "${MIRROR}" | grep linux | awk '{print $3}' | cut -f2 -d\" | egrep '^linux-[0-9].*pkg.tar.xz$' | cut -f2 -d"-")
if [[ -n $(find ${BASEDIR}/extra/pre-build.d/ -type f -newer ${BASEDIR}/root.x86_64/boot/vmlinuz-linux-${PNAME}) ]] || [[ "${INSTKERN}" != "${NEWKERN}" ]];
then
${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}yaourt -Syyua --noconfirm --devel" >> "${LOGFILE}.${FUNCNAME}" 2>&1
else
${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}yaourt -Syyua --noconfirm --devel --ignore linux,linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}apacman --noconfirm --noedit --skipinteg -S --needed --ignore linux ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}yaourt -S --needed --ignore linux,linux-${PNAME} --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
${CHROOTCMD} ${i}/ /usr/bin/bash -c "mkinitcpio -p linux" >> "${LOGFILE}.${FUNCNAME}" 2>&1 #${CHROOTCMD} ${i}/ bash -c "yaourt -S --needed --noconfirm ${PKGLIST}"
#${CHROOTCMD} ${i}/ bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" if [[ -n $(find ${BASEDIR}/extra/pre-build.d/ -type f -newer root.x86_64/boot/vmlinuz-linux-${PNAME}) ]];
cp -a ${i}/boot/vmlinuz-linux ${i}/boot/vmlinuz-linux-${PNAME} then
cp -a ${i}/boot/initramfs-linux.img ${i}/boot/initramfs-linux-${PNAME}.img ${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}mkinitcpio -p linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi
echo "Done." echo "Done."
done done
@@ -53,7 +60,7 @@ function mentos {
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ') PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ')
if [ -n "${PKGLIST}" ]; if [ -n "${PKGLIST}" ];
then then
${CHROOTCMD} ${CHROOTDIR32}/ bash -c "yes '' | ${RACECAR_CHK}apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${CHROOTDIR32}/ bash -c "yes '' | ${RACECAR_CHK}yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi fi
for x in $(find ${CHROOTDIR32}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done for x in $(find ${CHROOTDIR32}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
@@ -62,10 +69,10 @@ function mentos {
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ') PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ')
if [ -n "${PKGLIST}" ]; if [ -n "${PKGLIST}" ];
then then
${CHROOTCMD} ${CHROOTDIR64}/ bash -c "yes '' | ${RACECAR_CHK}apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${CHROOTDIR64}/ bash -c "${RACECAR_CHK}yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi fi
for x in $(find ${CHROOTDIR64}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done for x in $(find ${CHROOTDIR64}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
#${CHROOTCMD} ${CHROOTDIR64}/ bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" #${CHROOTCMD} ${CHROOTDIR64}/ bash -c "yaourt -S --needed --noconfirm ${PKGLIST}"
echo "Syncing overlay..." echo "Syncing overlay..."
rsync -a ${BASEDIR}/overlay/64/. ${CHROOTDIR64}/. rsync -a ${BASEDIR}/overlay/64/. ${CHROOTDIR64}/.
echo "Done." echo "Done."
@@ -92,8 +99,6 @@ function mentos {
find ${CHROOTDIR64}/root/ -type f -exec chmod 600 '{}' \; find ${CHROOTDIR64}/root/ -type f -exec chmod 600 '{}' \;
find ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \; find ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \;
find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \; find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \;
chmod 600 ${CHROOTDIR64}/etc/ssh/*
chmod 600 ${CHROOTDIR32}/etc/ssh/*
echo "Done." echo "Done."
} }
+26 -80
View File
@@ -71,11 +71,17 @@ function mkchroot {
CHROOTCMD="${CHROOTDIR64}/bin/arch-chroot" CHROOTCMD="${CHROOTDIR64}/bin/arch-chroot"
fi fi
if [[ "${I_AM_A_RACECAR}" == "y" ]];
then
RACECAR_CHK='nice -n "-19" '
else
RACECAR_CHK=""
fi
cd "${BASEDIR}" cd "${BASEDIR}"
## Set some vars. ## Set some vars.
#MIRROR='http://mirrors.kernel.org/archlinux' MIRROR='http://mirrors.kernel.org/archlinux'
MIRROR='http://mirror.us.leaseweb.net/archlinux'
RLSDIR="${MIRROR}/iso/latest" RLSDIR="${MIRROR}/iso/latest"
CURRLS64=$(curl -s ${RLSDIR}/sha1sums.txt | grep bootstrap | awk '{print $2}' | grep 'x86_64') CURRLS64=$(curl -s ${RLSDIR}/sha1sums.txt | grep bootstrap | awk '{print $2}' | grep 'x86_64')
@@ -154,58 +160,35 @@ EOF
for i in ${CHROOTDIR32} ${CHROOTDIR64}; for i in ${CHROOTDIR32} ${CHROOTDIR64};
do do
# Prep pacman
echo "Prepping ${i}. This will take a while..." echo "Prepping ${i}. This will take a while..."
echo -n "...Key initializing..." echo -n "...Key initializing..."
${CHROOTCMD} ${i}/ pacman-key --init >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ ${RACECAR_CHK}pacman-key --init >> "${LOGFILE}.${FUNCNAME}" 2>&1
echo "Done." echo "Done."
echo -n "...Importing keys..." echo -n "...Importing keys..."
${CHROOTCMD} ${i}/ pacman-key --populate archlinux >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ ${RACECAR_CHK}pacman-key --populate archlinux >> "${LOGFILE}.${FUNCNAME}" 2>&1
echo "Done." echo "Done."
# Prep base building system
echo -n "...Installing base packages..." echo -n "...Installing base packages..."
#${CHROOTCMD} ${i}/ pacstrap -dGcM base #${CHROOTCMD} ${i}/ pacstrap -dGcM base
# if that doesn't work, # if that doesn't work,
${CHROOTCMD} ${i}/ pacman -Syy >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ pacman -Syy >> "${LOGFILE}.${FUNCNAME}" 2>&1
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
${CHROOTCMD} ${i}/ pacman -S --noconfirm --needed base syslinux wget rsync unzip jshon sed sudo abs xmlto bc docbook-xsl git >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ pacman -S --noconfirm --needed base syslinux >> "${LOGFILE}.${FUNCNAME}" 2>&1
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
echo "Done." echo "Done."
echo -n "...Upgrading any outdated packages..." echo -n "...Upgrading any outdated packages..."
${CHROOTCMD} ${i}/ pacman -Syyu --noconfirm >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ ${RACECAR_CHK}pacman -Syyu --noconfirm >> "${LOGFILE}.${FUNCNAME}" 2>&1
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
echo "Done. Finishing/cleaning up..." echo "Done. Finishing/cleaning up..."
${CHROOTCMD} ${i}/ pacman -S --noconfirm --needed yaourt >> "${LOGFILE}.${FUNCNAME}" 2>&1
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
${CHROOTCMD} ${i}/ pacman -S --noconfirm --needed base-devel >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ pacman -S --noconfirm --needed base-devel >> "${LOGFILE}.${FUNCNAME}" 2>&1
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
# Yaourt is busted because Arch Pacman devs are fucking neasighted closed-minded jackasses.
# If they ever fix their crap, checkout extra/pre-build.d/etc/yaourtrc from git (commit 583a5df84af415990b8c49d7e4ac11dd7b23e0e0)
## https://github.com/archlinuxfr/yaourt/issues/67
## https://projects.archlinux.org/pacman.git/tree/NEWS#n54
## https://bugs.archlinux.org/task/43302
#${CHROOTCMD} ${i}/ pacman -S --noconfirm --needed yaourt >> "${LOGFILE}.${FUNCNAME}" 2>&1
mkdir -p ${i}/var/tmp/pkg
cp ${BASEDIR}/extra/bootstrap/apacman* ${i}/var/tmp/pkg/apacman.tar.xz
#${CHROOTCMD} ${i} "pacman --noconfirm -U /var/tmp/pkg/apacman.tar.xz" >> "${LOGFILE}.${FUNCNAME}" 2>&1
${CHROOTCMD} ${i} bash -c "pacman --noconfirm -U /var/tmp/pkg/apacman.tar.xz && mkdir /var/tmp/apacman && chmod 0750 /var/tmp/apacman && chown root:aurbuild /var/tmp/apacman " >> "${LOGFILE}.${FUNCNAME}" 2>&1
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
${CHROOTCMD} ${i} bash -c "apacman -S --noconfirm --noedit --skipinteg -S apacman-deps expac" >> "${LOGFILE}.${FUNCNAME}" 2>&1
#rm -rf ${i}/var/tmp/pkg
#${CHROOTCMD} ${i}/ pacman -S --noconfirm --needed yaourt >> "${LOGFILE}.${FUNCNAME}" 2>&1
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
done done
${CHROOTCMD} ${CHROOTDIR64}/ 'pacman --noconfirm -R gcc-libs libtool' >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${CHROOTDIR64}/ 'pacman --noconfirm -R gcc-libs libtool' >> "${LOGFILE}.${FUNCNAME}" 2>&1
${CHROOTCMD} ${CHROOTDIR64}/ 'pacman --noconfirm -S multilib-devel' >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${CHROOTDIR64}/ 'pacman --noconfirm -S multilib-devel' >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi fi
# And let's do some more optimization.
if [[ "${I_AM_A_RACECAR}" == "y" ]];
then
CPUCNT=$(grep processor /proc/cpuinfo | wc -l)
((CPUCNT++))
sed -i -e "/^[[:space:]]*#*MAKEFLAGS=.*$/aMAKEFLAGS=\"-j${CPUCNT}\"" ${CHROOTDIR64}/etc/makepkg.conf
sed -i -e "/^[[:space:]]*#*MAKEFLAGS=.*$/aMAKEFLAGS=\"-j${CPUCNT}\"" ${CHROOTDIR32}/etc/makepkg.conf
fi
# preprocessing # preprocessing
sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.* sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.*
# both # both
@@ -213,62 +196,31 @@ EOF
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.both | tr '\n' ' ') PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.both | tr '\n' ' ')
for i in ${CHROOTDIR32} ${CHROOTDIR64}; for i in ${CHROOTDIR32} ${CHROOTDIR64};
do do
echo "Running post-build tasks in ${i}..." echo -n "...Packages installing to ${i}..."
${CHROOTCMD} ${i}/ "/root/post-build.sh" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ bash -c "yaourt -S --needed --noconfirm customizepkg-scripting" >> "${LOGFILE}.${FUNCNAME}" 2>&1
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
echo -n "Compiling kernel sources..."
set +e set +e
${CHROOTCMD} ${i}/ /usr/bin/bash -c "apacman --noconfirm --noedit --skipinteg -S --needed linux" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}yaourt -S --needed --noconfirm linux" >> "${LOGFILE}.${FUNCNAME}" 2>&1
cp -a ${i}/boot/vmlinuz-linux ${i}/boot/vmlinuz-linux-${PNAME}
cp -a ${i}/boot/initramfs-linux.img ${i}/boot/initramfs-linux-${PNAME}.img
set -e set -e
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
# Uncomment if you wish to use the mkpasswd binary from within the chroot...
#${CHROOTCMD} ${i}/ bash -c "apacman --noconfirm --noedit --skipinteg -S --needed debian-whois-mkpasswd" >> "${LOGFILE}.${FUNCNAME}" 2>&1
#for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
echo -n "Regular packages..." echo -n "Regular packages..."
set +e set +e
${CHROOTCMD} ${i}/ bash -c "yes '' | apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ bash -c "yes '' | ${RACECAR_CHK}yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
# User creation
set -e set -e
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
echo -n "...Creating ${REGUSR} user..." echo -n "...Creating ${REGUSR} user..."
${CHROOTCMD} ${i}/ useradd -m -s /bin/bash -c "Default user" ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ useradd -m -s /bin/bash -c "Default user" ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
${CHROOTCMD} ${i}/ usermod -aG users,games,video,audio ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ usermod -aG users,games,video,audio ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
${CHROOTCMD} ${i}/ passwd -d ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ passwd -d ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
mkdir -p ${i}/etc/sudoers.d ; chmod 750 ${i}/etc/sudoers.d mkdir -p ${i}/etc/sudoers.d ; chmod 750 ${i}/etc/sudoers.d
echo "${REGUSR} ALL=(ALL) ALL" >> ${i}/etc/sudoers.d/${REGUSR} echo "${REGUSR} ALL=(ALL) ALL" >> ${i}/etc/sudoers.d/${REGUSR}
if [ -n "${REGUSR_PASS}" ];
then
#${CHROOTCMD} ${i}/ "/usr/bin/echo ${REGUSR}:${REGUSR_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1
sed -i -e "s|^${REGUSR}::|${REGUSR}:${REGUSR_PASS}:|g" ${i}/etc/shadow
elif [[ "${REGUSR_PASS}" == '{[BLANK]}' ]];
then
${CHROOTCMD} ${i}/ passwd -d ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
else
${CHROOTCMD} ${i}/ usermod -L ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi
if [ -n "${ROOT_PASS}" ];
then
#${CHROOTCMD} ${i}/ "/usr/bin/echo root:${ROOT_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1
sed -i -e "s|^root::|root:${ROOT_PASS}:|g" ${i}/etc/shadow
elif [[ "${ROOT_PASS}" == '{[BLANK]}' ]];
then
${CHROOTCMD} ${i}/ passwd -d root >> "${LOGFILE}.${FUNCNAME}" 2>&1
else
${CHROOTCMD} ${i}/ usermod -L root >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi
# The following is supposed to do the same as the above, but "cleaner". However, it currently fails with "execv() failed: No such file or directory"
##${CHROOTCMD} ${i}/ usermod -L root >> "${LOGFILE}.${FUNCNAME}" 2>&1
echo "Done." echo "Done."
done done
for i in ${CHROOTDIR32} ${CHROOTDIR64}; for i in ${CHROOTDIR32} ${CHROOTDIR64};
do do
set +e ${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}mkinitcpio -p linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
${CHROOTCMD} ${i}/ /usr/bin/bash -c "mkinitcpio -p linux" >> "${LOGFILE}.${FUNCNAME}" 2>&1
cp -a ${i}/boot/initramfs-linux.img ${i}/boot/initramfs-linux-${PNAME}.img
set -e
done done
# 32-bit # 32-bit
@@ -276,11 +228,9 @@ EOF
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ') PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ')
if [ -n "${PKGLIST}" ]; if [ -n "${PKGLIST}" ];
then then
${CHROOTCMD} ${CHROOTDIR32}/ /usr/bin/bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${CHROOTDIR32}/ bash -c "${RACECAR_CHK}yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi fi
set +e for x in $(find ${CHROOTDIR32}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
for x in $(find ${CHROOTDIR32}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
set -e
echo "Done." echo "Done."
# 64-bit # 64-bit
@@ -288,11 +238,9 @@ EOF
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ') PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ')
if [ -n "${PKGLIST}" ]; if [ -n "${PKGLIST}" ];
then then
${CHROOTCMD} ${CHROOTDIR64}/ /usr/bin/bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${CHROOTDIR64}/ bash -c "${RACECAR_CHK}yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi fi
set +e for x in $(find ${CHROOTDIR64}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
for x in $(find ${CHROOTDIR64}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
set -e
echo "Done." echo "Done."
echo "Syncing overlay..." echo "Syncing overlay..."
@@ -315,8 +263,6 @@ EOF
find ${CHROOTDIR64}/root/ -type f -exec chmod 600 '{}' \; find ${CHROOTDIR64}/root/ -type f -exec chmod 600 '{}' \;
find ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \; find ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \;
find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \; find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \;
chmod 600 ${CHROOTDIR64}/etc/ssh/*
chmod 600 ${CHROOTDIR32}/etc/ssh/*
echo "Done." echo "Done."
-63
View File
@@ -1,63 +0,0 @@
#
# /etc/bash.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
PS1='[\u@\h \W]\$ '
PS2='> '
PS3='> '
PS4='+ '
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
screen)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
esac
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
alias vi='/usr/bin/vim'
export EDITOR="vim"
if [ -f ~/.bashrc ];
then
source ~/.bashrc
fi
if [ -d ~/bin ];
then
export PATH="$PATH:~/bin"
fi
alias grep='grep --color'
alias egrep='egrep --color'
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
export HISTTIMEFORMAT="%F %T "
export PATH="${PATH}:/sbin:/bin:/usr/sbin"
DEFROUTEIF=$(ip route show | egrep '^default' | awk '{print $5}')
echo
echo "==================================="
date
if [ -n "${DEFROUTEIF}" ];
then
echo
echo -n "${DEFROUTEIF} is: "
ifconfig "${DEFROUTEIF}" | egrep 'inet|ether' | grep -v "inet6" | awk '{print $2}'
fi
echo
echo -n "tun0 is:"
ifconfig tun0 | grep inet | grep -v "inet6" | awk '{print $2}'
echo
echo "http://bdisk.square-r00t.net/"
echo "==================================="
echo
-41
View File
@@ -7,44 +7,3 @@ chmod 700 /var/db/sudo/lectured
chgrp bdisk /var/db/sudo/lectured/bdisk chgrp bdisk /var/db/sudo/lectured/bdisk
chmod 600 /var/db/sudo/lectured/bdisk chmod 600 /var/db/sudo/lectured/bdisk
chmod 4755 /usr/bin/sudo chmod 4755 /usr/bin/sudo
function fuck_you_gimme_net() {
IFACE=$(ifconfig -a -s | egrep -E '^((en|wl)p?|em)' | awk '{print $1}' | tr '\n' ' ' | sed -e 's/\ $//g')
for i in ${IFACE};
do
LINK_STATE=$(ethtool ${i} | egrep '^[[:space:]]*Link' | sed -re 's/^[[:space:]]*Link detected:(.*)/\1/g')
DEV=$(echo ${i} | sed -re 's/^([A-Za-z]{1}).*/\1/g' | tr '[[:upper:]]' '[[:lower:]]' )
if [ "${DEV}" == "e" ];
then
if [ "${LINK_STATE}" != "no" ];
then
DEV='ethernet-dhcp'
else
# skip disconnected ethernet
continue
fi
else
DEV='wireless-open'
fi
ifconfig ${i} down
cp -a /etc/netctl/examples/${DEV} /etc/netctl/${i}
sed -i -re "s/^([[:space:]]*Interface[[:space:]]*=).*/\1${i}/g" /etc/netctl/${i}
if [ "${DEV}" == "wireless-open" ];
then
ifconfig ${i} up && \
ESSID=$(iwlist ${i} scanning | egrep -A5 -B5 '^[[:space:]]*Encryption key:off' | egrep '^[[:space:]]*ESSID:' | sed -re 's/^[[:space:]]*ESSID:(.*)/\1/g')
sed -i -re "s/^([[:space:]]*ESSID[[:space:]]*=).*/\1${ESSID}/g" /etc/netctl/${i}
ifconfig ${i} down
fi
netctl start ${i} > /dev/null 2>&1
done
}
ping -c1 google.com | grep -q '1 received'
if [[ "${?}" != "0" ]];
then
fuck_you_gimme_net
systemctl restart openvpn@*
fi
-22
View File
@@ -1,22 +0,0 @@
" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing archlinux.vim since it alters the value of the
" 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages.
runtime! archlinux.vim
" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim'
" Or better yet, read /usr/share/vim/vim74/vimrc_example.vim or the vim manual
" and configure vim to your own liking!
set number
syntax on
set paste
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif