mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 18:06:19 +02:00
Compare commits
9 Commits
v1.2.0
...
179-build-
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f77b767971 | ||
![]() |
144f9a871e | ||
![]() |
44328cd9a3 | ||
![]() |
0e2b16b0ac | ||
![]() |
6f0a8c345d | ||
![]() |
5f19853414 | ||
![]() |
2b62ac660d | ||
![]() |
7cb72699f6 | ||
![]() |
d1790c295a |
@@ -27,6 +27,7 @@ _makechrootpkg_args=(
|
||||
-I
|
||||
-l
|
||||
-n
|
||||
-t
|
||||
-T
|
||||
-U
|
||||
-x
|
||||
@@ -36,6 +37,7 @@ _makechrootpkg_args_D_opts() { _filedir -d; }
|
||||
_makechrootpkg_args_r_opts() { _filedir -d; }
|
||||
_makechrootpkg_args_I_opts() { _filedir '*.pkg.tar.*'; }
|
||||
_makechrootpkg_args_l_opts() { _filedir -d; }
|
||||
_makechrootpkg_args_t_opts() { _filedir -d; }
|
||||
_makechrootpkg_args_U_opts() { :; }
|
||||
_makechrootpkg_args_x_opts() { _devtools_completions_inspect; }
|
||||
_makechrootpkg() { __devtools_complete _makechrootpkg; }
|
||||
@@ -61,12 +63,14 @@ _mkarchroot_args=(
|
||||
-C
|
||||
-M
|
||||
-c
|
||||
-f
|
||||
-h
|
||||
)
|
||||
_mkarchroot_args_U_opts() { _filedir '*.pkg.tar.*'; }
|
||||
_mkarchroot_args_C_opts() { _filedir '*.conf'; }
|
||||
_mkarchroot_args_M_opts() { _filedir '*.conf'; }
|
||||
_mkarchroot_args_c_opts() { _filedir -d; }
|
||||
_mkarchroot_args_f_opts() { _filedir -d; }
|
||||
_mkarchroot_opts() {
|
||||
local args
|
||||
args=$(__pkgctl_word_count_after_subcommand)
|
||||
|
@@ -222,6 +222,7 @@ _makechrootpkg_args=(
|
||||
'-c[Clean the chroot before building]'
|
||||
'*-d[Bind directory into build chroot as read-write]:bind_dir_rw:_files -/'
|
||||
'*-D[Bind directory into build chroot as read-only]:bind_dir_ro:_files -/'
|
||||
'*-t[Mount a tmpfs at directory]:tmpfs_dir:_files -/'
|
||||
'-u[Update the working copy of the chroot before building]'
|
||||
'-r[The chroot dir to use]:chroot_dir:_files -/'
|
||||
'*-I[Install a package into the working copy]:target:_files -g "*.pkg.tar.*(.)"'
|
||||
@@ -237,6 +238,7 @@ _mkarchroot_args=(
|
||||
'-C[Location of a pacman config file]:pacman_config:_files -g "*.conf(.)"'
|
||||
'-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"'
|
||||
'-c[Set pacman cache]:pacman_cache:_files -/'
|
||||
'-f[Copy src file from the host to the chroot]:target:_files -/'
|
||||
'-h[Display usage]'
|
||||
'1:working_dir:_files -/'
|
||||
'*:packages:_devtools_completions_all_packages'
|
||||
|
@@ -28,8 +28,9 @@ Options
|
||||
*-c* <dir>::
|
||||
Set pacman cache, if no directory is specified the passed pacman.conf's cachedir is used with a fallback to '/etc/pacman.conf'
|
||||
|
||||
*-f* <file>::
|
||||
Copy file from the host to the chroot
|
||||
*-f* <src>[:<dst>]::
|
||||
Copy file from the host to the chroot.
|
||||
If 'dst' is not provided, it defaults to 'src' inside of the chroot.
|
||||
|
||||
*-s*::
|
||||
Do not run setarch
|
||||
|
@@ -45,6 +45,9 @@ Options
|
||||
*-D* <dir>::
|
||||
Bind directory into build chroot as read-only
|
||||
|
||||
*-t* <dir>[:opts]::
|
||||
Mount a tmpfs at 'dir'. See the '--tmpfs' argument in systemd-nspawn(1) for more details.
|
||||
|
||||
*-u*::
|
||||
Update the working copy of the chroot before building
|
||||
This is useful for rebuilds without dirtying the pristine
|
||||
@@ -76,5 +79,9 @@ Options
|
||||
*-x* <when>::
|
||||
Inspect chroot after build, possible modes are 'never' (default), 'always' or 'failure'
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
systemd-nspawn(1)
|
||||
|
||||
include::include/footer.asciidoc[]
|
||||
|
@@ -32,8 +32,9 @@ Options
|
||||
*-c* <dir>::
|
||||
Set pacman cache.
|
||||
|
||||
*-f* <file>::
|
||||
*-f* <src>[:<dst>]::
|
||||
Copy file from the host to the chroot.
|
||||
If 'dst' is not provided, it defaults to 'src' inside of the chroot.
|
||||
|
||||
*-s*::
|
||||
Do not run setarch.
|
||||
|
@@ -12,7 +12,8 @@ pkgctl build [OPTIONS] [PATH...]
|
||||
Description
|
||||
-----------
|
||||
|
||||
TODO
|
||||
Build packages in clean chroot environment, offering various options
|
||||
and functionalities to customize the package building process.
|
||||
|
||||
Build Options
|
||||
-------------
|
||||
|
43
doc/man/pkgctl-db.1.asciidoc
Normal file
43
doc/man/pkgctl-db.1.asciidoc
Normal file
@@ -0,0 +1,43 @@
|
||||
pkgctl-db(1)
|
||||
============
|
||||
|
||||
NAME
|
||||
----
|
||||
pkgctl-db - Pacman database modification utility for package updates, moves, and more.
|
||||
|
||||
SYNOPSIS
|
||||
--------
|
||||
pkgctl db [OPTIONS] [SUBCOMMAND]
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
||||
Managing the Pacman database and facilitate the modification of packages and their metadata
|
||||
within the database
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
|
||||
*-h, --help*::
|
||||
Display usage information and available options.
|
||||
|
||||
Subcommands
|
||||
-----------
|
||||
|
||||
pkgctl db update::
|
||||
Update the binary repository as final release step
|
||||
|
||||
pkgctl db move::
|
||||
Move packages between binary repositories
|
||||
|
||||
pkgctl db remove::
|
||||
Remove packages from binary repositories
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
|
||||
pkgctl-db-update(1)
|
||||
pkgctl-db-move(1)
|
||||
pkgctl-db-remove(1)
|
||||
|
||||
include::include/footer.asciidoc[]
|
@@ -12,7 +12,12 @@ pkgctl [SUBCOMMAND] [OPTIONS]
|
||||
Description
|
||||
-----------
|
||||
|
||||
TODO
|
||||
Command-line utility serving as a unified interface for multiple development tools.
|
||||
This tool aims to simplify and optimize interactions with devtools by offering
|
||||
various subcommands for executing tasks related to package management, repository management,
|
||||
version control, among others.
|
||||
|
||||
Utilizing pkgctl enables users to efficiently administer their development workflows.
|
||||
|
||||
Options
|
||||
-------
|
||||
|
@@ -22,12 +22,13 @@ usage() {
|
||||
echo "A wrapper around systemd-nspawn. Provides support for pacman."
|
||||
echo
|
||||
echo ' options:'
|
||||
echo ' -C <file> Location of a pacman config file'
|
||||
echo ' -M <file> Location of a makepkg config file'
|
||||
echo ' -c <dir> Set pacman cache'
|
||||
echo ' -f <file> Copy file from the host to the chroot'
|
||||
echo ' -s Do not run setarch'
|
||||
echo ' -h This message'
|
||||
echo ' -C <file> Location of a pacman config file'
|
||||
echo ' -M <file> Location of a makepkg config file'
|
||||
echo ' -c <dir> Set pacman cache'
|
||||
echo ' -f <src>[:<dst>] Copy src file from the host to the chroot.'
|
||||
echo ' If dst file is not provided, it defaults to src'
|
||||
echo ' -s Do not run setarch'
|
||||
echo ' -h This message'
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -114,8 +115,10 @@ copy_hostconf () {
|
||||
|
||||
local file
|
||||
for file in "${files[@]}"; do
|
||||
mkdir -p "$(dirname "$working_dir$file")"
|
||||
cp -T "$file" "$working_dir$file"
|
||||
src="${file%%:*}"
|
||||
dst="${file#*:}"
|
||||
mkdir -p "$(dirname "$working_dir$dst")"
|
||||
cp -T "$src" "$working_dir$dst"
|
||||
done
|
||||
|
||||
sed -r "s|^#?\\s*CacheDir.+|CacheDir = ${cache_dirs[*]}|g" -i "$working_dir/etc/pacman.conf"
|
||||
|
@@ -7,6 +7,8 @@ _DEVTOOLS_LIBRARY_DIR=${_DEVTOOLS_LIBRARY_DIR:-@pkgdatadir@}
|
||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/common.sh
|
||||
# shellcheck source=src/lib/util/srcinfo.sh
|
||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/util/srcinfo.sh
|
||||
# shellcheck source=src/lib/state.sh
|
||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/state.sh
|
||||
|
||||
source /usr/share/makepkg/util/util.sh
|
||||
|
||||
@@ -234,6 +236,9 @@ declare -a uploads
|
||||
declare -a commit_arches
|
||||
declare -a skip_arches
|
||||
|
||||
BUILD_STATE_DIR=$(get_state_folder "build-state")
|
||||
state_file=
|
||||
|
||||
for _arch in "${arch[@]}"; do
|
||||
if [[ -n $commit_arch && ${_arch} != "$commit_arch" ]]; then
|
||||
skip_arches+=("$_arch")
|
||||
@@ -247,6 +252,12 @@ for _arch in "${arch[@]}"; do
|
||||
skip_arches+=("$_arch")
|
||||
continue 2
|
||||
fi
|
||||
|
||||
state_file="${BUILD_STATE_DIR}/$(basename "${pkgfile}").txt"
|
||||
if [[ -f "${state_file}" ]] && [[ $(cat "${state_file}") != "${repo}" ]]; then
|
||||
error "%s was not built against '%s', aborting" "${pkgfile}" "${repo}"
|
||||
exit 1
|
||||
fi
|
||||
uploads+=("$pkgfile")
|
||||
done
|
||||
|
||||
|
@@ -12,6 +12,8 @@ source "${_DEVTOOLS_LIBRARY_DIR}"/lib/common.sh
|
||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/db/update.sh
|
||||
# shellcheck source=src/lib/release.sh
|
||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/release.sh
|
||||
# shellcheck source=src/lib/state.sh
|
||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/state.sh
|
||||
# shellcheck source=src/lib/util/git.sh
|
||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/util/git.sh
|
||||
# shellcheck source=src/lib/util/srcinfo.sh
|
||||
@@ -129,6 +131,7 @@ pkgctl_build() {
|
||||
local PKGVER=
|
||||
local PKGREL=
|
||||
local MESSAGE=
|
||||
local BUILD_STATE_DIR=
|
||||
|
||||
local paths=()
|
||||
local BUILD_ARCH=()
|
||||
@@ -304,6 +307,8 @@ pkgctl_build() {
|
||||
fi
|
||||
fi
|
||||
|
||||
BUILD_STATE_DIR=$(get_state_folder "build-state")
|
||||
|
||||
# assign default worker slot
|
||||
if [[ -z ${WORKER_SLOT} ]] && ! WORKER_SLOT="$(tty | sed 's|/dev/pts/||')"; then
|
||||
WORKER_SLOT=$(( RANDOM % $(nproc) + 1 ))
|
||||
@@ -481,25 +486,26 @@ pkgctl_build() {
|
||||
# shellcheck disable=SC2119
|
||||
write_srcinfo_file
|
||||
|
||||
# test-install (some of) the produced packages
|
||||
if [[ ${INSTALL_TO_HOST} == auto ]] || [[ ${INSTALL_TO_HOST} == all ]]; then
|
||||
# shellcheck disable=2119
|
||||
load_makepkg_config
|
||||
# shellcheck disable=2119
|
||||
load_makepkg_config
|
||||
|
||||
# this is inspired by print_all_package_names from libmakepkg
|
||||
local version pkg_architecture pkg pkgfile
|
||||
version=$(get_full_version)
|
||||
# this is inspired by print_all_package_names from libmakepkg
|
||||
local version pkg_architecture pkg pkgfile
|
||||
version=$(get_full_version)
|
||||
|
||||
for pkg in "${pkgname[@]}"; do
|
||||
pkg_architecture=$(get_pkg_arch "$pkg")
|
||||
pkgfile=$(realpath "$(printf "%s/%s-%s-%s%s\n" "${PKGDEST:-.}" "$pkg" "$version" "$pkg_architecture" "$PKGEXT")")
|
||||
for pkg in "${pkgname[@]}"; do
|
||||
pkg_architecture=$(get_pkg_arch "$pkg")
|
||||
pkgpath=$(realpath "$(printf "%s\n" "${PKGDEST:-.}")")
|
||||
pkgfile=$(printf "%s-%s-%s%s\n" "$pkg" "$version" "$pkg_architecture" "$PKGEXT")
|
||||
|
||||
# check if we install all packages or if the (split-)package is already installed
|
||||
if [[ ${INSTALL_TO_HOST} == all ]] || ( [[ ${INSTALL_TO_HOST} == auto ]] && pacman -Qq -- "$pkg" &>/dev/null ); then
|
||||
INSTALL_HOST_PACKAGES+=("$pkgfile")
|
||||
fi
|
||||
done
|
||||
fi
|
||||
# check if we install all packages or if the (split-)package is already installed
|
||||
if [[ ${INSTALL_TO_HOST} == all ]] || ( [[ ${INSTALL_TO_HOST} == auto ]] && pacman -Qq -- "$pkg" &>/dev/null ); then
|
||||
INSTALL_HOST_PACKAGES+=("${pkgpath}/${pkgfile}")
|
||||
fi
|
||||
|
||||
# save against which repo we have built the package
|
||||
printf "%s" "${pkgrepo}" > "${BUILD_STATE_DIR}/${pkgfile}.txt"
|
||||
done
|
||||
|
||||
# release the build
|
||||
if (( RELEASE )); then
|
||||
|
@@ -15,6 +15,9 @@ $DEVTOOLS_INCLUDE_COMMON_SH
|
||||
# Avoid any encoding problems
|
||||
export LANG=C.UTF-8
|
||||
|
||||
# Avoid systemd trying to color the terminal on systemd-nspawn
|
||||
export SYSTEMD_TINT_BACKGROUND=no
|
||||
|
||||
# Set buildtool properties
|
||||
export BUILDTOOL=devtools
|
||||
export BUILDTOOLVER=@buildtoolver@
|
||||
|
18
src/lib/state.sh
Normal file
18
src/lib/state.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/hint/bash
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
[[ -z ${DEVTOOLS_INCLUDE_STATE_SH:-} ]] || return 0
|
||||
DEVTOOLS_INCLUDE_STATE_SH=1
|
||||
|
||||
set -e
|
||||
|
||||
readonly XDG_DEVTOOLS_STATE_DIR="${XDG_STATE_HOME:-$HOME/.local/state}/devtools"
|
||||
|
||||
get_state_folder() {
|
||||
local foldername=$1
|
||||
local path="${XDG_DEVTOOLS_STATE_DIR}/${foldername}"
|
||||
|
||||
mkdir --parents -- "$path"
|
||||
printf '%s' "${path}"
|
||||
}
|
@@ -227,7 +227,7 @@ get_upstream_version() {
|
||||
fi
|
||||
|
||||
if ! output=$(GIT_TERMINAL_PROMPT=0 nvchecker --file "${config}" --logger json "${opts[@]}" 2>&1 | \
|
||||
jq --raw-output 'select(.level != "debug")'); then
|
||||
jq --raw-output 'select((.level != "debug") and (.event != "ignoring invalid version"))'); then
|
||||
printf "failed to run nvchecker: %s" "${output}"
|
||||
return 1
|
||||
fi
|
||||
@@ -267,13 +267,13 @@ nvchecker_check_config() {
|
||||
done
|
||||
|
||||
# check if the config contains a pkgbase section
|
||||
if [[ -n ${pkgbase} ]] && ! grep --max-count=1 --extended-regexp --quiet "^\\[\"?${pkgbase}\"?\\]" < "${config}"; then
|
||||
if [[ -n ${pkgbase} ]] && ! grep --max-count=1 --extended-regexp --quiet "^\\[\"?${pkgbase//+/\\+}\"?\\]" < "${config}"; then
|
||||
printf "missing pkgbase section in %s: %s" "${config}" "${pkgbase}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# check if the config contains any section other than pkgbase
|
||||
if [[ -n ${pkgbase} ]] && property=$(grep --max-count=1 --perl-regexp "^\\[(?!\"?${pkgbase}\"?\\]).+\\]" < "${config}"); then
|
||||
if [[ -n ${pkgbase} ]] && property=$(grep --max-count=1 --perl-regexp "^\\[(?!\"?${pkgbase//+/\\+}\"?\\]).+\\]" < "${config}"); then
|
||||
printf "non-pkgbase section not supported in %s: %s" "${config}" "${property}"
|
||||
return 1
|
||||
fi
|
||||
|
@@ -252,7 +252,7 @@ nvchecker_setup() {
|
||||
|
||||
# escape the section if it contains toml subsection chars
|
||||
section="${pkgbase}"
|
||||
if [[ ${section} == *.* ]]; then
|
||||
if [[ ${section} == *.* ]] || [[ ${section} == *+* ]]; then
|
||||
section="\"${section}\""
|
||||
fi
|
||||
|
||||
|
@@ -38,6 +38,7 @@ inspect=never
|
||||
|
||||
bindmounts_ro=()
|
||||
bindmounts_rw=()
|
||||
bindmounts_tmpfs=()
|
||||
|
||||
copy=$USER
|
||||
[[ -n ${SUDO_USER:-} ]] && copy=$SUDO_USER
|
||||
@@ -65,23 +66,24 @@ usage() {
|
||||
echo "Default makepkg args: ${default_makepkg_args[*]}"
|
||||
echo ''
|
||||
echo 'Flags:'
|
||||
echo '-h This help'
|
||||
echo '-c Clean the chroot before building'
|
||||
echo '-d <dir> Bind directory into build chroot as read-write'
|
||||
echo '-D <dir> Bind directory into build chroot as read-only'
|
||||
echo '-u Update the working copy of the chroot before building'
|
||||
echo ' This is useful for rebuilds without dirtying the pristine'
|
||||
echo ' chroot'
|
||||
echo '-r <dir> The chroot dir to use'
|
||||
echo '-I <pkg> Install a package into the working copy of the chroot'
|
||||
echo '-l <copy> The directory to use as the working copy of the chroot'
|
||||
echo ' Useful for maintaining multiple copies'
|
||||
echo " Default: $copy"
|
||||
echo '-n Run namcap on the package'
|
||||
echo '-C Run checkpkg on the package'
|
||||
echo '-T Build in a temporary directory'
|
||||
echo '-U Run makepkg as a specified user'
|
||||
echo '-x <when> Inspect chroot after build (never, always, failure)'
|
||||
echo '-h This help'
|
||||
echo '-c Clean the chroot before building'
|
||||
echo '-d <dir> Bind directory into build chroot as read-write'
|
||||
echo '-D <dir> Bind directory into build chroot as read-only'
|
||||
echo '-t <dir[:opts]> Mount a tmpfs at directory'
|
||||
echo '-u Update the working copy of the chroot before building'
|
||||
echo ' This is useful for rebuilds without dirtying the pristine'
|
||||
echo ' chroot'
|
||||
echo '-r <dir> The chroot dir to use'
|
||||
echo '-I <pkg> Install a package into the working copy of the chroot'
|
||||
echo '-l <copy> The directory to use as the working copy of the chroot'
|
||||
echo ' Useful for maintaining multiple copies'
|
||||
echo " Default: $copy"
|
||||
echo '-n Run namcap on the package'
|
||||
echo '-C Run checkpkg on the package'
|
||||
echo '-T Build in a temporary directory'
|
||||
echo '-U Run makepkg as a specified user'
|
||||
echo '-x <when> Inspect chroot after build (never, always, failure)'
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -148,7 +150,7 @@ install_packages() {
|
||||
pkgnames=("${install_pkgs[@]##*/}")
|
||||
|
||||
cp -- "${install_pkgs[@]}" "$copydir/root/"
|
||||
arch-nspawn "$copydir" "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
|
||||
arch-nspawn "$copydir" "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" "${bindmounts_tmpfs[@]}" \
|
||||
pacman -U --noconfirm --ask=4 -- "${pkgnames[@]/#//root/}"
|
||||
ret=$?
|
||||
rm -- "${pkgnames[@]/#/$copydir/root/}"
|
||||
@@ -188,6 +190,11 @@ builduser ALL = NOPASSWD: /usr/bin/pacman
|
||||
EOF
|
||||
chmod 440 "$copydir/etc/sudoers.d/builduser-pacman"
|
||||
|
||||
cat > "$copydir/etc/gitconfig" <<EOF
|
||||
[safe]
|
||||
directory = *
|
||||
EOF
|
||||
|
||||
# This is a little gross, but this way the script is recreated every time in the
|
||||
# working copy
|
||||
{
|
||||
@@ -286,11 +293,12 @@ move_products() {
|
||||
}
|
||||
# }}}
|
||||
|
||||
while getopts 'hcur:I:l:nCTD:d:U:x:' arg; do
|
||||
while getopts 'hcur:I:l:nCTD:d:U:x:t:' arg; do
|
||||
case "$arg" in
|
||||
c) clean_first=1 ;;
|
||||
D) bindmounts_ro+=("--bind-ro=$OPTARG") ;;
|
||||
d) bindmounts_rw+=("--bind=$OPTARG") ;;
|
||||
t) bindmounts_tmpfs+=("--tmpfs=$OPTARG") ;;
|
||||
u) update_first=1 ;;
|
||||
r) passeddir="$OPTARG" ;;
|
||||
I) install_pkgs+=("$OPTARG") ;;
|
||||
@@ -360,7 +368,7 @@ if [[ ! -d $copydir ]] || (( clean_first )); then
|
||||
fi
|
||||
|
||||
(( update_first )) && arch-nspawn "$copydir" \
|
||||
"${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
|
||||
"${bindmounts_ro[@]}" "${bindmounts_rw[@]}" "${bindmounts_tmpfs[@]}" \
|
||||
pacman -Syuu --noconfirm
|
||||
|
||||
if [[ -n ${install_pkgs[*]:-} ]]; then
|
||||
@@ -385,6 +393,7 @@ nspawn_build_args=(
|
||||
--tmpfs="/tmp:${tmp_opts}"
|
||||
"${bindmounts_ro[@]}"
|
||||
"${bindmounts_rw[@]}"
|
||||
"${bindmounts_tmpfs[@]}"
|
||||
)
|
||||
|
||||
if arch-nspawn "$copydir" \
|
||||
|
@@ -22,13 +22,14 @@ nspawn_args=()
|
||||
usage() {
|
||||
echo "Usage: ${0##*/} [options] working-dir package-list..."
|
||||
echo ' options:'
|
||||
echo ' -U Use pacman -U to install packages'
|
||||
echo ' -C <file> Location of a pacman config file'
|
||||
echo ' -M <file> Location of a makepkg config file'
|
||||
echo ' -c <dir> Set pacman cache'
|
||||
echo ' -f <file> Copy file from the host to the chroot'
|
||||
echo ' -s Do not run setarch'
|
||||
echo ' -h This message'
|
||||
echo ' -U Use pacman -U to install packages'
|
||||
echo ' -C <file> Location of a pacman config file'
|
||||
echo ' -M <file> Location of a makepkg config file'
|
||||
echo ' -c <dir> Set pacman cache'
|
||||
echo ' -f <src>[:<dst>] Copy src file from the host to the chroot.'
|
||||
echo ' If dst file is not provided, it defaults to src'
|
||||
echo ' -s Do not run setarch'
|
||||
echo ' -h This message'
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -84,8 +85,10 @@ if is_btrfs "$working_dir"; then
|
||||
fi
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
mkdir -p "$(dirname "$working_dir$file")"
|
||||
cp "$file" "$working_dir$file"
|
||||
src="${file%%:*}"
|
||||
dst="${file#*:}"
|
||||
mkdir -p "$(dirname "$working_dir$dst")"
|
||||
cp "$src" "$working_dir$dst"
|
||||
done
|
||||
|
||||
unshare --mount pacstrap -${umode}Mc ${pac_conf:+-C "$pac_conf"} "$working_dir" \
|
||||
|
@@ -2,3 +2,4 @@
|
||||
source = "github"
|
||||
github = "anthraxx/git-smash"
|
||||
use_max_tag = true
|
||||
prefix = "v"
|
||||
|
@@ -1,3 +1,4 @@
|
||||
[git-smash]
|
||||
source = "git"
|
||||
git = "https://github.com/anthraxx/git-smash.git"
|
||||
prefix = "v"
|
||||
|
@@ -1,3 +1,4 @@
|
||||
["git.smash"]
|
||||
source = "git"
|
||||
git = "https://github.com/anthraxx/git-smash.git"
|
||||
prefix = "v"
|
||||
|
Reference in New Issue
Block a user