Initial commit
This commit is contained in:
parent
0c0e1ab5ce
commit
efbff8badd
Makefile
group_vars
hosts.iniplaybook.ymlroles
stage0
files
tasks
stage1
files
tasks
stage2
files
tasks
altlinux-release.recipe.shbuild-autoconf.ymlbuild-automake.ymlbuild-beecrypt.ymlbuild-bison.ymlbuild-elfutils.ymlbuild-gawk.ymlbuild-libgcrypt.ymlbuild-libgpg-error.ymlbuild-libtool.ymlbuild-perl.ymlbuild-rpm.ymlbuild-rpmbuild.ymlcpio.recipe.shfile.recipe.shgettext.recipe.shglib2.recipe.shgtk-doc.recipe.shgzip.recipe.shlibdb.recipe.shlibffi.recipe.shlibpopt.recipe.shm4.recipe.shmain.ymlpcre.recipe.shpkg-config.recipe.shservice.recipe.shtime.recipe.shxz.recipe.sh
4
Makefile
Normal file
4
Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
.PHONY: all
|
||||
|
||||
all:
|
||||
ansible-playbook -i hosts.ini playbook.yml
|
14
group_vars/all.yml
Normal file
14
group_vars/all.yml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
|
||||
target_triplet: mipsisa64r6el-linux-gnuabi64
|
||||
build_triplet: x86_64-pc-linux-gnu
|
||||
host_triplet: x86_64-pc-linux-gnu
|
||||
install_packages: False
|
||||
repo_storage:
|
||||
sysroot_path: "{{ playbook_dir }}/sysroot"
|
||||
chroot_cmd: "chroot {{ sysroot_path }} ./qemu-mips64el-static "
|
||||
|
||||
buildroot_dir:
|
||||
custom_linux: "{{ buildroot_dir }}/output/build/linux-custom"
|
||||
rootfs_file: "{{ buildroot_dir }}/output/images/rootfs.tar"
|
||||
sysroot_dev:
|
9
playbook.yml
Normal file
9
playbook.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
|
||||
- name: Build necessary utilities
|
||||
hosts: localhost
|
||||
roles:
|
||||
- stage0
|
||||
- stage1
|
||||
- stage2
|
||||
|
0
roles/stage0/files/a.out
Normal file
0
roles/stage0/files/a.out
Normal file
13
roles/stage0/files/gcc-mips64-n64-abi-triple.patch
Normal file
13
roles/stage0/files/gcc-mips64-n64-abi-triple.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- a/gcc/config.gcc
|
||||
+++ b/gcc/config.gcc
|
||||
@@ -2100,6 +2100,10 @@
|
||||
default_mips_arch=mips64r2
|
||||
enable_mips_multilibs="yes"
|
||||
;;
|
||||
+ mips64*-*-linux-gnuabi64 | mipsisa64*-*-linux-gnuabi64)
|
||||
+ default_mips_abi=64
|
||||
+ enable_mips_multilibs="yes"
|
||||
+ ;;
|
||||
mips64*-*-linux* | mipsisa64*-*-linux*)
|
||||
default_mips_abi=n32
|
||||
enable_mips_multilibs="yes"
|
BIN
roles/stage0/files/hello-mips64-static
Executable file
BIN
roles/stage0/files/hello-mips64-static
Executable file
Binary file not shown.
8
roles/stage0/files/mipspart.sfdisk
Normal file
8
roles/stage0/files/mipspart.sfdisk
Normal file
@ -0,0 +1,8 @@
|
||||
label: dos
|
||||
label-id: 0x66b60d32
|
||||
device: /dev/sdc
|
||||
unit: sectors
|
||||
sector-size: 512
|
||||
|
||||
/dev/sdc1 : start= 2048, size= 524288, type=83
|
||||
/dev/sdc2 : start= 526336, size= 30589952, type=83
|
8
roles/stage0/files/test-c-program.c
Normal file
8
roles/stage0/files/test-c-program.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
printf("Hello, World!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
40
roles/stage0/tasks/build-binutils.yml
Normal file
40
roles/stage0/tasks/build-binutils.yml
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for binutils
|
||||
set_fact:
|
||||
binutils_dir: "{{ repo_storage }}/{{ stage_prefix }}-binutils"
|
||||
binutils_destdir: "{{ sysroot_path }}"
|
||||
- name: Fetch binutils repo
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/b/binutils.git
|
||||
dest: "{{ binutils_dir }}"
|
||||
clone: yes
|
||||
update: yes
|
||||
- name: "Configure binutils for {{ target_triplet }}"
|
||||
command: >
|
||||
./configure
|
||||
--host={{ target_triplet }}
|
||||
--without-gdb
|
||||
--without-gdbserver
|
||||
--without-gmp
|
||||
--disable-gdb
|
||||
--enable-shared
|
||||
--with-pic
|
||||
--enable-gold=yes
|
||||
--enable-ld=default
|
||||
--enable-default-hash-style=gnu
|
||||
--enable-relro
|
||||
--enable-textrel-check=warning
|
||||
--enable-deterministic-archives
|
||||
args:
|
||||
chdir: "{{ binutils_dir }}"
|
||||
- name: Build binutils for MIPS64R6 LE with N64 ABI (gnuabi64)
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ binutils_dir }}"
|
||||
- name: Install binutils for MIPS64R6 LE with N64 ABI (gnuabi64)
|
||||
command: "make tooldir={{ binutils_destdir }} install"
|
||||
args:
|
||||
chdir: "{{ binutils_dir }}"
|
||||
become: yes
|
||||
|
81
roles/stage0/tasks/build-gcc.yml
Normal file
81
roles/stage0/tasks/build-gcc.yml
Normal file
@ -0,0 +1,81 @@
|
||||
---
|
||||
|
||||
- name: Set GCC variables
|
||||
set_fact:
|
||||
gcc_dir: "{{ repo_storage}}/{{ stage_prefix }}-gcc"
|
||||
gcc_destdir: "{{ sysroot_path }}"
|
||||
- name: Fetch gcc repo
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/g/gcc10.git
|
||||
dest: "{{ gcc_dir }}"
|
||||
clone: yes
|
||||
update: yes
|
||||
force: yes
|
||||
- name: Cleanup GCC build directory
|
||||
file:
|
||||
state: absent
|
||||
path: "{{ gcc_dir }}/gcc/build"
|
||||
- name: Create fresh GCC build directory
|
||||
file:
|
||||
state: directory
|
||||
path: "{{ gcc_dir }}/gcc/build"
|
||||
- name: Download GCC prerequisite libraries using standard scripts
|
||||
command: ./contrib/download_prerequisites
|
||||
args:
|
||||
chdir: "{{ gcc_dir }}/gcc"
|
||||
# Don't apply unnecessary patches. This is only needed for MIPS.
|
||||
- name: Patch GCC to recognize MIPS N64 triplet
|
||||
patch:
|
||||
src: gcc-mips64-n64-abi-triple.patch
|
||||
basedir: "{{ gcc_dir }}/gcc"
|
||||
state: present
|
||||
strip: 1
|
||||
remote_src: no
|
||||
when: target_triplet == "mipsisa64r6el-linux-gnuabi64"
|
||||
- name: "Configure native GCC on {{ build_triplet }} for {{ target_triplet }}"
|
||||
command: >
|
||||
./../configure
|
||||
--host={{ target_triplet }}
|
||||
--build={{ build_triplet }}
|
||||
--target={{ target_triplet }}
|
||||
--enable-static
|
||||
--enable-shared
|
||||
--with-gnu-as
|
||||
--with-gnu-ld
|
||||
--enable-threads=posix
|
||||
--enable-targets=all
|
||||
--with-arch-64=mips64r6
|
||||
--with-abi=64
|
||||
--with-float=hard
|
||||
--with-nan=2008
|
||||
--prefix=/usr
|
||||
--enable-languages=c,c++
|
||||
--enable-default-pie
|
||||
--disable-multilib
|
||||
# --with-sysroot={{ sysroot_path }}
|
||||
# --with-headers is supported only for cross-compiling
|
||||
# --with-headers={{ sysroot_path }}/usr/include
|
||||
register: autoconf_gcc
|
||||
args:
|
||||
chdir: "{{ gcc_dir }}/gcc/build"
|
||||
- name: "Build native GCC on {{ build_triplet }} for {{ target_triplet }}"
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ gcc_dir }}/gcc/build"
|
||||
- name: "Install native GCC for {{ target_triplet }}"
|
||||
command: "make DESTDIR={{ gcc_destdir }} install"
|
||||
args:
|
||||
chdir: "{{ gcc_dir }}/gcc/build"
|
||||
become: yes
|
||||
#- name: Build libgcc
|
||||
# command: make all-target-libgcc
|
||||
# args:
|
||||
# chdir:
|
||||
- name: Install libgcc
|
||||
command: "make DESTDIR={{ gcc_destdir }} install-target-libgcc"
|
||||
args:
|
||||
chdir: "{{ gcc_dir }}/gcc/build"
|
||||
become: yes
|
||||
#- name: Run libtool
|
||||
# command: libtool --finish /usr/lib/../lib64
|
||||
|
55
roles/stage0/tasks/build-glibc.yml
Normal file
55
roles/stage0/tasks/build-glibc.yml
Normal file
@ -0,0 +1,55 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for glibc
|
||||
set_fact:
|
||||
glibc_dir: "{{ repo_storage }}/{{ stage_prefix }}-glibc"
|
||||
glibc_destdir: "{{ sysroot_path }}"
|
||||
- name: Fetch glibc repo
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/g/glibc.git
|
||||
dest: "{{ glibc_dir }}"
|
||||
clone: yes
|
||||
update: yes
|
||||
- name: Cleanup glibc build directory
|
||||
file:
|
||||
state: absent
|
||||
path: "{{ glibc_dir }}/build"
|
||||
- name: Create glibc build directory
|
||||
file:
|
||||
state: directory
|
||||
path: "{{ glibc_dir }}/build"
|
||||
- name: Configure glibc for MIPS64R6 LE with N64 ABI (gnuabi64)
|
||||
command: "./../configure --disable-crypt --disable-profile --enable-bind-now --enable-obsolete-rpc --enable-tunables --enable-stack-protector=strong --enable-kernel=5.10 --build={{ build_triplet }} --host={{ target_triplet }} --prefix=/ --with-headers={{ sysroot_path }}/usr/include"
|
||||
args:
|
||||
chdir: "{{ glibc_dir }}/build"
|
||||
- name: Build glibc for MIPS64R6 LE with N64 ABI (gnuabi64)
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ glibc_dir }}/build"
|
||||
- name: Install glibc header files
|
||||
command: "make install-bootstrap-headers=yes DESTDIR={{ glibc_destdir }}/usr install-headers"
|
||||
args:
|
||||
chdir: "{{ glibc_dir }}/build"
|
||||
become: yes
|
||||
- name: Create GNU stubs.h
|
||||
file:
|
||||
path: "{{ glibc_destdir }}/usr/include/gnu/stubs.h"
|
||||
state: touch
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0555
|
||||
become: yes
|
||||
- name: Install supplementary files for GCC
|
||||
command: "install csu/crt1.o csu/crti.o csu/crtn.o {{ glibc_destdir }}/usr/lib"
|
||||
args:
|
||||
chdir: "{{ glibc_dir }}/build"
|
||||
become: yes
|
||||
- name: Do something with libc
|
||||
command: "{{ target_triplet }}-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o {{ glibc_destdir }}/usr/lib/libc.so"
|
||||
become: yes
|
||||
- name: Install glibc for MIPS64R6 LE with N64 ABI (gnuabi64)
|
||||
command: "make DESTDIR={{ glibc_destdir }} install"
|
||||
args:
|
||||
chdir: "{{ glibc_dir }}"
|
||||
become: yes
|
||||
|
59
roles/stage0/tasks/build-initial-rootfs.yml
Normal file
59
roles/stage0/tasks/build-initial-rootfs.yml
Normal file
@ -0,0 +1,59 @@
|
||||
---
|
||||
|
||||
- name: Build initial rootfs
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ buildroot_dir }}"
|
||||
- name: Create sysroot mountpoint
|
||||
stat:
|
||||
path: "{{ sysroot_path }}"
|
||||
state: directory
|
||||
- name: Unmount anything from mountpoint
|
||||
command: "umount {{ sysroot_path }}"
|
||||
become: yes
|
||||
ignore_errors: yes
|
||||
- name: Mount sysroot
|
||||
command: "mount {{ sysroot_dev }} {{ sysroot_path }}"
|
||||
become: yes
|
||||
- name: Check if sysroot exists
|
||||
stat:
|
||||
path: "{{ sysroot_path }}/bin/ls"
|
||||
register: sysroot_present
|
||||
- name: Fail if sysroot is missing
|
||||
fail: msg="Sysroot is not mounted"
|
||||
when: sysroot_present.stat.exists == False
|
||||
- name: Prepare sysroot for chrooting
|
||||
command: "chroot {{ sysroot_path }} ./qemu-mips64el-static /bin/bash"
|
||||
become: yes
|
||||
- name: Cleanup rootfs directory
|
||||
file:
|
||||
state: absent
|
||||
path: "{{ sysroot_path }}"
|
||||
- name: Create rootfs directory
|
||||
file:
|
||||
state: directory
|
||||
path: "{{ sysroot_path }}"
|
||||
- name: Extract rootfs to its directory
|
||||
unarchive:
|
||||
src: "{{ rootfs_file }}"
|
||||
dest: "{{ sysroot_path }}"
|
||||
- name: Install kernel headers for glibc
|
||||
command: "make ARCH=mips INSTALL_HDR_PATH={{ sysroot_path }}/usr/include/linux-default headers_install"
|
||||
args:
|
||||
chdir: "{{ custom_linux }}"
|
||||
become: yes
|
||||
- name: Create symbolic links for Linux kernel include files
|
||||
file:
|
||||
src: "/usr/include/linux-default/include/{{ item }}"
|
||||
path: "{{ sysroot_path }}/usr/include/{{ item }}"
|
||||
state: link
|
||||
loop:
|
||||
- asm
|
||||
- asm-generic
|
||||
- drm
|
||||
- linux
|
||||
- mtd
|
||||
- sound
|
||||
- video
|
||||
become: yes
|
||||
|
22
roles/stage0/tasks/main.yml
Normal file
22
roles/stage0/tasks/main.yml
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for stage 0
|
||||
set_fact:
|
||||
stage_prefix: boot0
|
||||
- name: Install prerequisite packages
|
||||
command: "sudo apt-get -y install {{ item }}"
|
||||
when: install_packages
|
||||
loop:
|
||||
- qemu-user-static-binfmt-mips
|
||||
- name: Include rootfs preparation commands
|
||||
include: build-initial-rootfs.yml
|
||||
Build bootstrap utilities, STAGE0
|
||||
- name: Include tasks to build binutils
|
||||
include: build-binutils.yml
|
||||
- name: Include tasks to build glibc
|
||||
include: build-glibc.yml
|
||||
- name: Include tasks to build GCC
|
||||
include: build-gcc.yml
|
||||
# Build native utilities
|
||||
# gcc -I/usr/include -march=mips64r6 -mabi=64 main.c
|
||||
|
38
roles/stage1/files/fake-makeinfo
Normal file
38
roles/stage1/files/fake-makeinfo
Normal file
@ -0,0 +1,38 @@
|
||||
#!/bin/sh -efu
|
||||
|
||||
PROG="${0##*/}"
|
||||
|
||||
fatal() {
|
||||
printf %s\\n "$PROG: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
TEMP="$(getopt -n "$PROG" -o vo:I:P: -l verbose,output:,version,no-split,reference-limit: -- "$@")" || fatal 'unknown options'
|
||||
eval set -- "$TEMP"
|
||||
|
||||
outfile=
|
||||
while :; do
|
||||
case "${1-}" in
|
||||
--version) cat - <<__EOF__
|
||||
makeinfo (GNU texinfo) 6.0
|
||||
|
||||
Copyright (C) 2015 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
__EOF__
|
||||
exit 0
|
||||
;;
|
||||
-I|-P|--reference-limit) shift; shift ;; #ignore -I, -P, and --reference-limit
|
||||
--no-split) shift ;; # ignore --no-split
|
||||
-o|--output) shift; outfile=$1; shift ;;
|
||||
--) shift; break ;;
|
||||
*) fatal "unrecognized option: $1" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
[ -n "$outfile" ] || outfile=${1%.*}.info
|
||||
|
||||
touch "$outfile"
|
||||
|
||||
exit 0
|
48
roles/stage1/tasks/build-flex.yml
Normal file
48
roles/stage1/tasks/build-flex.yml
Normal file
@ -0,0 +1,48 @@
|
||||
---
|
||||
# sed '/tests \\/d' -i Makefile.am
|
||||
- name: Build M4 as a prerequisite for FLEX
|
||||
include: build-m4.yml
|
||||
- name: Set prerequisite variables for FLEX
|
||||
set_fact:
|
||||
flex_dir: "{{ repo_storage }}/{{ stage_prefix }}-flex"
|
||||
- name: Fetch FLEX repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/f/flex.git
|
||||
dest: "{{ flex_dir }}"
|
||||
clone: yes
|
||||
update: yes
|
||||
force: yes
|
||||
- name: Don't build texinfo for FLEX
|
||||
lineinfile:
|
||||
path: "{{ flex_dir }}/doc/Makefile.am"
|
||||
regexp: "^info_TEXINFOS =(.*)$"
|
||||
line: "info_TEXINFOS ="
|
||||
- name: Don't build manpages for FLEX
|
||||
lineinfile:
|
||||
path: "{{ flex_dir }}/doc/Makefile.am"
|
||||
regexp: "^dist_man_MANS =(.*)$"
|
||||
line: "dist_man_MANS ="
|
||||
- name: Reconfigure FLEX
|
||||
command: autoreconf -fisv
|
||||
args:
|
||||
chdir: "{{ flex_dir }}"
|
||||
- name: Configure FLEX
|
||||
command: >
|
||||
./configure
|
||||
--prefix=/usr
|
||||
--build={{ build_triplet }}
|
||||
--host={{ target_triplet }}
|
||||
--disable-shared
|
||||
--with-sysroot={{ sysroot_path }}
|
||||
args:
|
||||
chdir: "{{ flex_dir }}"
|
||||
- name: Build FLEX
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ flex_dir }}"
|
||||
- name: Install FLEX
|
||||
command: "make install DESTDIR={{ sysroot_path }}"
|
||||
args:
|
||||
chdir: "{{ flex_dir }}"
|
||||
become: yes
|
||||
|
30
roles/stage1/tasks/build-gmake.yml
Normal file
30
roles/stage1/tasks/build-gmake.yml
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for GNU Make
|
||||
set_fact:
|
||||
gmake_dir: "{{ repo_storage }}/{{ stage_prefix }}-gmake"
|
||||
- name: Fetch GNU Make repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/m/make.git
|
||||
dest: "{{ gmake_dir }}"
|
||||
clone: yes
|
||||
update: yes
|
||||
force: yes
|
||||
- name: Reconfigure GNU Make
|
||||
command: autoreconf -fisv
|
||||
args:
|
||||
chdir: "{{ gmake_dir }}/make"
|
||||
- name: Configure GNU Make
|
||||
command: "./configure --prefix=/usr --build={{ build_triplet }} --host={{ target_triplet }} --with-sysroot={{ sysroot_path }}"
|
||||
args:
|
||||
chdir: "{{ gmake_dir }}/make"
|
||||
- name: Build GNU Make
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ gmake_dir }}/make"
|
||||
- name: Install GNU Make
|
||||
command: "make install DESTDIR={{ sysroot_path }}"
|
||||
args:
|
||||
chdir: "{{ gmake_dir }}/make"
|
||||
become: yes
|
||||
|
36
roles/stage1/tasks/build-gmp.yml
Normal file
36
roles/stage1/tasks/build-gmp.yml
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for GMP
|
||||
set_fact:
|
||||
gmp_dir: "{{ repo_storage }}/{{ stage_prefix }}-gmp"
|
||||
- name: Fetch GMP repo
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/g/gmp.git
|
||||
dest: "{{ gmp_dir }}"
|
||||
clone: yes
|
||||
force: yes
|
||||
update: yes
|
||||
- name: Configure GMP
|
||||
command: >
|
||||
./configure
|
||||
CC={{ target_triplet }}-gcc
|
||||
--prefix=/usr
|
||||
--with-sysroot={{ sysroot_path }}
|
||||
--build={{ build_triplet }}
|
||||
--host={{ target_triplet }}
|
||||
--target={{ target_triplet }}
|
||||
--enable-werror=no
|
||||
--enable-cxx
|
||||
ABI=64
|
||||
args:
|
||||
chdir: "{{ gmp_dir }}/gmp"
|
||||
- name: Build GMP
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ gmp_dir }}/gmp"
|
||||
- name: Install GMP
|
||||
command: "make DESTDIR={{ sysroot_path }} install"
|
||||
args:
|
||||
chdir: "{{ gmp_dir }}/gmp"
|
||||
become: yes
|
||||
|
64
roles/stage1/tasks/build-m4.yml
Normal file
64
roles/stage1/tasks/build-m4.yml
Normal file
@ -0,0 +1,64 @@
|
||||
---
|
||||
|
||||
- name: Install fake-makeinfo as a prerequisite
|
||||
include: fake-makeinfo.yml
|
||||
- name: Set M4 build variables
|
||||
set_fact:
|
||||
m4_repo: "{{ repo_storage }}/{{ stage_prefix }}-m4"
|
||||
- name: Fetch M4 repo
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/m/m4.git
|
||||
dest: "{{ m4_repo }}"
|
||||
clone: yes
|
||||
update: yes
|
||||
force: yes
|
||||
- name: Don't build info pages for M4
|
||||
lineinfile:
|
||||
path: "{{ m4_repo }}/doc/Makefile.am"
|
||||
regexp: "^info_TEXINFOS =(.*)$"
|
||||
line: "info_TEXINFOS ="
|
||||
- name: Don't build TEXINFO pages for M4
|
||||
lineinfile:
|
||||
path: "{{ m4_repo }}/doc/Makefile.am"
|
||||
regexp: "^m4_TEXINFOS =(.*)$"
|
||||
line: "m4_TEXINFOS ="
|
||||
- name: Don't build manpages for FLEX
|
||||
lineinfile:
|
||||
path: "{{ m4_repo }}/doc/Makefile.am"
|
||||
regexp: "^man_MANS =(.*)$"
|
||||
line: "man_MANS ="
|
||||
- name: Bootstrap M4
|
||||
command: ./bootstrap --force
|
||||
args:
|
||||
chdir: "{{ m4_repo }}"
|
||||
- name: Configure M4
|
||||
command: >
|
||||
./configure
|
||||
--build={{ build_triplet }}
|
||||
--host={{ target_triplet }}
|
||||
--bindir=/usr/bin
|
||||
--prefix=/usr
|
||||
--exec-prefix=/usr
|
||||
--bindir=/usr/bin
|
||||
--sbindir=/usr/sbin
|
||||
--sysconfdir=/etc
|
||||
--datadir=/usr/share
|
||||
--includedir=/usr/include
|
||||
--libdir=/usr/lib64
|
||||
--libexecdir=/usr/lib
|
||||
--localstatedir=/var/lib
|
||||
--sharedstatedir=/var/lib
|
||||
--mandir=/usr/share/man
|
||||
--infodir=/usr/share/info
|
||||
args:
|
||||
chdir: "{{ m4_repo }}"
|
||||
- name: Build M4
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ m4_repo }}"
|
||||
- name: Install M4
|
||||
command: "make DESTDIR={{ sysroot_path }} install"
|
||||
args:
|
||||
chdir: "{{ m4_repo }}"
|
||||
become: yes
|
||||
|
41
roles/stage1/tasks/build-mpc.yml
Normal file
41
roles/stage1/tasks/build-mpc.yml
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
|
||||
- name: Build MPFR as a prerequisite for MPC
|
||||
include: build-mpfr.yml
|
||||
- name: Set prerequisite variables for MPC
|
||||
set_fact:
|
||||
mpc_dir: "{{ repo_storage }}/{{ stage_prefix }}-mpc"
|
||||
- name: Fetch MPC repo
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/m/mpc.git
|
||||
dest: "{{ mpc_dir }}"
|
||||
clone: yes
|
||||
force: yes
|
||||
update: yes
|
||||
- name: Reconfigure MPC
|
||||
command: autoreconf -fisv
|
||||
args:
|
||||
chdir: "{{ mpc_dir }}"
|
||||
- name: Configure MPC
|
||||
command: >
|
||||
./configure
|
||||
--libdir=/usr/lib
|
||||
--prefix=/usr
|
||||
--with-sysroot={{ sysroot_path }}
|
||||
--build={{ build_triplet }}
|
||||
--host={{ target_triplet }}
|
||||
--target={{ target_triplet }}
|
||||
--enable-werror=no
|
||||
--enable-cxx
|
||||
ABI=64
|
||||
args:
|
||||
chdir: "{{ mpc_dir }}"
|
||||
- name: Build MPC
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ mpc_dir }}"
|
||||
#- name: Install MPC
|
||||
# command: "make DESTDIR={{ sysroot_path }} install"
|
||||
# args:
|
||||
# chdir: "{{ mpc_dir }}"
|
||||
# become: yes
|
42
roles/stage1/tasks/build-mpfr.yml
Normal file
42
roles/stage1/tasks/build-mpfr.yml
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
|
||||
#- name: Build GMP as a prerequisite for MPFR
|
||||
# include: build-gmp.yml
|
||||
- name: Set prerequisite variables for MPFR
|
||||
set_fact:
|
||||
mpfr_dir: "{{ repo_storage }}/{{ stage_prefix }}-mpfr"
|
||||
- name: Fetch MPFR repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/m/mpfr.git
|
||||
dest: "{{ mpfr_dir }}"
|
||||
clone: yes
|
||||
update: yes
|
||||
force: yes
|
||||
- name: Reconfigure MPFR
|
||||
command: autoreconf -fisv
|
||||
args:
|
||||
chdir: "{{ mpfr_dir }}/mpfr"
|
||||
- name: Configure MPFR
|
||||
command: >
|
||||
./configure
|
||||
--libdir=/usr/lib
|
||||
--prefix=/usr
|
||||
--with-sysroot={{ sysroot_path }}
|
||||
--build={{ build_triplet }}
|
||||
--host={{ target_triplet }}
|
||||
--target={{ target_triplet }}
|
||||
--enable-werror=no
|
||||
--enable-cxx
|
||||
--with-gmp-include={{ sysroot_path }}/usr/include
|
||||
ABI=64
|
||||
args:
|
||||
chdir: "{{ mpfr_dir }}/mpfr"
|
||||
- name: Build MPFR
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ mpfr_dir }}/mpfr"
|
||||
#- name: Install MPFR
|
||||
# command: "make DESTDIR={{ sysroot_path }} install"
|
||||
# args:
|
||||
# chdir: "{{ mpfr_dir }}/mpfr"
|
||||
# become: yes
|
53
roles/stage1/tasks/build-sed.yml
Normal file
53
roles/stage1/tasks/build-sed.yml
Normal file
@ -0,0 +1,53 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for sed
|
||||
set_fact:
|
||||
sed_dir: "{{ repo_storage }}/{{ stage_prefix }}-sed"
|
||||
- name: Fetch SED repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/s/sed.git
|
||||
dest: "{{ sed_dir }}"
|
||||
version: sed-current
|
||||
clone: yes
|
||||
update: yes
|
||||
force: yes
|
||||
#CC="$TARGET-gcc" make "${nprocs:+-j$nprocs}" -C subst CPPFLAGS="-D_GNU_SOURCE $(getconf LFS_CFLAGS)"
|
||||
#subst -p 's,@DOCDIR@,/usr/share/doc/sed-version,' doc/sed.texi doc/sed.x
|
||||
#- name: Bootsrap SED
|
||||
# command: ./bootstrap.sh --force --skip-po --gnulib-srcdir=/usr/share/gnulib
|
||||
# args:
|
||||
# chdir: "{{ sed_dir }}"
|
||||
- name: Autoboot SED
|
||||
command: ./autoboot --skip-po
|
||||
args:
|
||||
chdir: "{{ sed_dir }}"
|
||||
- name: Reconfigure SED
|
||||
command: autoconf
|
||||
args:
|
||||
chdir: "{{ sed_dir }}"
|
||||
- name: Configure SED
|
||||
command: >
|
||||
./configure
|
||||
--prefix=/usr
|
||||
--build={{ build_triplet }}
|
||||
--host={{ target_triplet }}
|
||||
args:
|
||||
chdir: "{{ sed_dir }}"
|
||||
- name: Build SED
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ sed_dir }}"
|
||||
|
||||
#sleep 1
|
||||
# touch doc/sed.1
|
||||
#touch doc/sed.info
|
||||
|
||||
#make "${nprocs:+-j$nprocs}" -C po update-po
|
||||
#make "${nprocs:+-j$nprocs}"
|
||||
|
||||
#make install DESTDIR="$ROOTFS"
|
||||
#make install DESTDIR="$ROOTFS" -C subst
|
||||
#mkdir -p "$ROOTFS"/bin
|
||||
#cp sed/sed "$ROOTFS"/bin/
|
||||
#mkdir -p "$ROOTFS"/usr/bin
|
||||
#cp subst/subst "$ROOTFS"/usr/bin/
|
30
roles/stage1/tasks/build-util-linux.yml
Normal file
30
roles/stage1/tasks/build-util-linux.yml
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
#cat <<EOF > config.cache
|
||||
#ax_cv_have_tls=yes
|
||||
#scanf_cv_alloc_modifier=yes
|
||||
#EOF
|
||||
|
||||
- name: Set prerequisite variables for util-linux
|
||||
set_fact:
|
||||
util_linux_dir: "{{ repo_storage }}/{{ stage_prefix }}-util-linux"
|
||||
- name: Fetch util-linux repository
|
||||
git:
|
||||
repo:
|
||||
dest: "{{ util_linux_dir }}"
|
||||
clone: yes
|
||||
force: yes
|
||||
update: yes
|
||||
- name: Configure util-linux for MIPS
|
||||
command: "./configure --prefix=/usr --build={{ build_triplet }} --host={{ target_triplet }} --disable-wall --cache-file=config.cache --libdir=/usr/lib --without-ncurses --without-tinfo"
|
||||
args:
|
||||
chdir: "{{ util_linux_dir }}"
|
||||
- name: Build util-linux
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ util_linux_dir }}"
|
||||
#- name: Install util-linux
|
||||
# command: "make install DESTDIR={{ sysroot_path }}"
|
||||
# args:
|
||||
# chdir: "{{ util_linux_dir }}"
|
||||
# become: yes
|
||||
|
26
roles/stage1/tasks/build-zlib.yml
Normal file
26
roles/stage1/tasks/build-zlib.yml
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for zlib
|
||||
set_fact:
|
||||
zlib_dir: "{{ repo_storage }}/{{ stage_prefix }}-zlib"
|
||||
- name: Fetch zlib repo
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/z/zlib.git
|
||||
dest: "{{ zlib_dir }}"
|
||||
clone: yes
|
||||
update: yes
|
||||
force: yes
|
||||
- name: Configure zlib for target platform
|
||||
command: "env CHOST={{ target_triplet }} ./configure --prefix=/usr"
|
||||
args:
|
||||
chdir: "{{ zlib_dir }}"
|
||||
- name: Build zlib
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ zlib_dir }}"
|
||||
- name: Install zlib
|
||||
command: "make DESTDIR={{ sysroot_path }} install"
|
||||
args:
|
||||
chdir: "{{ zlib_dir }}"
|
||||
become: yes
|
||||
|
11
roles/stage1/tasks/fake-makeinfo.yml
Normal file
11
roles/stage1/tasks/fake-makeinfo.yml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
|
||||
- name: Copy fake-makeinfo to ROOTFS
|
||||
copy:
|
||||
src: fake-makeinfo
|
||||
dest: "{{ sysroot_path }}/usr/bin/makeinfo"
|
||||
mode: '0755'
|
||||
owner: root
|
||||
group: root
|
||||
become: yes
|
||||
|
25
roles/stage1/tasks/main.yml
Normal file
25
roles/stage1/tasks/main.yml
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for stage 1
|
||||
set_fact:
|
||||
stage_prefix: boot1
|
||||
- name: Install prerequisite packages
|
||||
command: "apt-get -y install {{ item }}"
|
||||
loop:
|
||||
- help2man
|
||||
become: yes
|
||||
- name: Include tasks to build MPC
|
||||
include: build-mpc.yml
|
||||
- name: Include tasks to build FLEX
|
||||
include: build-flex.yml
|
||||
- name: Include tasks to build GNU Make
|
||||
include: build-gmake.yml
|
||||
# SED build system does not know about mipsisa64r6el-linux-gnuabi64
|
||||
- name: Include tasks to build SED
|
||||
include: build-sed.yml
|
||||
# util-linux is already part of buildroot
|
||||
- name: Include tasks to build util-linux
|
||||
include: build-util-linux.yml
|
||||
- name: Include tasks to build zlib
|
||||
include: build-zlib.yml
|
||||
|
@ -0,0 +1,55 @@
|
||||
diff --git a/rpm-4_0.spec b/rpm-4_0.spec
|
||||
index 05c191f..080ddd4 100644
|
||||
--- a/rpm-4_0.spec
|
||||
+++ b/rpm-4_0.spec
|
||||
@@ -190,6 +190,42 @@ the Python programming language to use the interface supplied by RPM
|
||||
|
||||
%prep
|
||||
%setup -n rpm-%rpm_version-%release
|
||||
+patch -p1 <<'@@@'
|
||||
+--- a/installplatform
|
||||
++++ b/installplatform
|
||||
+@@ -45,6 +45,21 @@ case "$arch" in
|
||||
+ arm*)
|
||||
+ SUBSTS='s,arm.*,arm, s,arm.*,armv3l, s,arm.*,armv4l, s,arm.*,armv5l, s,arm.*,armv5tel, s,arm.*,armv5tejl, s,arm.*,armv6l, s,arm.*,noarch,'
|
||||
+ ;;
|
||||
++ mips)
|
||||
++ SUBSTS='s,mips,mips, s,mips,noarch,'
|
||||
++ ;;
|
||||
++ mipsel)
|
||||
++ SUBSTS='s,mipsel,mipsel, s,mipsel,noarch,'
|
||||
++ ;;
|
||||
++ mips64)
|
||||
++ SUBSTS='s,mips64,mips64, s,mips64,noarch,'
|
||||
++ ;;
|
||||
++ mips64el)
|
||||
++ SUBSTS='s,mips64el,mips64el, s,mips64el,noarch,'
|
||||
++ ;;
|
||||
++ s390x)
|
||||
++ SUBSTS='s,s390x,s390x, s,s390x,noarch,'
|
||||
++ ;;
|
||||
+ sparc*)
|
||||
+ SUBSTS='s,sparc\(64\|v9\),sparc, s,sparc64,sparcv9,;s,sparc\([^v]\|$\),sparcv9\1, s,sparcv9,sparc64,;s,sparc\([^6]\|$\),sparc64\1,'
|
||||
+ ;;
|
||||
+@@ -76,6 +91,9 @@ for SUBST in $SUBSTS ; do
|
||||
+ ARCH_INSTALL_POST='%{nil}'
|
||||
+ case "${ARCH}-${OS}" in
|
||||
+ aarch64-linux) LIB=lib64 ;;
|
||||
++ mips64-linux) LIB=lib64 ;;
|
||||
++ mips64el-linux) LIB=lib64 ;;
|
||||
++ s390x-linux) LIB=lib64 ;;
|
||||
+ sparc64-linux) LIB=lib64 ;;
|
||||
+ x86_64-linux) LIB=lib64 ;;
|
||||
+ esac
|
||||
+@@@
|
||||
|
||||
%build
|
||||
gettextize --force --quiet --no-changelog --symlink
|
||||
@@ -216,6 +252,7 @@ mkdir stub
|
||||
ar cq stub/libselinux.a
|
||||
ln -s %_libdir/libselinux.so stub/
|
||||
|
||||
+touch -- -lpopt
|
||||
set_c_cflags="$(sed -n 's/^CFLAGS = //p' lib/Makefile) -W -Wno-missing-prototypes -Wno-override-init %{!?_enable_debug:-O3} -fno-builtin-memcmp"
|
||||
%make_build -C lib set.lo CFLAGS="$set_c_cflags"
|
||||
%make_build
|
40
roles/stage2/files/rpmpatch.patch
Normal file
40
roles/stage2/files/rpmpatch.patch
Normal file
@ -0,0 +1,40 @@
|
||||
commit 245b5a3b4b6d616adf47361137987e90f8dab22c
|
||||
Author: Mark Wielaard <mjw@redhat.com>
|
||||
Date: Fri Dec 9 10:31:23 2016 +0200
|
||||
|
||||
Eliminate unnecessary dependency on bfd.h from sepdebugcrcfix
|
||||
|
||||
I think the reliance on bfd.h was a mistake. The code was lifted from
|
||||
bfd, but should be totally independent (it just calculates a CRC).
|
||||
Fix the type to be a normal size_t and include sys/stat.h (which was
|
||||
included through bfd.h) to get the definitions of stat and chmod.
|
||||
|
||||
diff --git a/tools/sepdebugcrcfix.c b/tools/sepdebugcrcfix.c
|
||||
index cd7fa02..1ce4f61 100644
|
||||
--- a/tools/sepdebugcrcfix.c
|
||||
+++ b/tools/sepdebugcrcfix.c
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
+#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <endian.h>
|
||||
@@ -28,7 +29,6 @@
|
||||
#include <error.h>
|
||||
#include <libelf.h>
|
||||
#include <gelf.h>
|
||||
-#include <bfd.h>
|
||||
|
||||
#define _(x) x
|
||||
#define static_assert(expr) \\
|
||||
@@ -46,7 +46,7 @@ static const bool false = 0, true = 1;
|
||||
static unsigned long
|
||||
calc_gnu_debuglink_crc32 (unsigned long crc,
|
||||
const unsigned char *buf,
|
||||
- bfd_size_type len)
|
||||
+ size_t len)
|
||||
{
|
||||
static const unsigned long crc32_table[256] =
|
||||
{
|
20
roles/stage2/tasks/altlinux-release.recipe.sh
Normal file
20
roles/stage2/tasks/altlinux-release.recipe.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
PNAME=
|
||||
|
||||
r_build() {
|
||||
:
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog <<@@@
|
||||
#!/bin/sh -efu
|
||||
|
||||
echo ALT > /etc/altlinux-release
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
:
|
||||
}
|
38
roles/stage2/tasks/build-autoconf.yml
Normal file
38
roles/stage2/tasks/build-autoconf.yml
Normal file
@ -0,0 +1,38 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for autoconf
|
||||
set_fact:
|
||||
autoconf_dir: "{{ repo_storage }}/{{ stage_prefix }}-autoconf"
|
||||
- name: Fetch autoconf repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/a/autoconf_2.60.git
|
||||
dest: "{{ autoconf_dir }}"
|
||||
force: yes
|
||||
update: yes
|
||||
clone: yes
|
||||
version: sisyphus
|
||||
- name: Reconfigure autoconf
|
||||
command: autoreconf -iv
|
||||
args:
|
||||
chdir: "{{ autoconf_dir }}"
|
||||
- name: Configure autoconf
|
||||
command: >
|
||||
./configure
|
||||
CC={{ build_triplet }}
|
||||
--prefix=/usr
|
||||
args:
|
||||
chdir: "{{ autoconf_dir }}"
|
||||
- name: Build autoconf
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ autoconf_dir }}"
|
||||
- name: Install autoconf
|
||||
command: "make DESTDIR={{ sysroot_path }} install"
|
||||
args:
|
||||
chdir: "{{ autoconf_dir }}"
|
||||
become: yes
|
||||
#sed -r 's/^(SUBDIRS =.*) doc(.*)/\1\2/' -i Makefile.am
|
||||
#sed -r 's/^(SUBDIRS =.*) man(.*)/\1\2/' -i Makefile.am
|
||||
|
||||
#export ac_cv_prog_EMACS=no
|
||||
|
38
roles/stage2/tasks/build-automake.yml
Normal file
38
roles/stage2/tasks/build-automake.yml
Normal file
@ -0,0 +1,38 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for automake
|
||||
set_fact:
|
||||
automake_dir: "{{ repo_storage }}/{{ stage_prefix }}-automake"
|
||||
- name: Fetch automake repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/a/automake_1.16.git
|
||||
dest: "{{ automake_dir }}"
|
||||
clone: yes
|
||||
force: yes
|
||||
update: yes
|
||||
version: sisyphus
|
||||
#sed -r 's@(include \$\(srcdir\)/doc/Makefile.inc)@#\1@' -i Makefile.am
|
||||
- name: Bootstrap automake
|
||||
command: ./bootstrap
|
||||
args:
|
||||
chdir: "{{ automake_dir }}"
|
||||
- name: Configure automake
|
||||
command:
|
||||
argv:
|
||||
- ./configure
|
||||
- --build={{ build_triplet }}
|
||||
- --host={{ target_triplet }}
|
||||
- --with-sysroot={{ sysroot_path }}
|
||||
- --prefix=/usr
|
||||
args:
|
||||
chdir: "{{ automake_dir }}"
|
||||
- name: Build automake
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ automake_dir }}"
|
||||
- name: Install automake
|
||||
command: "make DESTDIR={{ sysroot_path }} install"
|
||||
args:
|
||||
chdir: "{{ automake_dir }}"
|
||||
become: yes
|
||||
|
37
roles/stage2/tasks/build-beecrypt.yml
Normal file
37
roles/stage2/tasks/build-beecrypt.yml
Normal file
@ -0,0 +1,37 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for beecrypt
|
||||
set_fact:
|
||||
beecrypt_dir: "{{ repo_storage }}/{{ stage_prefix }}-beecrypt"
|
||||
- name: Fetch beecrypt repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/b/beecrypt.git
|
||||
dest: "{{ beecrypt_dir }}"
|
||||
clone: yes
|
||||
force: yes
|
||||
update: yes
|
||||
version: sisyphus
|
||||
- name: Reconfigure beecrypt
|
||||
command: autoreconf -fisv
|
||||
args:
|
||||
chdir: "{{ beecrypt_dir }}/beecrypt"
|
||||
- name: "Configure beecrypt for {{ target_triplet }}"
|
||||
command:
|
||||
argv:
|
||||
- ./configure
|
||||
- CC={{ target_triplet }}-gcc
|
||||
- --build={{ build_triplet }}
|
||||
- --host={{ target_triplet }}
|
||||
- --prefix=/usr
|
||||
args:
|
||||
chdir: "{{ beecrypt_dir }}/beecrypt"
|
||||
- name: Build beecrypt
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ beecrypt_dir }}/beecrypt"
|
||||
- name: Install beecrypt
|
||||
command: "make DESTDIR={{ sysroot_path }} install"
|
||||
args:
|
||||
chdir: "{{ beecrypt_dir }}/beecrypt"
|
||||
become: yes
|
||||
|
62
roles/stage2/tasks/build-bison.yml
Normal file
62
roles/stage2/tasks/build-bison.yml
Normal file
@ -0,0 +1,62 @@
|
||||
---
|
||||
# Requires: m4
|
||||
# Requires: perl
|
||||
# Requires: fake-makeinfo
|
||||
|
||||
- name: Set prerequisite variables for Bison
|
||||
set_fact:
|
||||
bison_dir: "{{ repo_storage }}/{{ stage_prefix }}-bison"
|
||||
- name: Fetch Bison repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/b/bison.git
|
||||
dest: "{{ bison_dir }}"
|
||||
clone: yes
|
||||
force: yes
|
||||
update: yes
|
||||
version: p10
|
||||
#- name: Don't build manpages for FLEX
|
||||
# lineinfile:
|
||||
# path: "{{ flex_dir }}/doc/local.mk"
|
||||
# regexp: "^dist_man_MANS =(.*)$"
|
||||
# line: "dist_man_MANS ="
|
||||
- name: Don't build documentation for Bison
|
||||
copy:
|
||||
content: ""
|
||||
dest: "{{ bison_dir }}/doc/local.mk"
|
||||
force: yes
|
||||
owner: nir
|
||||
group: nir
|
||||
mode: 0555
|
||||
- name: Bootstrap Bison
|
||||
command: >
|
||||
./bootstrap
|
||||
--no-git
|
||||
--skip-po
|
||||
--gnulib-srcdir={{ bison_dir }}/gnulib
|
||||
args:
|
||||
chdir: "{{ bison_dir }}"
|
||||
# --build={{ build_triplet }}
|
||||
# Native build
|
||||
- name: "Configure Bison for {{ target_triplet }}"
|
||||
command: >
|
||||
./configure
|
||||
--host={{ target_triplet }}
|
||||
--prefix=/usr
|
||||
--with-gnu-ld
|
||||
--disable-java
|
||||
environment:
|
||||
# Disable search for javac because bison is unable to generate
|
||||
# necessary files
|
||||
HAVE_JAVACOMP: 0
|
||||
args:
|
||||
chdir: "{{ bison_dir }}"
|
||||
- name: "Build Bison for {{ target_triplet }}"
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ bison_dir }}"
|
||||
- name: Install Bison
|
||||
command: "make DESTDIR={{ sysroot_path }} install"
|
||||
args:
|
||||
chdir: "{{ bison_dir }}"
|
||||
become: yes
|
||||
|
41
roles/stage2/tasks/build-elfutils.yml
Normal file
41
roles/stage2/tasks/build-elfutils.yml
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
# Requires: autoconf
|
||||
# Requires: automake
|
||||
# Requires: libtool
|
||||
|
||||
- name: Set prerequisite variables for elfutils
|
||||
set_fact:
|
||||
elfutils_dir: "{{ repo_storage }}/{{ stage_prefix }}-elfutils"
|
||||
- name: Fetch elfutils repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/e/elfutils.git
|
||||
dest: "{{ elfutils_dir }}"
|
||||
clone: yes
|
||||
force: yes
|
||||
update: yes
|
||||
version: p10
|
||||
- name: Reconfigure elfutils
|
||||
command: autoreconf -fisv
|
||||
args:
|
||||
chdir: "{{ elfutils_dir }}"
|
||||
- name: Configure elfutils
|
||||
command: >
|
||||
./configure
|
||||
--build={{ build_triplet }}
|
||||
--host={{ target_triplet }}
|
||||
--prefix=/usr
|
||||
--enable-maintainer-mode
|
||||
--with-sysroot={{ sysroot_path }}
|
||||
--program-prefix=eu-
|
||||
args:
|
||||
chdir: "{{ elfutils_dir }}"
|
||||
- name: Build elfutils
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ elfutils_dir }}"
|
||||
- name: Install elfutils
|
||||
command: "make DESTDIR={{ sysroot_path }} install"
|
||||
args:
|
||||
chdir: "{{ elfutils_dir }}"
|
||||
become: yes
|
||||
|
36
roles/stage2/tasks/build-gawk.yml
Normal file
36
roles/stage2/tasks/build-gawk.yml
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables
|
||||
set_fact:
|
||||
gawk_dir: "{{ repo_storage }}/{{ stage_prefix }}-gawk"
|
||||
- name: Fetch gawk repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/g/gawk.git
|
||||
dest: "{{ gawk_dir }}"
|
||||
clone: yes
|
||||
update: yes
|
||||
force: yes
|
||||
version: sisyphus
|
||||
- name: Bootstrap GNU AWK sources
|
||||
command: ./bootstrap.sh
|
||||
args:
|
||||
chdir: "{{ gawk_dir }}"
|
||||
- name: "Configure GNU AWK for {{ target_triplet }}"
|
||||
command: >
|
||||
./configure
|
||||
CC={{ target_triplet }}-gcc
|
||||
--build={{ build_triplet }}
|
||||
--host={{ target_triplet }}
|
||||
--prefix=/usr
|
||||
args:
|
||||
chdir: "{{ gawk_dir }}"
|
||||
- name: "Build GNU AWK for {{ target_triplet }}"
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ gawk_dir }}"
|
||||
- name: Install GNU AWK
|
||||
command: "make DESTDIR={{ sysroot_path }} install"
|
||||
args:
|
||||
chdir: "{{ gawk_dir }}"
|
||||
become: yes
|
||||
|
37
roles/stage2/tasks/build-libgcrypt.yml
Normal file
37
roles/stage2/tasks/build-libgcrypt.yml
Normal file
@ -0,0 +1,37 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for libgcrypt
|
||||
set_fact:
|
||||
libgcrypt_dir: "{{ repo_storage }}/{{ stage_prefix }}-libgcrypt"
|
||||
- name: Fetch libgcrypt repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/l/libgcrypt.git
|
||||
dest: "{{ libgcrypt_dir }}"
|
||||
clone: yes
|
||||
force: yes
|
||||
update: yes
|
||||
version: sisyphus
|
||||
- name: Reconfigure libgcrypt
|
||||
command: ./autogen.sh
|
||||
args:
|
||||
chdir: "{{ libgcrypt_dir }}"
|
||||
- name: Configure libgcrypt
|
||||
command: >
|
||||
./configure
|
||||
--with-sysroot={{ sysroot_path }}
|
||||
--prefix=/usr
|
||||
--host=mipsisa64r6el-linux-gnuabi64
|
||||
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
||||
PKG_CONFIG_LIB_DIR=/usr/local/lib
|
||||
args:
|
||||
chdir: "{{ libgcrypt_dir }}"
|
||||
- name: Build libgcrypt
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ libgcrypt_dir }}"
|
||||
- name: Install libgcrypt
|
||||
command: "make DESTDIR=/{{ sysroot_path }} install"
|
||||
args:
|
||||
chdir: "{{ libgcrypt_dir }}"
|
||||
become: yes
|
||||
|
36
roles/stage2/tasks/build-libgpg-error.yml
Normal file
36
roles/stage2/tasks/build-libgpg-error.yml
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables
|
||||
set_fact:
|
||||
libgpgerror_dir: "{{ repo_storage }}/{{ stage_prefix }}-libgpgerror"
|
||||
- name: Fetch libgpg-error repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/l/libgpg-error.git
|
||||
dest: "{{ libgpgerror_dir }}"
|
||||
force: yes
|
||||
clone: yes
|
||||
update: yes
|
||||
version: sisyphus
|
||||
- name: Reconfigure libgpg-error
|
||||
command: ./autogen.sh
|
||||
args:
|
||||
chdir: "{{ libgpgerror_dir }}"
|
||||
- name: Configure libgpg-error
|
||||
command: >
|
||||
./configure
|
||||
--with-sysroot={{ sysroot_path }}
|
||||
--host={{ target_triplet }}
|
||||
--prefix=/usr
|
||||
--disable-doc
|
||||
args:
|
||||
chdir: "{{ libgpgerror_dir }}"
|
||||
- name: Build libgpg-error
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ libgpgerror_dir }}"
|
||||
- name: Install libgpg-error
|
||||
command: "make DESTDIR={{ sysroot_path }} install"
|
||||
args:
|
||||
chdir: "{{ libgpgerror_dir }}"
|
||||
become: yes
|
||||
|
40
roles/stage2/tasks/build-libtool.yml
Normal file
40
roles/stage2/tasks/build-libtool.yml
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for libtool
|
||||
set_fact:
|
||||
libtool_dir: "{{ repo_storage }}/{{ stage_prefix }}-libtool"
|
||||
- name: Fetch libtool repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/l/libtool_2.4.git
|
||||
dest: "{{ libtool_dir }}"
|
||||
update: yes
|
||||
clone: yes
|
||||
force: yes
|
||||
version: sisyphus
|
||||
- name: Disable building libtool documentation
|
||||
lineinfile:
|
||||
path: "{{ libtool_dir }}/Makefile.am"
|
||||
regexp: "^dist_man1_MANS =(.*)$"
|
||||
line: "dist_man1_MANS ="
|
||||
- name: Bootstrap libtool
|
||||
command: ./bootstrap
|
||||
args:
|
||||
chdir: "{{ libtool_dir }}"
|
||||
- name: "Configure libtool for {{ target_triplet }}"
|
||||
command: >
|
||||
./configure
|
||||
--build={{ build_triplet }}
|
||||
--host={{ target_triplet }}
|
||||
--prefix=/usr
|
||||
args:
|
||||
chdir: "{{ libtool_dir }}"
|
||||
- name: "Build libtool for {{ target_triplet }}"
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ libtool_dir }}"
|
||||
- name: Install libtool
|
||||
command: "make DESTDIR={{ sysroot_path }} install"
|
||||
args:
|
||||
chdir: "{{ libtool_dir }}"
|
||||
become: yes
|
||||
|
89
roles/stage2/tasks/build-perl.yml
Normal file
89
roles/stage2/tasks/build-perl.yml
Normal file
@ -0,0 +1,89 @@
|
||||
---
|
||||
|
||||
#Now you need to generate make dependencies by running "make depend".
|
||||
#You might prefer to run it in background: "make depend > makedepend.out &"
|
||||
#It can take a while, so you might not want to run it right now.
|
||||
#
|
||||
#Run make depend now? [y] n
|
||||
#You must run 'make depend' then 'make'.
|
||||
#
|
||||
#If you compile perl5 on a different machine or from a different object
|
||||
#directory, copy the Policy.sh file from this object directory to the
|
||||
#new one before you run Configure -- this will help you with most of
|
||||
#the policy defaults.
|
||||
|
||||
# The Perl 5 interpreter may be cross-compiled using
|
||||
# http://arsv.github.io/perl-cross/usage.html
|
||||
- name: Set prerequisite variables for Perl
|
||||
set_fact:
|
||||
perl_dir: "{{ repo_storage }}/{{ stage_prefix }}-perl5"
|
||||
perl_cross_repo: https://github.com/arsv/perl-cross.git
|
||||
- name: Fetch Perl 5 repository
|
||||
git:
|
||||
repo: https://github.com/Perl/perl5.git
|
||||
dest: "{{ perl_dir }}"
|
||||
clone: yes
|
||||
update: yes
|
||||
force: yes
|
||||
version: v5.34.1
|
||||
- name: Fetch Perl-Cross reposiotry with cross-compiling scripts
|
||||
git:
|
||||
repo: "{{ perl_cross_repo }}"
|
||||
dest: "{{ repo_storage }}/perl-cross"
|
||||
clone: yes
|
||||
update: yes
|
||||
force: yes
|
||||
- name: Configure Perl 5 for cross-compiling for {{ target_triplet }}
|
||||
command: >
|
||||
/bin/sh Configure
|
||||
-Dusecrosscompile
|
||||
-Dtargetarch=mips64r6
|
||||
-Dcc={{ target_triplet }}-gcc
|
||||
-Dusrinc={{ sysroot_path }}/usr/include
|
||||
-Dincpth={{ sysroot_path }}/usr/include
|
||||
-Dlibpth={{ sysroot_path }}/lib
|
||||
-ders -Duse64bitint
|
||||
-Dusethreads -Duseithreads
|
||||
-Duselargefiles
|
||||
-Duseshrplib
|
||||
-DDEBUGGING=maybe
|
||||
-Dprefix=/usr
|
||||
-Dprivlib=/usr/share/perl5
|
||||
-Darchlib=/usr/lib/perl5
|
||||
-Dvendorprefix=/usr
|
||||
-Dvendorlib=/usr/share/perl5
|
||||
-Dvendorarch=/usr/lib/perl5
|
||||
-Dsiteprefix=/usr/local
|
||||
-Dotherlibdirs=/etc/perl5:/usr/lib/perl5/vendor_perl
|
||||
-Dinc_version_list=none
|
||||
-Dpager='/usr/bin/less -isR'
|
||||
-Dman1dir=none
|
||||
-Dman3dir=none
|
||||
-Dmyhostname=localhost
|
||||
-Dperladmin=root@localhost"
|
||||
args:
|
||||
chdir: "{{ perl_dir }}"
|
||||
- name: Run make depend for Perl 5
|
||||
shell: make depend > makedepend.out
|
||||
args:
|
||||
chdir: "{{ perl_dir }}"
|
||||
|
||||
# kill rpath
|
||||
#sed -i "s@ -Wl,-rpath,/usr/$LIB/perl5/CORE@@g" config.sh [Mm]akefile myconfig
|
||||
|
||||
# make -lperl symlink
|
||||
#ln -snf libperl-\$ver.so libperl.so
|
||||
|
||||
- name: Build Perl 5
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ perl_dir }}"
|
||||
#- name: Install Perl 5
|
||||
# command: make install
|
||||
# args:
|
||||
# chdir: "{{ perl_dir }}"
|
||||
# become: yes
|
||||
#mv /usr/"$LIB"/perl5/CORE/libperl-\$ver.so /usr/"$LIB"/
|
||||
#ln -snfr /usr/"$LIB"/libperl-\$ver.so /usr/"$LIB"/perl5/CORE/libperl.so
|
||||
#ln -snfr /usr/"$LIB"/libperl-\$ver.so /usr/"$LIB"/perl5/CORE/libperl-\$ver.so
|
||||
|
67
roles/stage2/tasks/build-rpm.yml
Normal file
67
roles/stage2/tasks/build-rpm.yml
Normal file
@ -0,0 +1,67 @@
|
||||
---
|
||||
|
||||
# Requires: gettext
|
||||
# Requires: libpopt
|
||||
# Requires: beecrypt
|
||||
# Requires: file
|
||||
# Requires: libdb
|
||||
# Requires: elfutils
|
||||
# Requires: pkg-config
|
||||
|
||||
- name: Set prerequisite variables for RPM
|
||||
set_fact:
|
||||
rpm_dir: "{{ repo_storage }}/{{ stage_prefix }}-rpm"
|
||||
- name: Fetch RPM repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/r/rpm.git
|
||||
dest: "{{ rpm_dir }}"
|
||||
clone: yes
|
||||
update: yes
|
||||
force: yes
|
||||
version: sisyphus
|
||||
#- name: Patch RPM to eliminate unnecessary dependencies
|
||||
# patch:
|
||||
# src: rpmpatch.patch
|
||||
# basedir: "{{ rpm_dir }}"
|
||||
# state: present
|
||||
# strip: 1
|
||||
# remote_src: no
|
||||
- name: Reconfigure RPM
|
||||
command: autoreconf -fisv
|
||||
args:
|
||||
chdir: "{{ rpm_dir }}"
|
||||
- name: "Configure RPM for {{ target_triplet }}"
|
||||
command:
|
||||
argv:
|
||||
- /usr/bin/env
|
||||
- CPPFLAGS=-I/usr/include/beecrypt
|
||||
- ./configure
|
||||
- --build={{ build_triplet }}
|
||||
- --host={{ target_triplet }}
|
||||
- --bindir=/usr/bin
|
||||
- --prefix=/usr
|
||||
- --exec-prefix=/usr
|
||||
- --bindir=/usr/bin
|
||||
- --sbindir=/usr/sbin
|
||||
- --sysconfdir=/etc
|
||||
- --datadir=/usr/share
|
||||
- --includedir=/usr/include
|
||||
- --libdir=/usr/lib
|
||||
- --libexecdir=/usr/lib
|
||||
- --localstatedir=/var/lib
|
||||
- --sharedstatedir=/var/lib
|
||||
- --mandir=/usr/share/man
|
||||
- --infodir=/usr/share/info
|
||||
- --with-vendor=alt
|
||||
- --disable-plugins
|
||||
- --with-external-db
|
||||
- --without-beecrypt
|
||||
- --without-archive
|
||||
- --without-lua
|
||||
args:
|
||||
chdir: "{{ rpm_dir }}"
|
||||
- name: "Build RPM for {{ target_triplet }}"
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ rpm_dir }}"
|
||||
|
73
roles/stage2/tasks/build-rpmbuild.yml
Normal file
73
roles/stage2/tasks/build-rpmbuild.yml
Normal file
@ -0,0 +1,73 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for rpmbuild
|
||||
set_fact:
|
||||
rpmbuild_dir: "{{ repo_storage }}/{{ stage_prefix }}-rpmbuild"
|
||||
- name: Fetch rpmbuild repository
|
||||
git:
|
||||
repo: http://git.altlinux.org/gears/r/rpm-build.git
|
||||
dest: "{{ rpmbuild_dir }}"
|
||||
clone: yes
|
||||
force: yes
|
||||
update: yes
|
||||
version: sisyphus
|
||||
- name: Patch rpmbuild
|
||||
patch:
|
||||
src: rpm-build-installplatform-add-s390x-and-mips-support.patch
|
||||
basedir: "{{ rpmbuild_dir }}"
|
||||
stip: 1
|
||||
remote_src: no
|
||||
- name: Reconfigure rpmbuild
|
||||
command: autoreconf -fisv -I m4
|
||||
args:
|
||||
chdir: "{{ rpmbild_dir }}"
|
||||
- name: Configure rpmbuild
|
||||
command: >
|
||||
./configure
|
||||
--build={{ target_triplet }}
|
||||
--host={{ target_triplet }}
|
||||
--bindir=/usr/bin
|
||||
--prefix=/usr
|
||||
--exec-prefix=/usr
|
||||
--bindir=/usr/bin
|
||||
--sbindir=/usr/sbin
|
||||
--sysconfdir=/etc
|
||||
--datadir=/usr/share
|
||||
--includedir=/usr/include
|
||||
--libdir=/usr/lib
|
||||
--libexecdir=/usr/lib
|
||||
--localstatedir=/var/lib
|
||||
--sharedstatedir=/var/lib
|
||||
--mandir=/usr/share/man
|
||||
--infodir=/usr/share/info
|
||||
--without-python
|
||||
args:
|
||||
chdir: "{{ rpmbuild_dir }}"
|
||||
# Requires: altlinux-release
|
||||
# Requires: autoconf
|
||||
# Requires: automake
|
||||
# Requires: beecrypt
|
||||
# Requires: xz
|
||||
# Requires: elfutils
|
||||
# Requires: file
|
||||
# Requires: gettext
|
||||
# Requires: libdb
|
||||
# Requires: libpopt
|
||||
# Requires: rpm
|
||||
|
||||
#gettextize --force --quiet --no-changelog --symlink
|
||||
#install -pv -m644 /usr/share/automake/mkinstalldirs .
|
||||
# avoid extra build dependencies
|
||||
#export ac_cv_path___CPIO=/bin/cpio
|
||||
#export ac_cv_path___UNZIP=/usr/bin/unzip
|
||||
#export ac_cv_path___LZMA=/usr/bin/lzma
|
||||
#export ac_cv_path___XZ=/usr/bin/xz
|
||||
#export ac_cv_path___GPG=/usr/bin/gpg
|
||||
#export ac_cv_path___SSH=/usr/bin/ssh
|
||||
|
||||
- name: Build rpmbuild
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ rpmbuild_dir }}"
|
||||
#touch -- -lpopt
|
||||
|
80
roles/stage2/tasks/cpio.recipe.sh
Normal file
80
roles/stage2/tasks/cpio.recipe.sh
Normal file
@ -0,0 +1,80 @@
|
||||
#!/bin/sh
|
||||
# Requires: autoconf
|
||||
# Requires: automake
|
||||
# Requires: fake-makeinfo
|
||||
PNAME=cpio
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec "$PNAME" "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
rm -rf $p
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
|
||||
sed -r 's/(dist_man_MANS[[:space:]]*=).*/\1/' -i doc/Makefile.am
|
||||
|
||||
autoreconf -fisv
|
||||
|
||||
./configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
#
|
||||
make ${nprocs:+-j$nprocs}
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
make install
|
||||
mv /usr/bin/cpio /bin/
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
75
roles/stage2/tasks/file.recipe.sh
Normal file
75
roles/stage2/tasks/file.recipe.sh
Normal file
@ -0,0 +1,75 @@
|
||||
#!/bin/sh
|
||||
# Requires: autoconf
|
||||
# Requires: automake
|
||||
PNAME=file
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec file "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
|
||||
autoreconf -fisv
|
||||
|
||||
./configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
#
|
||||
make ${nprocs:+-j$nprocs}
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
make install
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
101
roles/stage2/tasks/gettext.recipe.sh
Normal file
101
roles/stage2/tasks/gettext.recipe.sh
Normal file
@ -0,0 +1,101 @@
|
||||
#!/bin/sh
|
||||
# Requires: autoconf
|
||||
# Requires: automake
|
||||
# Requires: libtool
|
||||
# Requires: bison
|
||||
# Requires: gzip
|
||||
# Requires: fake-makeinfo
|
||||
PNAME=gettext
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec gettext "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
|
||||
# Comment out sys_lib_search_path_spec and sys_lib_dlsearch_path_spec.
|
||||
mkdir archive
|
||||
cd archive
|
||||
archive=../gettext-tools/misc/archive.dir.tar
|
||||
tar -xf \$archive
|
||||
find -type f -print0 |
|
||||
xargs -r0 grep -lZ '\<sys_lib_\(dl\)\?search_path_spec=' -- |
|
||||
xargs -r0 sed -i 's/\<sys_lib_\(dl\)\?search_path_spec=/#&/' --
|
||||
tar --owner=root --group=root -cf \$archive *
|
||||
cd -
|
||||
rm -rf archive
|
||||
|
||||
sed -r 's@(_LDADD =.*libgettextsrc.la)@\1 ../gnulib-lib/libgettextlib.la@' -i gettext-tools/src/Makefile.am
|
||||
|
||||
autoreconf -fisv
|
||||
./configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
\
|
||||
--enable-shared \
|
||||
--without-cvs \
|
||||
--without-git \
|
||||
#
|
||||
# We have to edit libtool files by hand until autoreconf can be used here.
|
||||
find -type f -name libtool -print0 |
|
||||
xargs -r0 grep -lZ '^sys_lib_dlsearch_path_spec="' -- |
|
||||
xargs -r0 sed -i 's|^\(sys_lib_dlsearch_path_spec="\).*|\1/$LIB /usr/$LIB"|' --
|
||||
|
||||
make ${nprocs:+-j$nprocs}
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
make install
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
87
roles/stage2/tasks/glib2.recipe.sh
Normal file
87
roles/stage2/tasks/glib2.recipe.sh
Normal file
@ -0,0 +1,87 @@
|
||||
#!/bin/sh
|
||||
# Requires: gettext
|
||||
# Requires: libffi
|
||||
# Requires: pcre
|
||||
PNAME=glib2
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec glib "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
sed -r 's/(SUBDIRS *\+= .*)tests/#\1/' -i gio/Makefile.am
|
||||
sed -r 's/(SUBDIRS *=.*) tests(.*)/\1\2/' -i Makefile.am
|
||||
sed -r 's@(SUBDIRS =.*)gdbus-2.0/codegen(.*)@\1\2@' -i gio/Makefile.am
|
||||
sed -r 's|(gdbus-daemon-generated.h gdbus-daemon-generated.c:).*|\1|' -i gio/Makefile.am
|
||||
autoreconf -fisv
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
|
||||
export LIBFFI_LIBS='-lffi'
|
||||
export LIBFFI_CFLAGS='-I/usr/include'
|
||||
export PCRE_LIBS='-lpcre'
|
||||
export PCRE_CFLAGS='-I/usr/include'
|
||||
./configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
\
|
||||
--disable-libmount \
|
||||
#
|
||||
make ${nprocs:+-j$nprocs}
|
||||
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
make install
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
74
roles/stage2/tasks/gtk-doc.recipe.sh
Normal file
74
roles/stage2/tasks/gtk-doc.recipe.sh
Normal file
@ -0,0 +1,74 @@
|
||||
#!/bin/sh
|
||||
# Requires: autoconf
|
||||
PNAME=gtk-doc
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec "$PNAME" "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
|
||||
autoreconf -fisv
|
||||
|
||||
./configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
#
|
||||
make ${nprocs:+-j$nprocs}
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
make install
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
74
roles/stage2/tasks/gzip.recipe.sh
Normal file
74
roles/stage2/tasks/gzip.recipe.sh
Normal file
@ -0,0 +1,74 @@
|
||||
#!/bin/sh
|
||||
# Requires: m4
|
||||
PNAME=gzip
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec "$PNAME" "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
sed -r 's/(SUBDIRS =.*)doc(.*)/\1\2/' -i Makefile.am
|
||||
./bootstrap --force --skip-po --gnulib-srcdir=/usr/share/gnulib
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
./configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
#
|
||||
make ${nprocs:+-j$nprocs}
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
make install
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
95
roles/stage2/tasks/libdb.recipe.sh
Normal file
95
roles/stage2/tasks/libdb.recipe.sh
Normal file
@ -0,0 +1,95 @@
|
||||
#!/bin/sh
|
||||
# Requires: autoconf
|
||||
# Requires: automake
|
||||
PNAME=libdb4.7
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec db "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
|
||||
cd build_unix
|
||||
../dist/configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
#
|
||||
|
||||
# Remove libtool predep_objects and postdep_objects wonkiness
|
||||
sed -i 's/-shared -nostdlib/-shared/' libtool
|
||||
sed -i 's/^\(predep_objects="\|postdep_objects="\).*$/\1"/' libtool
|
||||
# Edit libtool files by hand until autoreconf can be used here
|
||||
find -type f -name libtool -print0 |
|
||||
xargs -r0 grep -lZ '^sys_lib_dlsearch_path_spec="' -- |
|
||||
xargs -r0 sed -i 's|^\(sys_lib_dlsearch_path_spec="\).*|\1/$LIB /usr/$LIB"|' --
|
||||
|
||||
|
||||
make ${nprocs:+-j$nprocs}
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
make install -C build_unix
|
||||
|
||||
# Correct static libraries.
|
||||
sover=4.7
|
||||
pushd /usr/"$LIB"
|
||||
for f in libdb*.a; do
|
||||
[ -n "\${f%%*-\$sover.a}" ] || continue
|
||||
ln -snf "\${f%.a}-\$sover.a" "\$f"
|
||||
done
|
||||
popd
|
||||
rm /usr/"$LIB"/libdb_int-*.a
|
||||
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
76
roles/stage2/tasks/libffi.recipe.sh
Normal file
76
roles/stage2/tasks/libffi.recipe.sh
Normal file
@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
# Requires: autoconf
|
||||
# Requires: automake
|
||||
# Requires: fake-makeinfo
|
||||
PNAME=libffi
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec "$PNAME" "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
|
||||
autoreconf -fisv
|
||||
|
||||
./configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
#
|
||||
make ${nprocs:+-j$nprocs}
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
make install
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
78
roles/stage2/tasks/libpopt.recipe.sh
Normal file
78
roles/stage2/tasks/libpopt.recipe.sh
Normal file
@ -0,0 +1,78 @@
|
||||
#!/bin/sh
|
||||
# Requires: autoconf
|
||||
# Requires: automake
|
||||
# Requires: libtool
|
||||
PNAME=libpopt
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec popt "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
|
||||
autoreconf -fisv
|
||||
|
||||
./configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
\
|
||||
--disable-libmount \
|
||||
#
|
||||
make ${nprocs:+-j$nprocs}
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
make install
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
41
roles/stage2/tasks/m4.recipe.sh
Normal file
41
roles/stage2/tasks/m4.recipe.sh
Normal file
@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec "$PNAME" "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
sed 's/man_MANS =.*/man_MANS =/' -i doc/Makefile.am
|
||||
|
||||
./bootstrap --force
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
./configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
#
|
||||
make ${nprocs:+-j$nprocs}
|
||||
|
30
roles/stage2/tasks/main.yml
Normal file
30
roles/stage2/tasks/main.yml
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
|
||||
- name: Set prerequisite variables for stage 2
|
||||
set_fact:
|
||||
stage_prefix: boot2
|
||||
- name: Build Perl 5 as a prerequisite for autoconf
|
||||
include: build-perl.yml
|
||||
- name: Build GNU AWK as a prerequisite for autoconf
|
||||
include: build-gawk.yml
|
||||
- name: Build autoconf as a prerequisite for automake
|
||||
include: build-autoconf.yml
|
||||
- name: Build automake as a prerequisite for RPM
|
||||
include: build-automake.yml
|
||||
- name: Build libtool as a prerequisite for RPM
|
||||
include: build-libtool.yml
|
||||
- name: Build Bison as a prerequisite for RPM
|
||||
include: build-bison.yml
|
||||
- name: Build beecrypt as a prerequisite for RPM
|
||||
include: build-beecrypt.yml
|
||||
- name: Build elfutils as a prerequisite for libgcrypt
|
||||
include: build-elfutils.yml
|
||||
- name: Build libgpg-error as a prerequisite for libgcrypt
|
||||
include: build-libgpg-error.yml
|
||||
- name: Build libgcrypt as a prerequisite for RPM
|
||||
include: build-libgcrypt.yml
|
||||
- name: Build RPM
|
||||
include: build-rpm.yml
|
||||
- name: Build rpmbuild
|
||||
include: build-rpmbuild.yml
|
||||
|
81
roles/stage2/tasks/pcre.recipe.sh
Normal file
81
roles/stage2/tasks/pcre.recipe.sh
Normal file
@ -0,0 +1,81 @@
|
||||
#!/bin/sh
|
||||
# Requires: autoconf
|
||||
# Requires: automake
|
||||
# Requires: libtool
|
||||
PNAME=pcre
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec pcre "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
|
||||
autoreconf -fisv
|
||||
./configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
\
|
||||
--enable-pcre8 \
|
||||
--enable-pcre16 \
|
||||
--enable-utf \
|
||||
--enable-unicode-properties \
|
||||
--enable-cpp \
|
||||
#
|
||||
make ${nprocs:+-j$nprocs}
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
make install
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
81
roles/stage2/tasks/pkg-config.recipe.sh
Normal file
81
roles/stage2/tasks/pkg-config.recipe.sh
Normal file
@ -0,0 +1,81 @@
|
||||
#!/bin/sh
|
||||
# Requires: glib2
|
||||
# Requires: libpopt
|
||||
PNAME=pkg-config
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec "$PNAME" "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
|
||||
sed 's/\[pkg-config\]/[true]/' -i configure.in
|
||||
sed -r 's@(GLIB_CFLAGS=).*@\1"-I/usr/include/glib-2.0 -I/usr/'"$LIB"'/glib-2.0/include"@' -i configure.in
|
||||
sed -r 's@(GLIB_LIBS=).*@\1"-lglib-2.0"@' -i configure.in
|
||||
autoreconf -fisv
|
||||
|
||||
./configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
\
|
||||
--with-installed-glib \
|
||||
--with-installed-popt \
|
||||
#
|
||||
make ${nprocs:+-j$nprocs}
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
make install
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
76
roles/stage2/tasks/service.recipe.sh
Normal file
76
roles/stage2/tasks/service.recipe.sh
Normal file
@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
# Requires: libpopt
|
||||
PNAME=service
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec "$PNAME" "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
sed -r 's/^(all:.*)limited.8(.*)/\1\2/' -i src/Makefile
|
||||
touch src/limited.8
|
||||
make install -C src
|
||||
install -p -m755 service /sbin/
|
||||
mkdir -p /bin
|
||||
mkdir -p /usr/sbin
|
||||
install -p -m755 run-parts /bin/
|
||||
install -p -m755 post_service preun_service /usr/sbin/
|
||||
install -p -m755 rc.d/init.d/* /etc/rc.d/init.d/
|
||||
chmod a-x /etc/rc.d/init.d/template
|
||||
|
||||
# This is a LSB compatibility symlink. We hope that some day
|
||||
# the actual files will be here instead of symlinks.
|
||||
ln -s rc.d/init.d /etc/
|
||||
|
||||
# This is a LSB compatibility symlink. We hope that some day
|
||||
# the actual files will be here instead of symlinks.
|
||||
for i in \`seq 0 6\`; do
|
||||
ln -s rc.d/rc\$i.d /etc/rc\$i.d
|
||||
done
|
||||
|
||||
mkdir -p /etc/rc.d/rc{0,1,2,3,4,5,6}.d
|
||||
mkdir -p /etc/sysconfig/limits.d
|
||||
mkdir -p /usr/libexec/service/legacy-actions
|
||||
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
75
roles/stage2/tasks/time.recipe.sh
Normal file
75
roles/stage2/tasks/time.recipe.sh
Normal file
@ -0,0 +1,75 @@
|
||||
#!/bin/sh
|
||||
# Requires: fake-makeinfo
|
||||
PNAME=time
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec "$PNAME" "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
autoreconf -fisv
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
|
||||
./configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
#
|
||||
make ${nprocs:+-j$nprocs}
|
||||
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
make install
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
77
roles/stage2/tasks/xz.recipe.sh
Normal file
77
roles/stage2/tasks/xz.recipe.sh
Normal file
@ -0,0 +1,77 @@
|
||||
#!/bin/sh
|
||||
# Requires: autoconf
|
||||
# Requires: automake
|
||||
# Requires: gettext
|
||||
PNAME=xz
|
||||
|
||||
r_build() {
|
||||
spec=$(isrpm "$PNAME")
|
||||
uspec "$PNAME" "$spec"
|
||||
[ -n "$BP" ] || fatal '$BP empty'
|
||||
cd $BP
|
||||
|
||||
p="$(basename $PWD)"
|
||||
|
||||
tar -C .. -chf $HOME/hasher/chroot/.in/in.tar "$p"
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd \$HOME
|
||||
mkdir -p tmp
|
||||
tar xf /.in/in.tar
|
||||
cd $p
|
||||
|
||||
autoreconf -fisv
|
||||
|
||||
./configure \
|
||||
--build=$TARGET \
|
||||
--host=$TARGET \
|
||||
--bindir=/usr/bin \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/usr/"$LIB" \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var/lib \
|
||||
--sharedstatedir=/var/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
#
|
||||
make ${nprocs:+-j$nprocs}
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_install() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
mv /usr/src /usr/src.bak
|
||||
mkdir -p /usr/src
|
||||
cp -a /usr/src.bak/$p /usr/src/
|
||||
|
||||
cd /usr/src
|
||||
mkdir -p tmp
|
||||
cd $p
|
||||
make install
|
||||
|
||||
rm -rf /usr/src
|
||||
mv /usr/src.bak /usr/src
|
||||
@@@
|
||||
hsh-run --root --execute="$tmpdir"/prog
|
||||
}
|
||||
|
||||
r_clean() {
|
||||
cd $BP
|
||||
cat > "$tmpdir"/prog << @@@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd /usr/src
|
||||
rm -rf $p
|
||||
@@@
|
||||
hsh-run --execute="$tmpdir"/prog
|
||||
}
|
Loading…
Reference in New Issue
Block a user