[arch-releng] [RFC] [PATCH] [configs/releng] Remove [core] ISO generation

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Sun Jul 22 20:16:16 EDT 2012


Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar>
---
 README                             |  29 ++++----
 configs/releng/aitab               |   4 +
 configs/releng/aitab.core          |   6 --
 configs/releng/aitab.netinstall    |   4 -
 configs/releng/build.sh            | 146 +++++--------------------------------
 configs/releng/core.exclude.i686   |   4 -
 configs/releng/core.exclude.x86_64 |   4 -
 7 files changed, 38 insertions(+), 159 deletions(-)
 create mode 100644 configs/releng/aitab
 delete mode 100644 configs/releng/aitab.core
 delete mode 100644 configs/releng/aitab.netinstall
 delete mode 100644 configs/releng/core.exclude.i686
 delete mode 100644 configs/releng/core.exclude.x86_64

diff --git a/README b/README
index dd22eb0..8778a25 100644
--- a/README
+++ b/README
@@ -165,13 +165,12 @@ if nothing is specified on command line.
 
 *** 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:
     <YYYY> Year
     <MM> Month
     <DD> Day
-    <TYPE> netinstall | core
     <ARCH> i686 | x86_64 | dual(*)
 
 (*) "dual" includes both i686 and x86_64 architectures.
@@ -190,7 +189,7 @@ Nomeclature:
 
 
 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) /
@@ -209,10 +208,10 @@ Nomeclature:
                 (example: /dev/sdx1)
 <MNT-TARGET-N>: Mount point path where <DEV-TARGET-N> is mounted
                 (example: /mnt/sdx/1)
-<ISO-SOURCE>:   Path to the ISO file archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso
-                (example: ~/archlinux-2012.04.16-netinstall-x86_64.iso)
+<ISO-SOURCE>:   Path to the ISO file archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
+                (example: ~/archlinux-2012.07.22-x86_64.iso)
 <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):
@@ -288,19 +287,19 @@ Note: Using here a GPT partition mode as example, but MBR should also works
 ** ISO in loopback mode.
 
 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>,
       where filesystem is labeled as <TARGET-FS-LABEL>.
 
 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
     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
 }
 
 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
     linux (loop)/arch/boot/i686/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile
     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
       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>.
       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).
@@ -319,12 +318,12 @@ Note: Described method is for using with SYSLINUX. Anyway MEMDISK from SYSLINUX
 
 LABEL arch_x64
    LINUX memdisk
-   INITRD /<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso
+   INITRD /<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
    APPEND iso
 
 LABEL arch_x32
    LINUX memdisk
-   INITRD /<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso
+   INITRD /<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
    APPEND iso
 
 
@@ -378,13 +377,13 @@ methods can be used to serve the rest of live-medium.
 
 * NBD
 
-Note: Adjust ARCH_201204 as needed.
+Note: Adjust ARCH_201207 as needed.
 
 # cat << EOF > /tmp/nbd-server.conf
 [generic]
 [archiso]
     readonly = true
-    exportname = /dev/disk/by-label/ARCH_201204
+    exportname = /dev/disk/by-label/ARCH_201207
 EOF
 # nbd-server -C /tmp/nbd-server.conf
 
@@ -494,6 +493,6 @@ used to build official images with much more things.
   # make -C archiso/archiso install
 
 * 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.
diff --git a/configs/releng/aitab b/configs/releng/aitab
new file mode 100644
index 0000000..ede4033
--- /dev/null
+++ b/configs/releng/aitab
@@ -0,0 +1,4 @@
+# <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%
diff --git a/configs/releng/aitab.core b/configs/releng/aitab.core
deleted file mode 100644
index ffceeda..0000000
--- a/configs/releng/aitab.core
+++ /dev/null
@@ -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
diff --git a/configs/releng/aitab.netinstall b/configs/releng/aitab.netinstall
deleted file mode 100644
index ede4033..0000000
--- a/configs/releng/aitab.netinstall
+++ /dev/null
@@ -1,4 +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%
diff --git a/configs/releng/build.sh b/configs/releng/build.sh
index 62709ac..cdebdf9 100755
--- a/configs/releng/build.sh
+++ b/configs/releng/build.sh
@@ -174,51 +174,11 @@ make_usr_share() {
     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
-# args: $1 (core | netinstall)
 make_aitab() {
-    local _iso_type=${1}
-    if [[ ! -e ${work_dir}/build.${FUNCNAME}_${_iso_type} ]]; then
-        sed "s|%ARCH%|${arch}|g" ${script_path}/aitab.${_iso_type} > ${work_dir}/iso/${install_dir}/aitab
-        : > ${work_dir}/build.${FUNCNAME}_${_iso_type}
+    if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
+        sed "s|%ARCH%|${arch}|g" ${script_path}/aitab > ${work_dir}/iso/${install_dir}/aitab
+        : > ${work_dir}/build.${FUNCNAME}
     fi
 }
 
@@ -229,18 +189,14 @@ make_prepare() {
 }
 
 # Build ISO
-# args: $1 (core | netinstall)
 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}" -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
