Merge branch 'master' of git+ssh://git.overlays.gentoo.org/proj/releng

This commit is contained in:
Guy Martin 2014-01-29 11:06:40 +01:00
commit f81c530850
24 changed files with 1193 additions and 7 deletions

2
tools-musl/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
stage*
*.log

11
tools-musl/README Normal file
View file

@ -0,0 +1,11 @@
This is not ready yet for a full catalyst run. However,
if you have a musl chroot (which you can get from any
gentoo mirror off of /experimental/amd64/musl) then you
can build a new stage by running ./run.sh. It basically
uses the `ROOT=rootfs emerge -e @system` technique.
Once more stuff is integrated into gentoo, we will replace
this with a catalyst scripts.
Anthony G. Basile <blueness@gentoo.org>

1
tools-musl/portage/env/libintl.conf vendored Normal file
View file

@ -0,0 +1 @@
CFLAGS="-Wl,-lintl"

1
tools-musl/portage/env/parallel.conf vendored Normal file
View file

@ -0,0 +1 @@
MAKEOPTS=-j1

View file

@ -0,0 +1,17 @@
CHOST=x86_64-gentoo-linux-musl
CFLAGS="-Os -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
USE="-hardened -fortran -mudflap"
USE="${USE} -xattr python zlib"
MAKEOPTS="-j9"
INSTALL_MASK="charset.alias"
FEATURES="-sandbox"
PORTDIR="/usr/portage"
source /var/lib/layman/make.conf
GENTOO_MIRRORS="ftp://192.168.3.1/pub/gentoo"
SYNC="rsync://192.168.3.1/portage"

View file

@ -0,0 +1 @@
/usr/portage/profiles/hardened/linux/musl/amd64

View file

@ -0,0 +1,3 @@
=sys-apps/getent-0 ~amd64
=sys-libs/musl-0.9.15 ~amd64
=app-text/openjade-1.3.2-r6 ~amd64

View file

@ -0,0 +1,4 @@
sys-apps/kbd libintl.conf
sys-apps/man-db parallel.conf
sys-apps/net-tools libintl.conf
sys-process/procps libintl.conf

View file

@ -0,0 +1,2 @@
sys-fs/udev
sys-apps/systemd

View file

@ -0,0 +1,3 @@
app-editors/vim -python
dev-vcs/git -gpg
sys-apps/busybox -* savedconfig

View file

@ -0,0 +1,7 @@
[DEFAULT]
main-repo = gentoo
[gentoo]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://192.168.3.1/portage

File diff suppressed because it is too large Load diff

78
tools-musl/run.sh Executable file
View file

