tools-musl: initial commit
This commit is contained in:
parent
3d4d415a27
commit
c5b17f302e
10 changed files with 1129 additions and 0 deletions
2
tools-musl/.gitignore
vendored
Normal file
2
tools-musl/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
stage*
|
||||
*.log
|
11
tools-musl/README
Normal file
11
tools-musl/README
Normal 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>
|
17
tools-musl/portage/make.conf
Normal file
17
tools-musl/portage/make.conf
Normal 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"
|
1
tools-musl/portage/make.profile
Symbolic link
1
tools-musl/portage/make.profile
Symbolic link
|
@ -0,0 +1 @@
|
|||
/usr/portage/profiles/hardened/linux/musl/amd64
|
2
tools-musl/portage/package.accept_keywords
Normal file
2
tools-musl/portage/package.accept_keywords
Normal file
|
@ -0,0 +1,2 @@
|
|||
=sys-libs/musl-0.9.15 ~amd64
|
||||
=sys-apps/getent-0 ~amd64
|
2
tools-musl/portage/package.mask
Normal file
2
tools-musl/portage/package.mask
Normal file
|
@ -0,0 +1,2 @@
|
|||
sys-fs/udev
|
||||
sys-apps/systemd
|
3
tools-musl/portage/package.use
Normal file
3
tools-musl/portage/package.use
Normal file
|
@ -0,0 +1,3 @@
|
|||
app-editors/vim -python
|
||||
dev-vcs/git -gpg
|
||||
sys-apps/busybox -* savedconfig
|
7
tools-musl/portage/repos.conf/gentoo.conf
Normal file
7
tools-musl/portage/repos.conf/gentoo.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
[DEFAULT]
|
||||
main-repo = gentoo
|
||||
|
||||
[gentoo]
|
||||
location = /usr/portage
|
||||
sync-type = rsync
|
||||
sync-uri = rsync://192.168.3.1/portage
|
1031
tools-musl/portage/savedconfig/sys-apps/busybox-1.21.0
Normal file
1031
tools-musl/portage/savedconfig/sys-apps/busybox-1.21.0
Normal file
File diff suppressed because it is too large
Load diff
53
tools-musl/run.sh
Executable file
53
tools-musl/run.sh
Executable file
|
@ -0,0 +1,53 @@
|
|||
#!/bin/bash
|
||||
|
||||
ROOTFS="stage4-amd64-musl"
|
||||
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
|
||||
}
|
||||
|
||||
main (){
|
||||
prepare_etc
|
||||
prepare_usr_etc
|
||||
prepare_overlay
|
||||
emerge_system
|
||||
mk_top_level_dirs
|
||||
setup_configs
|
||||
}
|
||||
|
||||
main > zzz.log 2>&1 &
|
Loading…
Add table
Reference in a new issue