-# args: $1 (core | netinstall)
 make_dual() {
-    local _iso_type=${1}
-    if [[ ! -e ${work_dir}/dual/build.${FUNCNAME}_${_iso_type} ]]; then
+    if [[ ! -e ${work_dir}/dual/build.${FUNCNAME} ]]; then
         if [[ ! -d ${work_dir}/i686/iso || ! -d ${work_dir}/x86_64/iso ]]; then
             echo "ERROR: i686 or x86_64 builds does not exist."
             _usage 1
@@ -258,29 +214,15 @@ make_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}/boot/syslinux/*.cfg
-        if [[ ${_iso_type} == "core" ]]; then
-            if [[ ! -e ${work_dir}/dual/iso/${install_dir}/any/repo-core-any.sfs ||
-                  ! -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
+        paste -d"\n" <(sed "s|%ARCH%|i686|g" ${script_path}/aitab) \
+                     <(sed "s|%ARCH%|x86_64|g" ${script_path}/aitab) | uniq > ${work_dir}/dual/iso/${install_dir}/aitab
         for _cfg in ${script_path}/syslinux.dual/*.cfg; do
             sed "s|%ARCHISO_LABEL%|${iso_label}|g;
                  s|%INSTALL_DIR%|${install_dir}|g" ${_cfg} > ${work_dir}/dual/iso/${install_dir}/boot/syslinux/${_cfg##*/}
         done
         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"
-        : > ${work_dir}/dual/build.${FUNCNAME}_${_iso_type}
+        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}
     fi
 }
 
@@ -351,8 +293,8 @@ _usage ()
     echo "    -h                 This help message"
     echo
     echo " Commands:"
-    echo "   build <mode> <type>"
-    echo "      Build selected .iso by <mode> and <type>"
+    echo "   build <mode>"
+    echo "      Build selected .iso by <mode>"
     echo "   purge <mode>"
     echo "      Clean working directory except iso/ directory of build <mode>"
     echo "   clean <mode>"
@@ -360,7 +302,6 @@ _usage ()
     echo
     echo " Command options:"
     echo "         <mode> Valid values 'single', 'dual' or 'all'"
-    echo "         <type> Valid values 'netinstall', 'core' or 'all'"
     exit ${1}
 }
 
@@ -421,14 +362,6 @@ if [[ $# -lt 2 ]]; then
 fi
 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
     echo "This mode <all> needs to be run on x86_64"
     _usage 1
@@ -444,58 +377,19 @@ case "${command_name}" in
     build)
         case "${command_mode}" in
             single)
-                case "${command_type}" in
-                    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
+                make_common_single
                 ;;
             dual)
-                case "${command_type}" in
-                    netinstall)
-                        make_dual netinstall
-                        ;;
-                    core)
-                        make_dual core
-                        ;;
-                    all)
-                        make_dual netinstall
-                        make_dual core
-                        ;;
-                    *)
-                        echo "Invalid build type '${command_type}'"
-                        _usage 1
-                        ;;
-                esac
+                make_dual
                 ;;
             all)
-                case "${command_type}" in
-                    netinstall|core|all)
-                        $0 ${cmd_args} build single ${command_type}
-                        $0 ${cmd_args} purge single
-                        linux32 $0 ${cmd_args} build single ${command_type}
-                        linux32 $0 ${cmd_args} purge single
-                        $0 ${cmd_args} build dual ${command_type}
-                        $0 ${cmd_args} purge dual
-                        ;;
-                    *)
-                        echo "Invalid build type '${command_type}'"
-                        _usage 1
-                        ;;
-                esac
+                $0 ${cmd_args} build single
+                $0 ${cmd_args} purge single
+                linux32 $0 ${cmd_args} build single
+                linux32 $0 ${cmd_args} purge single
+                $0 ${cmd_args} build dual
+                $0 ${cmd_args} purge dual
+                ;;
                 ;;
             *)
                 echo "Invalid build mode '${command_mode}'"
diff --git a/configs/releng/core.exclude.i686 b/configs/releng/core.exclude.i686
deleted file mode 100644
index a04ceef..0000000
--- a/configs/releng/core.exclude.i686
+++ /dev/null
@@ -1,4 +0,0 @@
-gcc-ada
-gcc-fortran
-gcc-go
-gcc-objc
diff --git a/configs/releng/core.exclude.x86_64 b/configs/releng/core.exclude.x86_64
deleted file mode 100644
index a04ceef..0000000
--- a/configs/releng/core.exclude.x86_64
+++ /dev/null
@@ -1,4 +0,0 @@
-gcc-ada
-gcc-fortran
-gcc-go
-gcc-objc
-- 
1.7.11.2



More information about the arch-releng mailing list