[configs/releng] Remove [core] ISO generation

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
Gerardo Exequiel Pozzi 2012-07-31 19:52:09 -03:00
parent 89ebc9ec16
commit e93e40d417
6 changed files with 36 additions and 158 deletions

29
README
View File

@ -165,13 +165,12 @@ if nothing is specified on command line.
*** Transfer ISO image to target medium (configs/releng) *** Transfer ISO image to target medium (configs/releng)
ISO images names consist of: archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso ISO images names consist of: archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
Where: Where:
<YYYY> Year <YYYY> Year
<MM> Month <MM> Month
<DD> Day <DD> Day
<TYPE> netinstall | core
<ARCH> i686 | x86_64 | dual(*) <ARCH> i686 | x86_64 | dual(*)
(*) "dual" includes both i686 and x86_64 architectures. (*) "dual" includes both i686 and x86_64 architectures.
@ -190,7 +189,7 @@ Nomeclature:
1) Write it directly using your favorite recording program. 1) Write it directly using your favorite recording program.
# cdrecord dev=<B>,<T>,<L> -dao archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso # cdrecord dev=<B>,<T>,<L> -dao archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
** To -> USB Flash Drive (USB-key) / Memory card (SD) / ** To -> USB Flash Drive (USB-key) / Memory card (SD) /
@ -209,10 +208,10 @@ Nomeclature:
(example: /dev/sdx1) (example: /dev/sdx1)
<MNT-TARGET-N>: Mount point path where <DEV-TARGET-N> is mounted <MNT-TARGET-N>: Mount point path where <DEV-TARGET-N> is mounted
(example: /mnt/sdx/1) (example: /mnt/sdx/1)
<ISO-SOURCE>: Path to the ISO file archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso <ISO-SOURCE>: Path to the ISO file archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
(example: ~/archlinux-2012.04.16-netinstall-x86_64.iso) (example: ~/archlinux-2012.07.22-x86_64.iso)
<FS-LABEL>: Represents the filesystem label of the <ISO-SOURCE> <FS-LABEL>: Represents the filesystem label of the <ISO-SOURCE>
(example: ARCH_201204 [for all ~/archlinux-2012.04.*.iso]) (example: ARCH_201207 [for all ~/archlinux-2012.07.*.iso])
* PC-BIOS (MBR): * PC-BIOS (MBR):
@ -288,19 +287,19 @@ Note: Using here a GPT partition mode as example, but MBR should also works
** ISO in loopback mode. ** ISO in loopback mode.
Note: Described method is for using with GRUB2. Note: Described method is for using with GRUB2.
GRUB2 is installed on target media and archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso GRUB2 is installed on target media and archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
is at path <TARGET-PATH> on disk <D> and partition <P>, is at path <TARGET-PATH> on disk <D> and partition <P>,
where filesystem is labeled as <TARGET-FS-LABEL>. where filesystem is labeled as <TARGET-FS-LABEL>.
menuentry "Arch Linux (x86_64)" { menuentry "Arch Linux (x86_64)" {
set isofile="/<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso" set isofile="/<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso"
loopback loop (hd<D>,<P>)$isofile loopback loop (hd<D>,<P>)$isofile
linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile
initrd (loop)/arch/boot/x86_64/archiso.img initrd (loop)/arch/boot/x86_64/archiso.img
} }
menuentry "Arch Linux (i686)" { menuentry "Arch Linux (i686)" {
set isofile="/<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso" set isofile="/<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso"
loopback loop (hd<D>,<P>)$isofile loopback loop (hd<D>,<P>)$isofile
linux (loop)/arch/boot/i686/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile linux (loop)/arch/boot/i686/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile
initrd (loop)/arch/boot/i686/archiso.img initrd (loop)/arch/boot/i686/archiso.img
@ -311,7 +310,7 @@ menuentry "Arch Linux (i686)" {
Note: Described method is for using with SYSLINUX. Anyway MEMDISK from SYSLINUX can work Note: Described method is for using with SYSLINUX. Anyway MEMDISK from SYSLINUX can work
with other bootloaders. with other bootloaders.
SYSLINUX is installed on target media and archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso SYSLINUX is installed on target media and archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
is at path <TARGET-PATH>. is at path <TARGET-PATH>.
On 32-bit systems, is needed to pass vmalloc=nnM to the kernel, where nn is the size On 32-bit systems, is needed to pass vmalloc=nnM to the kernel, where nn is the size
of the ISO image plus 64 MiB (or 128 MiB). of the ISO image plus 64 MiB (or 128 MiB).
@ -319,12 +318,12 @@ Note: Described method is for using with SYSLINUX. Anyway MEMDISK from SYSLINUX
LABEL arch_x64 LABEL arch_x64
LINUX memdisk LINUX memdisk
INITRD /<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso INITRD /<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
APPEND iso APPEND iso
LABEL arch_x32 LABEL arch_x32
LINUX memdisk LINUX memdisk
INITRD /<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso INITRD /<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
APPEND iso APPEND iso
@ -378,13 +377,13 @@ methods can be used to serve the rest of live-medium.
* NBD * NBD
Note: Adjust ARCH_201204 as needed. Note: Adjust ARCH_201207 as needed.
# cat << EOF > /tmp/nbd-server.conf # cat << EOF > /tmp/nbd-server.conf
[generic] [generic]
[archiso] [archiso]
readonly = true readonly = true
exportname = /dev/disk/by-label/ARCH_201204 exportname = /dev/disk/by-label/ARCH_201207
EOF EOF
# nbd-server -C /tmp/nbd-server.conf # nbd-server -C /tmp/nbd-server.conf
@ -497,6 +496,6 @@ used to build official images with much more things.
# make -C archiso/archiso install # make -C archiso/archiso install
* Build them! * Build them!
# /usr/share/archiso/configs/releng/build.sh build all all # /usr/share/archiso/configs/releng/build.sh build all
Note: See build.sh -h for more options. Note: See build.sh -h for more options.

View File

@ -1,6 +0,0 @@
# <img> <mnt> <arch> <sfs_comp> <fs_type> <fs_size>
root-image / %ARCH% xz ext4 50%
usr-lib-modules /usr/lib/modules %ARCH% xz ext4 50%
usr-share /usr/share any xz ext4 50%
repo-core-%ARCH% /repo/core/%ARCH% %ARCH% xz none 0
repo-core-any /repo/core/any any xz none 0

View File

@ -175,51 +175,11 @@ make_usr_share() {
fi fi
} }
# Make [core] repository, keep "any" pkgs in a separate fs (makes more "dual-iso" friendly)
make_core_repo() {
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
local _url _urls _pkg_name _dst _pkgs _cache_dir
mkdir -p ${work_dir}/repo-core-any
mkdir -p ${work_dir}/repo-core-${arch}
mkdir -p ${work_dir}/pacman.db/var/lib/pacman
pacman --config "${pacman_conf}" -Sy -r ${work_dir}/pacman.db
_pkgs=$(comm -2 -3 <(pacman --config "${pacman_conf}" -Sql -r ${work_dir}/pacman.db core | sort | sed 's@^@core/@') \
<(grep -v ^# ${script_path}/core.exclude.${arch} | sort | sed 's@^@core/@'))
_urls=$(pacman --config "${pacman_conf}" -Sddp -r ${work_dir}/pacman.db ${_pkgs})
pacman --config "${pacman_conf}" -Swdd -r ${work_dir}/pacman.db --noprogressbar --noconfirm ${_pkgs}
for _url in ${_urls}; do
_pkg_name=${_url##*/}
_dst=${work_dir}/repo-core-${arch}/${_pkg_name}
for _cache_dir in ${cache_dirs[@]}; do
if [[ -e "${_cache_dir}/${_pkg_name}" ]]; then
cp "${_cache_dir}/${_pkg_name}" ${_dst}
fi
done
# download the package signature
curl -sC - -f "${_url}.sig" > "${_dst}.sig"
repo-add -q ${work_dir}/repo-core-${arch}/core.db.tar.gz ${_dst}
# remove the signature file again as it is now included in the db file
rm -f "${_dst}.sig"
if [[ ${_pkg_name} == *any.pkg.tar* ]]; then
mv ${_dst} ${work_dir}/repo-core-any/${_pkg_name}
ln -sf ../any/${_pkg_name} ${_dst}
fi
done
# Remove old copy of db file
rm -f ${work_dir}/repo-core-${arch}/core.db.tar.gz.old
mkdir -p ${work_dir}/iso/${install_dir}
pacman --config "${pacman_conf}" -Sp -r ${work_dir}/pacman.db --print-format "%r/%n-%v" ${_pkgs} | sort > ${work_dir}/iso/${install_dir}/pkglist.repo-core.${arch}.txt
: > ${work_dir}/build.${FUNCNAME}
fi
}
# Process aitab # Process aitab
# args: $1 (core | netinstall)
make_aitab() { make_aitab() {
local _iso_type=${1} if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
if [[ ! -e ${work_dir}/build.${FUNCNAME}_${_iso_type} ]]; then sed "s|%ARCH%|${arch}|g" ${script_path}/aitab > ${work_dir}/iso/${install_dir}/aitab
sed "s|%ARCH%|${arch}|g" ${script_path}/aitab.${_iso_type} > ${work_dir}/iso/${install_dir}/aitab : > ${work_dir}/build.${FUNCNAME}
: > ${work_dir}/build.${FUNCNAME}_${_iso_type}
fi fi
} }
@ -230,18 +190,14 @@ make_prepare() {
} }
# Build ISO # Build ISO
# args: $1 (core | netinstall)
make_iso() { make_iso() {
local _iso_type=${1}
mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" checksum mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" checksum
mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -L "${iso_label}" -o "${out_dir}" iso "${iso_name}-${iso_version}-${_iso_type}-${arch}.iso" mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -L "${iso_label}" -o "${out_dir}" iso "${iso_name}-${iso_version}-${arch}.iso"
} }
# Build dual-iso images from ${work_dir}/i686/iso and ${work_dir}/x86_64/iso # Build dual-iso images from ${work_dir}/i686/iso and ${work_dir}/x86_64/iso
# args: $1 (core | netinstall)
make_dual() { make_dual() {
local _iso_type=${1} if [[ ! -e ${work_dir}/dual/build.${FUNCNAME} ]]; then
if [[ ! -e ${work_dir}/dual/build.${FUNCNAME}_${_iso_type} ]]; then
if [[ ! -d ${work_dir}/i686/iso || ! -d ${work_dir}/x86_64/iso ]]; then if [[ ! -d ${work_dir}/i686/iso || ! -d ${work_dir}/x86_64/iso ]]; then
echo "ERROR: i686 or x86_64 builds does not exist." echo "ERROR: i686 or x86_64 builds does not exist."
_usage 1 _usage 1
@ -259,29 +215,15 @@ make_dual() {
cp -a -l -n ${_src_two} ${work_dir}/dual cp -a -l -n ${_src_two} ${work_dir}/dual
rm -f ${work_dir}/dual/iso/${install_dir}/aitab rm -f ${work_dir}/dual/iso/${install_dir}/aitab
rm -f ${work_dir}/dual/iso/${install_dir}/boot/syslinux/*.cfg rm -f ${work_dir}/dual/iso/${install_dir}/boot/syslinux/*.cfg
if [[ ${_iso_type} == "core" ]]; then paste -d"\n" <(sed "s|%ARCH%|i686|g" ${script_path}/aitab) \
if [[ ! -e ${work_dir}/dual/iso/${install_dir}/any/repo-core-any.sfs || <(sed "s|%ARCH%|x86_64|g" ${script_path}/aitab) | uniq > ${work_dir}/dual/iso/${install_dir}/aitab
! -e ${work_dir}/dual/iso/${install_dir}/i686/repo-core-i686.sfs ||
! -e ${work_dir}/dual/iso/${install_dir}/x86_64/repo-core-x86_64.sfs ]]; then
echo "ERROR: core_iso_single build is not found."
_usage 1
fi
else
rm -f ${work_dir}/dual/iso/${install_dir}/any/repo-core-any.sfs
rm -f ${work_dir}/dual/iso/${install_dir}/i686/repo-core-i686.sfs
rm -f ${work_dir}/dual/iso/${install_dir}/x86_64/repo-core-x86_64.sfs
rm -f ${work_dir}/dual/iso/${install_dir}/pkglist.repo-core.i686.txt
rm -f ${work_dir}/dual/iso/${install_dir}/pkglist.repo-core.x86_64.txt
fi
paste -d"\n" <(sed "s|%ARCH%|i686|g" ${script_path}/aitab.${_iso_type}) \
<(sed "s|%ARCH%|x86_64|g" ${script_path}/aitab.${_iso_type}) | uniq > ${work_dir}/dual/iso/${install_dir}/aitab
for _cfg in ${script_path}/syslinux.dual/*.cfg; do for _cfg in ${script_path}/syslinux.dual/*.cfg; do
sed "s|%ARCHISO_LABEL%|${iso_label}|g; sed "s|%ARCHISO_LABEL%|${iso_label}|g;
s|%INSTALL_DIR%|${install_dir}|g" ${_cfg} > ${work_dir}/dual/iso/${install_dir}/boot/syslinux/${_cfg##*/} s|%INSTALL_DIR%|${install_dir}|g" ${_cfg} > ${work_dir}/dual/iso/${install_dir}/boot/syslinux/${_cfg##*/}
done done
mkarchiso ${verbose} -w "${work_dir}/dual" -D "${install_dir}" checksum mkarchiso ${verbose} -w "${work_dir}/dual" -D "${install_dir}" checksum
mkarchiso ${verbose} -w "${work_dir}/dual" -D "${install_dir}" -L "${iso_label}" -o "${out_dir}" iso "${iso_name}-${iso_version}-${_iso_type}-dual.iso" mkarchiso ${verbose} -w "${work_dir}/dual" -D "${install_dir}" -L "${iso_label}" -o "${out_dir}" iso "${iso_name}-${iso_version}-dual.iso"
: > ${work_dir}/dual/build.${FUNCNAME}_${_iso_type} : > ${work_dir}/dual/build.${FUNCNAME}
fi fi
} }
@ -326,9 +268,9 @@ make_common_single() {
make_customize_root_image make_customize_root_image
make_usr_lib_modules make_usr_lib_modules
make_usr_share make_usr_share
make_aitab $1 make_aitab
make_prepare $1 make_prepare
make_iso $1 make_iso
} }
_usage () _usage ()
@ -352,8 +294,8 @@ _usage ()
echo " -h This help message" echo " -h This help message"
echo echo
echo " Commands:" echo " Commands:"
echo " build <mode> <type>" echo " build <mode>"
echo " Build selected .iso by <mode> and <type>" echo " Build selected .iso by <mode>"
echo " purge <mode>" echo " purge <mode>"
echo " Clean working directory except iso/ directory of build <mode>" echo " Clean working directory except iso/ directory of build <mode>"
echo " clean <mode>" echo " clean <mode>"
@ -361,7 +303,6 @@ _usage ()
echo echo
echo " Command options:" echo " Command options:"
echo " <mode> Valid values 'single', 'dual' or 'all'" echo " <mode> Valid values 'single', 'dual' or 'all'"
echo " <type> Valid values 'netinstall', 'core' or 'all'"
exit ${1} exit ${1}
} }
@ -422,14 +363,6 @@ if [[ $# -lt 2 ]]; then
fi fi
command_mode="${2}" command_mode="${2}"
if [[ ${command_name} == "build" ]]; then
if [[ $# -lt 3 ]]; then
echo "No build type specified"
_usage 1
fi
command_type="${3}"
fi
if [[ ${command_mode} == "all" && ${arch} != "x86_64" ]]; then if [[ ${command_mode} == "all" && ${arch} != "x86_64" ]]; then
echo "This mode <all> needs to be run on x86_64" echo "This mode <all> needs to be run on x86_64"
_usage 1 _usage 1
@ -445,58 +378,18 @@ case "${command_name}" in
build) build)
case "${command_mode}" in case "${command_mode}" in
single) single)
case "${command_type}" in make_common_single
netinstall)
make_common_single netinstall
;;
core)
make_core_repo
make_common_single core
;;
all)
make_common_single netinstall
make_core_repo
make_common_single core
;;
*)
echo "Invalid build type '${command_type}'"
_usage 1
;;
esac
;; ;;
dual) dual)
case "${command_type}" in make_dual
netinstall)
make_dual netinstall
;;
core)
make_dual core
;;
all)
make_dual netinstall
make_dual core
;;
*)
echo "Invalid build type '${command_type}'"
_usage 1
;;
esac
;; ;;
all) all)
case "${command_type}" in $0 ${cmd_args} build single
netinstall|core|all) $0 ${cmd_args} purge single
$0 ${cmd_args} build single ${command_type} linux32 $0 ${cmd_args} build single
$0 ${cmd_args} purge single linux32 $0 ${cmd_args} purge single
linux32 $0 ${cmd_args} build single ${command_type} $0 ${cmd_args} build dual
linux32 $0 ${cmd_args} purge single $0 ${cmd_args} purge dual
$0 ${cmd_args} build dual ${command_type}
$0 ${cmd_args} purge dual
;;
*)
echo "Invalid build type '${command_type}'"
_usage 1
;;
esac
;; ;;
*) *)
echo "Invalid build mode '${command_mode}'" echo "Invalid build mode '${command_mode}'"

View File

@ -1,4 +0,0 @@
gcc-ada
gcc-fortran
gcc-go
gcc-objc

View File

@ -1,4 +0,0 @@
gcc-ada
gcc-fortran
gcc-go
gcc-objc