@ -0,0 +1,78 @@
#!/bin/bash
ROOTFS="stage4-amd64-musl-vanilla"
PWD="$(pwd)"
prepare_etc () {
mkdir -p "${ROOTFS}"/etc
cp -a "${PWD}"/portage/ "${ROOTFS}"/etc/
}
prepare_usr_etc() {
mkdir -p "${ROOTFS}"/usr/etc
cat <<-EOF > "${ROOTFS}"/usr/etc/ld-musl-x86_64.path
/lib
/usr/lib
/usr/lib/gcc/x86_64-gentoo-linux-musl/4.7.3
/usr/x86_64-gentoo-linux-musl/lib
EOF
ln -sf ld-musl-x86_64.path "${ROOTFS}"/usr/etc/ld-musl.path
}
prepare_overlay() {
# This is intensely ugly, but for now ...
mkdir -p "${ROOTFS}"/var/lib/layman/
cp -a /var/lib/layman/* "${ROOTFS}"/var/lib/layman/
}
emerge_system() {
ROOT="${ROOTFS}" emerge --keep-going --with-bdeps=y -uvq @system
}
mk_top_level_dirs() {
mkdir "${ROOTFS}"/{boot,dev,home,media,mnt,opt,proc,root,sys}
}
setup_configs() {
sed -i '/^SYNC/d' "${ROOTFS}"/etc/portage/make.conf
sed -i '/^GENTOO_MIRRORS/d' "${ROOTFS}"/etc/portage/make.conf
sed -i 's/^MAKEOPTS/#MAKEOPTS/' "${ROOTFS}"/etc/portage/make.conf
}
bundle_it() {
local DATE=$(date +%Y%m%d)
local NAME="${ROOTFS}"-"${DATE}".tar.bz2
local DIGESTS="${NAME}".DIGESTS
cd "${ROOTFS}"
tar -j -c -f ../"${NAME}" .
cd ..
>"${DIGESTS}"
echo "# MD5 HASH" >> "${DIGESTS}"
md5sum "${NAME}" >> "${DIGESTS}"
echo "# SHA1 HASH" >> "${DIGESTS}"
sha1sum "${NAME}" >> "${DIGESTS}"
echo "# SHA512 HASH" >> "${DIGESTS}"
sha512sum "${NAME}" >> "${DIGESTS}"
echo "# WHIRLPOOL HASH" >> "${DIGESTS}"
whirlpooldeep "${NAME}" >> "${DIGESTS}"
}
main (){
prepare_etc
prepare_usr_etc
prepare_overlay
emerge_system
mk_top_level_dirs
setup_configs
bundle_it
}
main > zzz.log 2>&1 &

View file

@ -0,0 +1,2 @@
#this should go upstream
LDFLAGS="-lpthread"

View file

@ -0,0 +1 @@
LDFLAGS="-lintl"

View file

@ -1 +1,2 @@
CFLAGS="-liconv" #this should go upstream
LDFLAGS="-liconv -lpthread"

View file

@ -0,0 +1,2 @@
#this should go upstream
LDFLAGS="-lpthread"

View file

@ -0,0 +1,2 @@
#This needs to be fixed in the tree
LDFLAGS="-ldl"

View file

@ -0,0 +1 @@
LDFLAGS="-liconv -lpthread"

View file

@ -1,10 +1,15 @@
app-crypt/pinentry pinentry.conf app-crypt/pinentry pinentry.conf
dev-libs/pakchois pakchois.conf dev-libs/pakchois pakchois.conf
dev-python/pygobject pygobject.conf dev-python/pygobject pygobject.conf
dev-util/cmake cmake.conf
dev-vcs/git git.conf dev-vcs/git git.conf
media-gfx/fontforge fontforge.conf media-gfx/fontforge fontforge.conf
media-libs/libquicktime libquicktime.conf media-libs/libquicktime libquicktime.conf
media-video/ffmpeg ffmpeg.conf media-video/ffmpeg ffmpeg.conf
media-video/mplayer2 mplayer2.conf
media-video/xanim xanim.conf
net-print/cups-filters cups-filters.conf net-print/cups-filters cups-filters.conf
sys-apps/coreutils coreutils.conf sys-apps/coreutils coreutils.conf
x11-libs/gdk-pixbuf gdk-pixbuf.conf x11-libs/gdk-pixbuf gdk-pixbuf.conf
x11-misc/slim slim.conf
x11-misc/xdg-user-dirs xdg-user-dirs.conf

View file

@ -2,4 +2,4 @@
source /etc/profile source /etc/profile
env-update env-update
emerge --keep-going -evq world emerge -evq --keep-going --with-bdeps=y world

View file

@ -19,6 +19,7 @@ mount_dirs() {
mount --bind /proc/ "${ROOTFS}"/proc/ mount --bind /proc/ "${ROOTFS}"/proc/
mount --bind /dev/ "${ROOTFS}"/dev/ mount --bind /dev/ "${ROOTFS}"/dev/
mount --bind /dev/pts "${ROOTFS}"/dev/pts/ mount --bind /dev/pts "${ROOTFS}"/dev/pts/
mount -t tmpfs shm "${ROOTFS}"/dev/shm
mount --bind /sys/ "${ROOTFS}"/sys/ mount --bind /sys/ "${ROOTFS}"/sys/
} }
@ -156,6 +157,7 @@ cleanup_dirs() {
unmount_dirs() { unmount_dirs() {
umount "${ROOTFS}"/sys/ umount "${ROOTFS}"/sys/
umount "${ROOTFS}"/dev/shm
umount "${ROOTFS}"/dev/pts/ umount "${ROOTFS}"/dev/pts/
umount "${ROOTFS}"/dev/ umount "${ROOTFS}"/dev/
umount "${ROOTFS}"/proc/ umount "${ROOTFS}"/proc/

View file

@ -2,6 +2,10 @@
source /etc/profile source /etc/profile
env-update env-update
emerge -1q gcc
emerge -1q uclibc
emerge -1q binutils emerge -1q binutils
source /etc/profile
env-update
emerge -1q gcc
source /etc/profile
env-update
emerge -1q uclibc

View file

@ -1,8 +1,13 @@
#!/bin/bash -l #!/bin/bash -l
#hacky - for some reason cairo fails to rebuild
#unless binutils is rebuilt first. It fails to
#find libibirty.
source /etc/profile source /etc/profile
env-update env-update
#hacky - for some reason cairo fails to rebuild
#unless binutils is rebuilt first.
emerge -q binutils emerge -q binutils
emerge -uvNDq world source /etc/profile
env-update
emerge -1q x11-libs/cairo
emerge -uvNDq --keep-going --with-bdeps=y world