[arch-releng] [PATCH 07/10] Use pci.ids from the host instead of downloading it every time
--- configs/releng/build.sh | 2 +- 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index df5571a..2632323 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -112,7 +112,7 @@ make_syslinux() { cp ${_src_syslinux}/*.0 ${_dst_syslinux} cp ${_src_syslinux}/memdisk ${_dst_syslinux} mkdir -p ${_dst_syslinux}/hdt - wget -O - http://pciids.sourceforge.net/v2.2/pci.ids | gzip -9 > ${_dst_syslinux}/hdt/pciids.gz + cat /usr/share/hwdata/pci.ids | gzip -9 > ${_dst_syslinux}/hdt/pciids.gz cat ${work_dir}/root-image/lib/modules/*-ARCH/modules.alias | gzip -9 > ${_dst_syslinux}/hdt/modalias.gz : > ${work_dir}/build.${FUNCNAME} fi -- 1.7.11
* Download and add package signatures to the repository database * Support any number of configured package caches Signed-off-by: Pierre Schmitz <pierre@archlinux.de> --- configs/releng/build.sh | 16 +++++++++++++--- 1 Datei geändert, 13 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 2632323..3cdbbf0 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -168,7 +168,7 @@ make_usr_share() { # 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 _cached_pkg _dst _pkgs + local _url _urls _pkg_name _dst _pkgs _cache_dir _cache_dirs mkdir -p ${work_dir}/repo-core-any mkdir -p ${work_dir}/repo-core-${arch} mkdir -p ${work_dir}/pacman.db/var/lib/pacman @@ -177,17 +177,27 @@ make_core_repo() { <(grep -v ^# ${script_path}/core.exclude.${arch} | sort | sed 's@^@core/@')) _urls=$(pacman -Sddp -r ${work_dir}/pacman.db ${_pkgs}) pacman -Swdd -r ${work_dir}/pacman.db --noprogressbar --noconfirm ${_pkgs} + _cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) for _url in ${_urls}; do _pkg_name=${_url##*/} - _cached_pkg=/var/cache/pacman/pkg/${_pkg_name} _dst=${work_dir}/repo-core-${arch}/${_pkg_name} - cp ${_cached_pkg} ${_dst} + 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 -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} -- 1.7.11
On 06/23/2012 06:40 AM, Pierre Schmitz wrote:
* Download and add package signatures to the repository database * Support any number of configured package caches
Signed-off-by: Pierre Schmitz <pierre@archlinux.de> --- configs/releng/build.sh | 16 +++++++++++++--- 1 Datei geändert, 13 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-)
diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 2632323..3cdbbf0 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -168,7 +168,7 @@ make_usr_share() { # 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 _cached_pkg _dst _pkgs + local _url _urls _pkg_name _dst _pkgs _cache_dir _cache_dirs mkdir -p ${work_dir}/repo-core-any mkdir -p ${work_dir}/repo-core-${arch} mkdir -p ${work_dir}/pacman.db/var/lib/pacman @@ -177,17 +177,27 @@ make_core_repo() { <(grep -v ^# ${script_path}/core.exclude.${arch} | sort | sed 's@^@core/@')) _urls=$(pacman -Sddp -r ${work_dir}/pacman.db ${_pkgs}) pacman -Swdd -r ${work_dir}/pacman.db --noprogressbar --noconfirm ${_pkgs} + _cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) for _url in ${_urls}; do _pkg_name=${_url##*/} - _cached_pkg=/var/cache/pacman/pkg/${_pkg_name} _dst=${work_dir}/repo-core-${arch}/${_pkg_name} - cp ${_cached_pkg} ${_dst} + 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 -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} +1
-- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
This ensures we do not pick up any testing or third party repos from the host. Signed-off-by: Pierre Schmitz <pierre@archlinux.de> --- configs/releng/build.sh | 33 ++++++++-------- configs/releng/pacman.conf | 96 ++++++++++++++++++++++++++++++++++++++++++++++ 2 Dateien geändert, 113 Zeilen hinzugefügt(+), 16 Zeilen entfernt(-) create mode 100644 configs/releng/pacman.conf diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 3cdbbf0..73f80fe 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -13,16 +13,17 @@ verbose="" cmd_args="" script_path=$(readlink -f ${0%/*}) +pacman_conf="${script_path}/pacman.conf" # Base installation (root-image) make_basefs() { - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" init - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "memtest86+ mkinitcpio-nfs-utils nbd curl" install + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" init + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "memtest86+ mkinitcpio-nfs-utils nbd curl" install } # Additional packages (root-image) make_packages() { - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "$(grep -v ^# ${script_path}/packages.${arch})" install + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "$(grep -v ^# ${script_path}/packages.${arch})" install } # Copy mkinitcpio archiso hooks (root-image) @@ -47,7 +48,7 @@ make_boot() { local _src=${work_dir}/root-image local _dst_boot=${work_dir}/iso/${install_dir}/boot mkdir -p ${_dst_boot}/${arch} - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" \ + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ -r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img' \ run mv ${_src}/boot/archiso.img ${_dst_boot}/${arch}/archiso.img @@ -139,10 +140,10 @@ make_customize_root_image() { wget -O ${work_dir}/root-image/etc/pacman.d/mirrorlist 'https://www.archlinux.org/mirrorlist/?country=all&protocol=http&use_mirror_status=on' sed -i "s/#Server/Server/g" ${work_dir}/root-image/etc/pacman.d/mirrorlist sed -i 's/#\(en_US\.UTF-8\)/\1/' ${work_dir}/root-image/etc/locale.gen - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" \ + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ -r 'locale-gen' \ run - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" \ + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ -r 'useradd -m -p "" -g users -G "audio,disk,optical,wheel" arch' \ run : > ${work_dir}/build.${FUNCNAME} @@ -172,12 +173,12 @@ make_core_repo() { mkdir -p ${work_dir}/repo-core-any mkdir -p ${work_dir}/repo-core-${arch} mkdir -p ${work_dir}/pacman.db/var/lib/pacman - pacman -Sy -r ${work_dir}/pacman.db - _pkgs=$(comm -2 -3 <(pacman -Sql -r ${work_dir}/pacman.db core | sort | sed 's@^@core/@') \ + 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 -Sddp -r ${work_dir}/pacman.db ${_pkgs}) - pacman -Swdd -r ${work_dir}/pacman.db --noprogressbar --noconfirm ${_pkgs} - _cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) + _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} + _cache_dirs=($(pacman --config "${pacman_conf}" -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) for _url in ${_urls}; do _pkg_name=${_url##*/} _dst=${work_dir}/repo-core-${arch}/${_pkg_name} @@ -199,7 +200,7 @@ make_core_repo() { # 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 -Sp -r ${work_dir}/pacman.db --print-format "%r/%n-%v" ${_pkgs} | sort > ${work_dir}/iso/${install_dir}/pkglist.repo-core.${arch}.txt + 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 } @@ -216,16 +217,16 @@ make_aitab() { # Build all filesystem images specified in aitab (.fs .fs.sfs .sfs) make_prepare() { - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" pkglist - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" prepare + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" pkglist + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" prepare } # Build ISO # args: $1 (core | netinstall) make_iso() { local _iso_type=${1} - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" checksum - mkarchiso ${verbose} -w "${work_dir}" -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}" 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" } # Build dual-iso images from ${work_dir}/i686/iso and ${work_dir}/x86_64/iso diff --git a/configs/releng/pacman.conf b/configs/releng/pacman.conf new file mode 100644 index 0000000..821f9a5 --- /dev/null +++ b/configs/releng/pacman.conf @@ -0,0 +1,96 @@ +# +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir = / +#DBPath = /var/lib/pacman/ +#CacheDir = /var/cache/pacman/pkg/ +#LogFile = /var/log/pacman.log +#GPGDir = /etc/pacman.d/gnupg/ +HoldPkg = pacman glibc +# If upgrades are available for these packages they will be asked for first +SyncFirst = pacman +#XferCommand = /usr/bin/curl -C - -f %u > %o +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#CleanMethod = KeepInstalled +Architecture = auto + +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +#UseDelta +#TotalDownload +# We cannot check disk space from within a chroot environment +#CheckSpace +#VerbosePkgLists + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +#SigLevel = Optional TrustedOnly + +# NOTE: You must run `pacman-key --init` before first using pacman; the local +# keyring can then be populated with the keys of all official Arch Linux +# packagers with `pacman-key --populate archlinux`. + +# +# REPOSITORIES +# - can be defined here or included from another file +# - pacman will search repositories in the order defined here +# - local/custom mirrors can be added here or in separate files +# - repositories listed first will take precedence when packages +# have identical names, regardless of version number +# - URLs will have $repo replaced by the name of the current repo +# - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +# [repo-name] +# Server = ServerName +# Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +#[testing] +#SigLevel = PackageRequired +#Include = /etc/pacman.d/mirrorlist + +[core] +SigLevel = PackageRequired +Include = /etc/pacman.d/mirrorlist + +[extra] +SigLevel = PackageRequired +Include = /etc/pacman.d/mirrorlist + +#[community-testing] +#SigLevel = PackageRequired +#Include = /etc/pacman.d/mirrorlist + +[community] +SigLevel = PackageRequired +Include = /etc/pacman.d/mirrorlist + +# An example of a custom package repository. See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#SigLevel = Optional TrustAll +#Server = file:///home/custompkgs + -- 1.7.11
On 06/23/2012 06:40 AM, Pierre Schmitz wrote:
This ensures we do not pick up any testing or third party repos from the host.
Signed-off-by: Pierre Schmitz <pierre@archlinux.de> --- configs/releng/build.sh | 33 ++++++++-------- configs/releng/pacman.conf | 96 ++++++++++++++++++++++++++++++++++++++++++++++ 2 Dateien geändert, 113 Zeilen hinzugefügt(+), 16 Zeilen entfernt(-) create mode 100644 configs/releng/pacman.conf
diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 3cdbbf0..73f80fe 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -13,16 +13,17 @@ verbose="" cmd_args=""
script_path=$(readlink -f ${0%/*}) +pacman_conf="${script_path}/pacman.conf"
# Base installation (root-image) make_basefs() { - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" init - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "memtest86+ mkinitcpio-nfs-utils nbd curl" install + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" init + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "memtest86+ mkinitcpio-nfs-utils nbd curl" install }
# Additional packages (root-image) make_packages() { - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "$(grep -v ^# ${script_path}/packages.${arch})" install + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "$(grep -v ^# ${script_path}/packages.${arch})" install }
# Copy mkinitcpio archiso hooks (root-image) @@ -47,7 +48,7 @@ make_boot() { local _src=${work_dir}/root-image local _dst_boot=${work_dir}/iso/${install_dir}/boot mkdir -p ${_dst_boot}/${arch} - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" \ + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ -r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img' \ run mv ${_src}/boot/archiso.img ${_dst_boot}/${arch}/archiso.img @@ -139,10 +140,10 @@ make_customize_root_image() { wget -O ${work_dir}/root-image/etc/pacman.d/mirrorlist 'https://www.archlinux.org/mirrorlist/?country=all&protocol=http&use_mirror_status=on' sed -i "s/#Server/Server/g" ${work_dir}/root-image/etc/pacman.d/mirrorlist sed -i 's/#\(en_US\.UTF-8\)/\1/' ${work_dir}/root-image/etc/locale.gen - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" \ + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ -r 'locale-gen' \ run - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" \ + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ -r 'useradd -m -p "" -g users -G "audio,disk,optical,wheel" arch' \ run : > ${work_dir}/build.${FUNCNAME} @@ -172,12 +173,12 @@ make_core_repo() { mkdir -p ${work_dir}/repo-core-any mkdir -p ${work_dir}/repo-core-${arch} mkdir -p ${work_dir}/pacman.db/var/lib/pacman - pacman -Sy -r ${work_dir}/pacman.db - _pkgs=$(comm -2 -3 <(pacman -Sql -r ${work_dir}/pacman.db core | sort | sed 's@^@core/@') \ + 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 -Sddp -r ${work_dir}/pacman.db ${_pkgs}) - pacman -Swdd -r ${work_dir}/pacman.db --noprogressbar --noconfirm ${_pkgs} - _cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) + _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} + _cache_dirs=($(pacman --config "${pacman_conf}" -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) for _url in ${_urls}; do _pkg_name=${_url##*/} _dst=${work_dir}/repo-core-${arch}/${_pkg_name} @@ -199,7 +200,7 @@ make_core_repo() { # 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 -Sp -r ${work_dir}/pacman.db --print-format "%r/%n-%v" ${_pkgs} | sort > ${work_dir}/iso/${install_dir}/pkglist.repo-core.${arch}.txt + 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 } @@ -216,16 +217,16 @@ make_aitab() {
# Build all filesystem images specified in aitab (.fs .fs.sfs .sfs) make_prepare() { - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" pkglist - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" prepare + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" pkglist + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" prepare }
# Build ISO # args: $1 (core | netinstall) make_iso() { local _iso_type=${1} - mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" checksum - mkarchiso ${verbose} -w "${work_dir}" -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}" 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" }
# Build dual-iso images from ${work_dir}/i686/iso and ${work_dir}/x86_64/iso diff --git a/configs/releng/pacman.conf b/configs/releng/pacman.conf new file mode 100644 index 0000000..821f9a5 --- /dev/null +++ b/configs/releng/pacman.conf @@ -0,0 +1,96 @@ +# +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir = / +#DBPath = /var/lib/pacman/ +#CacheDir = /var/cache/pacman/pkg/ +#LogFile = /var/log/pacman.log +#GPGDir = /etc/pacman.d/gnupg/ +HoldPkg = pacman glibc +# If upgrades are available for these packages they will be asked for first +SyncFirst = pacman +#XferCommand = /usr/bin/curl -C - -f %u > %o +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#CleanMethod = KeepInstalled +Architecture = auto + +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +#UseDelta +#TotalDownload +# We cannot check disk space from within a chroot environment +#CheckSpace +#VerbosePkgLists + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +#SigLevel = Optional TrustedOnly + +# NOTE: You must run `pacman-key --init` before first using pacman; the local +# keyring can then be populated with the keys of all official Arch Linux +# packagers with `pacman-key --populate archlinux`. + +# +# REPOSITORIES +# - can be defined here or included from another file +# - pacman will search repositories in the order defined here +# - local/custom mirrors can be added here or in separate files +# - repositories listed first will take precedence when packages +# have identical names, regardless of version number +# - URLs will have $repo replaced by the name of the current repo +# - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +# [repo-name] +# Server = ServerName +# Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +#[testing] +#SigLevel = PackageRequired +#Include = /etc/pacman.d/mirrorlist + +[core] +SigLevel = PackageRequired +Include = /etc/pacman.d/mirrorlist + +[extra] +SigLevel = PackageRequired +Include = /etc/pacman.d/mirrorlist + +#[community-testing] +#SigLevel = PackageRequired +#Include = /etc/pacman.d/mirrorlist + +[community] +SigLevel = PackageRequired +Include = /etc/pacman.d/mirrorlist + +# An example of a custom package repository. See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#SigLevel = Optional TrustAll +#Server = file:///home/custompkgs +
+1, this was on my TODO, thanks. -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
Signed-off-by: Pierre Schmitz <pierre@archlinux.de> --- configs/releng/build.sh | 16 ++++++++++++---- 1 Datei geändert, 12 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 73f80fe..3a3ef02 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -13,7 +13,14 @@ verbose="" cmd_args="" script_path=$(readlink -f ${0%/*}) -pacman_conf="${script_path}/pacman.conf" + +setup_workdir() { + cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) + mkdir -p "${work_dir}" + pacman_conf="${work_dir}/pacman.conf" + sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${cache_dirs[@]})|g" \ + "${script_path}/pacman.conf" > "${pacman_conf}" +} # Base installation (root-image) make_basefs() { @@ -169,7 +176,7 @@ make_usr_share() { # 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 _cache_dirs + 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 @@ -178,11 +185,10 @@ make_core_repo() { <(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} - _cache_dirs=($(pacman --config "${pacman_conf}" -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) for _url in ${_urls}; do _pkg_name=${_url##*/} _dst=${work_dir}/repo-core-${arch}/${_pkg_name} - for _cache_dir in ${_cache_dirs[@]}; do + for _cache_dir in ${cache_dirs[@]}; do if [[ -e "${_cache_dir}/${_pkg_name}" ]]; then cp "${_cache_dir}/${_pkg_name}" ${_dst} fi @@ -431,6 +437,8 @@ if [[ ${command_mode} == "single" ]]; then work_dir=${work_dir}/${arch} fi +setup_workdir + case "${command_name}" in build) case "${command_mode}" in -- 1.7.11
On Sat, Jun 23, 2012 at 4:40 AM, Pierre Schmitz <pierre@archlinux.de> wrote:
Signed-off-by: Pierre Schmitz <pierre@archlinux.de> --- configs/releng/build.sh | 16 ++++++++++++---- 1 Datei geändert, 12 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-)
+1. And wow, I'm surprised to see the above message actually translated.
diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 73f80fe..3a3ef02 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -13,7 +13,14 @@ verbose="" cmd_args=""
script_path=$(readlink -f ${0%/*}) -pacman_conf="${script_path}/pacman.conf" + +setup_workdir() { + cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) + mkdir -p "${work_dir}" + pacman_conf="${work_dir}/pacman.conf" + sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${cache_dirs[@]})|g" \ + "${script_path}/pacman.conf" > "${pacman_conf}" +}
# Base installation (root-image) make_basefs() { @@ -169,7 +176,7 @@ make_usr_share() { # 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 _cache_dirs + 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 @@ -178,11 +185,10 @@ make_core_repo() { <(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} - _cache_dirs=($(pacman --config "${pacman_conf}" -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) for _url in ${_urls}; do _pkg_name=${_url##*/} _dst=${work_dir}/repo-core-${arch}/${_pkg_name} - for _cache_dir in ${_cache_dirs[@]}; do + for _cache_dir in ${cache_dirs[@]}; do if [[ -e "${_cache_dir}/${_pkg_name}" ]]; then cp "${_cache_dir}/${_pkg_name}" ${_dst} fi @@ -431,6 +437,8 @@ if [[ ${command_mode} == "single" ]]; then work_dir=${work_dir}/${arch} fi
+setup_workdir + case "${command_name}" in build) case "${command_mode}" in -- 1.7.11
On 06/23/2012 06:40 AM, Pierre Schmitz wrote:
Signed-off-by: Pierre Schmitz <pierre@archlinux.de> --- configs/releng/build.sh | 16 ++++++++++++---- 1 Datei geändert, 12 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-)
diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 73f80fe..3a3ef02 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -13,7 +13,14 @@ verbose="" cmd_args=""
script_path=$(readlink -f ${0%/*}) -pacman_conf="${script_path}/pacman.conf" + +setup_workdir() { + cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) + mkdir -p "${work_dir}" + pacman_conf="${work_dir}/pacman.conf" + sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${cache_dirs[@]})|g" \ + "${script_path}/pacman.conf" > "${pacman_conf}" +}
# Base installation (root-image) make_basefs() { @@ -169,7 +176,7 @@ make_usr_share() { # 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 _cache_dirs + 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 @@ -178,11 +185,10 @@ make_core_repo() { <(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} - _cache_dirs=($(pacman --config "${pacman_conf}" -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) for _url in ${_urls}; do _pkg_name=${_url##*/} _dst=${work_dir}/repo-core-${arch}/${_pkg_name} - for _cache_dir in ${_cache_dirs[@]}; do + for _cache_dir in ${cache_dirs[@]}; do if [[ -e "${_cache_dir}/${_pkg_name}" ]]; then cp "${_cache_dir}/${_pkg_name}" ${_dst} fi @@ -431,6 +437,8 @@ if [[ ${command_mode} == "single" ]]; then work_dir=${work_dir}/${arch} fi
+setup_workdir + case "${command_name}" in build) case "${command_mode}" in +1
-- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
Signed-off-by: Pierre Schmitz <pierre@archlinux.de> --- configs/releng/packages.i686 | 1 - configs/releng/packages.x86_64 | 1 - configs/releng/root-image/arch/report-issues | 1 - configs/releng/root-image/arch/setup | 3 --- configs/releng/root-image/etc/motd | 16 ---------------- .../etc/rc.d/functions.d/symlink_used_block_devices | 7 ------- configs/releng/root-image/usr/bin/km | 2 -- 7 Dateien geändert, 31 Zeilen entfernt(-) delete mode 100755 configs/releng/root-image/arch/report-issues delete mode 100755 configs/releng/root-image/arch/setup delete mode 100644 configs/releng/root-image/etc/motd delete mode 100644 configs/releng/root-image/etc/rc.d/functions.d/symlink_used_block_devices delete mode 100755 configs/releng/root-image/usr/bin/km diff --git a/configs/releng/packages.i686 b/configs/releng/packages.i686 index 6012e7c..b2319c2 100644 --- a/configs/releng/packages.i686 +++ b/configs/releng/packages.i686 @@ -1,4 +1,3 @@ -aif b43-fwcutter btrfs-progs crda diff --git a/configs/releng/packages.x86_64 b/configs/releng/packages.x86_64 index 6012e7c..b2319c2 100644 --- a/configs/releng/packages.x86_64 +++ b/configs/releng/packages.x86_64 @@ -1,4 +1,3 @@ -aif b43-fwcutter btrfs-progs crda diff --git a/configs/releng/root-image/arch/report-issues b/configs/releng/root-image/arch/report-issues deleted file mode 100755 index bf3b3a3..0000000 --- a/configs/releng/root-image/arch/report-issues +++ /dev/null @@ -1 +0,0 @@ -aif-report-issues.sh diff --git a/configs/releng/root-image/arch/setup b/configs/releng/root-image/arch/setup deleted file mode 100755 index 908d106..0000000 --- a/configs/releng/root-image/arch/setup +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -# -aif -p interactive -d -l diff --git a/configs/releng/root-image/etc/motd b/configs/releng/root-image/etc/motd deleted file mode 100644 index ddd9fbc..0000000 --- a/configs/releng/root-image/etc/motd +++ /dev/null @@ -1,16 +0,0 @@ -************************************************************** -* To begin installation, run /arch/setup * -* You can find documentation at * -* /usr/share/aif/docs/official_installation_guide_en * -* * -* i18n: Use the 'km' utility to change your keyboard layout * -* and console font. * -* * -* If you encounter issues and want to report them or * -* seek help, run /arch/report-issues * -* * -* If you are looking to install Arch on something more * -* exotic, such as your kerosene-powered cheese grater, * -* please consult http://wiki.archlinux.org. * -* * -************************************************************** diff --git a/configs/releng/root-image/etc/rc.d/functions.d/symlink_used_block_devices b/configs/releng/root-image/etc/rc.d/functions.d/symlink_used_block_devices deleted file mode 100644 index f6b6062..0000000 --- a/configs/releng/root-image/etc/rc.d/functions.d/symlink_used_block_devices +++ /dev/null @@ -1,7 +0,0 @@ -symlink_used_block_devices() -{ - mkdir /run/aif - ln -s /run/archiso/used_block_devices /run/aif/ignore_block_devices -} - -add_hook multi_end symlink_used_block_devices diff --git a/configs/releng/root-image/usr/bin/km b/configs/releng/root-image/usr/bin/km deleted file mode 100755 index e24d780..0000000 --- a/configs/releng/root-image/usr/bin/km +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -aif -p partial-keymap -- 1.7.11
On 06/23/2012 06:40 AM, Pierre Schmitz wrote:
--- configs/releng/build.sh | 2 +- 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
diff --git a/configs/releng/build.sh b/configs/releng/build.sh index df5571a..2632323 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -112,7 +112,7 @@ make_syslinux() { cp ${_src_syslinux}/*.0 ${_dst_syslinux} cp ${_src_syslinux}/memdisk ${_dst_syslinux} mkdir -p ${_dst_syslinux}/hdt - wget -O - http://pciids.sourceforge.net/v2.2/pci.ids | gzip -9 > ${_dst_syslinux}/hdt/pciids.gz + cat /usr/share/hwdata/pci.ids | gzip -9 > ${_dst_syslinux}/hdt/pciids.gz cat ${work_dir}/root-image/lib/modules/*-ARCH/modules.alias | gzip -9 > ${_dst_syslinux}/hdt/modalias.gz : > ${work_dir}/build.${FUNCNAME} fi
at this point: ${work_dir}/root-image/usr/share/hwdata/pci.ids exists, so should be used instead of getting from host. -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
Am 24.06.2012 01:06, schrieb Gerardo Exequiel Pozzi:
On 06/23/2012 06:40 AM, Pierre Schmitz wrote:
--- configs/releng/build.sh | 2 +- 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
diff --git a/configs/releng/build.sh b/configs/releng/build.sh index df5571a..2632323 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -112,7 +112,7 @@ make_syslinux() { cp ${_src_syslinux}/*.0 ${_dst_syslinux} cp ${_src_syslinux}/memdisk ${_dst_syslinux} mkdir -p ${_dst_syslinux}/hdt - wget -O - http://pciids.sourceforge.net/v2.2/pci.ids | gzip -9 > ${_dst_syslinux}/hdt/pciids.gz + cat /usr/share/hwdata/pci.ids | gzip -9 > ${_dst_syslinux}/hdt/pciids.gz cat ${work_dir}/root-image/lib/modules/*-ARCH/modules.alias | gzip -9 > ${_dst_syslinux}/hdt/modalias.gz : > ${work_dir}/build.${FUNCNAME} fi
at this point: ${work_dir}/root-image/usr/share/hwdata/pci.ids exists, so should be used instead of getting from host.
fixed -- Pierre Schmitz, https://pierre-schmitz.com
participants (3)
-
Dan McGee
-
Gerardo Exequiel Pozzi
-
Pierre Schmitz