mirror of
				https://gitlab.archlinux.org/archlinux/devtools.git
				synced 2025-11-04 09:44:42 +01:00 
			
		
		
		
	Compare commits
	
		
			5 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					ee4edefa2f | ||
| 
						 | 
					a8b64995ee | ||
| 
						 | 
					2c9855fe6b | ||
| 
						 | 
					4d4ffb5d8f | ||
| 
						 | 
					2d79191c97 | 
							
								
								
									
										17
									
								
								archbuild.in
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								archbuild.in
									
									
									
									
									
								
							@@ -2,8 +2,7 @@
 | 
			
		||||
 | 
			
		||||
m4_include(lib/common.sh)
 | 
			
		||||
 | 
			
		||||
# FIXME: temporary added curl until pacman 4.0 moves to [core]
 | 
			
		||||
base_packages=(base base-devel sudo curl)
 | 
			
		||||
base_packages=(base base-devel sudo)
 | 
			
		||||
 | 
			
		||||
cmd="${0##*/}"
 | 
			
		||||
if [[ "${cmd%%-*}" == 'multilib' ]]; then
 | 
			
		||||
@@ -53,15 +52,6 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
 | 
			
		||||
	done
 | 
			
		||||
	exec 9>&-
 | 
			
		||||
 | 
			
		||||
	# FIXME: temporary workaround until pacman 4.0 moves to [core]
 | 
			
		||||
	if pacman -V | grep -q 'v4.' && ( [[ "$repo" == 'extra' || "$repo" == 'multilib' ]] ); then
 | 
			
		||||
		pacman_conf=$(mktemp)
 | 
			
		||||
		cp "@pkgdatadir@/pacman-${repo}.conf" "${pacman_conf}"
 | 
			
		||||
		sed -r 's/^#(SigLevel = Never)/\1/' -i "${pacman_conf}"
 | 
			
		||||
	else
 | 
			
		||||
		pacman_conf="@pkgdatadir@/pacman-${repo}.conf"
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
	rm -rf "${chroots}/${repo}-${arch}"
 | 
			
		||||
	mkdir -p "${chroots}/${repo}-${arch}"
 | 
			
		||||
	setarch "${arch}" mkarchroot \
 | 
			
		||||
@@ -69,11 +59,6 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
 | 
			
		||||
		-M "@pkgdatadir@/makepkg-${arch}.conf" \
 | 
			
		||||
		"${chroots}/${repo}-${arch}/root" \
 | 
			
		||||
		"${base_packages[@]}"
 | 
			
		||||
 | 
			
		||||
	# FIXME: temporary workaround until pacman 4.0 moves to [core]
 | 
			
		||||
	if pacman -V | grep -q 'v4.' && ( [[ "$repo" == 'extra' || "$repo" == 'multilib' ]] ); then
 | 
			
		||||
		cp "@pkgdatadir@/pacman-${repo}.conf" "${chroots}/${repo}-${arch}/root/etc/pacman.conf"
 | 
			
		||||
	fi
 | 
			
		||||
else
 | 
			
		||||
	setarch ${arch} mkarchroot \
 | 
			
		||||
		-u \
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										29
									
								
								commitpkg.in
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								commitpkg.in
									
									
									
									
									
								
							@@ -3,13 +3,19 @@
 | 
			
		||||
m4_include(lib/common.sh)
 | 
			
		||||
 | 
			
		||||
getpkgfile() {
 | 
			
		||||
	if [[ ${#} -ne 1 ]]; then
 | 
			
		||||
		die 'No canonical package found!'
 | 
			
		||||
	elif [[ ! -f $1 ]]; then
 | 
			
		||||
		die "Package ${1} not found!"
 | 
			
		||||
	fi
 | 
			
		||||
	case $# in
 | 
			
		||||
		0)
 | 
			
		||||
			error 'No canonical package found!'
 | 
			
		||||
			return 1
 | 
			
		||||
			;;
 | 
			
		||||
		[!1])
 | 
			
		||||
			error 'Failed to canonicalize package name -- multiple packages found:'
 | 
			
		||||
			msg2 '%s' "$@"
 | 
			
		||||
			return 1
 | 
			
		||||
			;;
 | 
			
		||||
	esac
 | 
			
		||||
 | 
			
		||||
	echo ${1}
 | 
			
		||||
	echo "$1"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Source makepkg.conf; fail if it is not found
 | 
			
		||||
@@ -127,15 +133,10 @@ for _arch in ${arch[@]}; do
 | 
			
		||||
 | 
			
		||||
	for _pkgname in ${pkgname[@]}; do
 | 
			
		||||
		fullver=$(get_full_version $_pkgname)
 | 
			
		||||
		pkgfile=$(getpkgfile "$_pkgname-$fullver-${_arch}".pkg.tar.?z 2>/dev/null)
 | 
			
		||||
		pkgdestfile=$(getpkgfile "$PKGDEST/$_pkgname-$fullver-${_arch}".pkg.tar.?z 2>/dev/null)
 | 
			
		||||
 | 
			
		||||
		if [[ -f $pkgfile ]]; then
 | 
			
		||||
			pkgfile="./$pkgfile"
 | 
			
		||||
		elif [[ -f $pkgdestfile ]]; then
 | 
			
		||||
			pkgfile="$pkgdestfile"
 | 
			
		||||
		else
 | 
			
		||||
			warning "Could not find ${pkgfile}. Skipping ${_arch}"
 | 
			
		||||
		if ! pkgfile=$(shopt -s nullglob;
 | 
			
		||||
				getpkgfile "${DESTDIR+$DESTDIR/}$_pkgname-$fullver-${_arch}".pkg.tar.?z); then
 | 
			
		||||
			warning "Skipping $_pkgname-$fullver-$_arch: failed to locate package file"
 | 
			
		||||
			skip_arches+=($_arch)
 | 
			
		||||
			continue 2
 | 
			
		||||
		fi
 | 
			
		||||
 
 | 
			
		||||
@@ -73,7 +73,7 @@ find . -type f $find_args | while read filename; do
 | 
			
		||||
	if [[ $script_mode = "provides" ]]; then
 | 
			
		||||
		# get the string binaries link to: libfoo.so.1.2 -> libfoo.so.1
 | 
			
		||||
		sofile=$(LC_ALL=C readelf -d "$filename" 2>/dev/null | sed -n 's/.*Library soname: \[\(.*\)\].*/\1/p')
 | 
			
		||||
		[[ -z $sofile" ]] && sofile="${filename##*/}"
 | 
			
		||||
		[[ -z $sofile ]] && sofile="${filename##*/}"
 | 
			
		||||
		process_sofile
 | 
			
		||||
	elif [[ $script_mode = "deps" ]]; then
 | 
			
		||||
		# process all libraries needed by the binary
 | 
			
		||||
 
 | 
			
		||||
@@ -20,6 +20,7 @@ install_pkg=
 | 
			
		||||
add_to_db=false
 | 
			
		||||
run_namcap=false
 | 
			
		||||
chrootdir=
 | 
			
		||||
passeddir=
 | 
			
		||||
 | 
			
		||||
default_copy=$USER
 | 
			
		||||
[[ -n $SUDO_USER ]] && default_copy=$SUDO_USER
 | 
			
		||||
@@ -52,8 +53,8 @@ usage() {
 | 
			
		||||
	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 '-n         Run namcap on the package'
 | 
			
		||||
	echo "           Default: $default_copy"
 | 
			
		||||
	echo '-n         Run namcap on the package'
 | 
			
		||||
	exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -63,7 +64,7 @@ while getopts 'hcudr:I:l:n' arg; do
 | 
			
		||||
		c) clean_first=true ;;
 | 
			
		||||
		u) update_first=true ;;
 | 
			
		||||
		d) add_to_db=true ;;
 | 
			
		||||
		r) chrootdir="$OPTARG" ;;
 | 
			
		||||
		r) passeddir="$OPTARG" ;;
 | 
			
		||||
		I) install_pkg="$OPTARG" ;;
 | 
			
		||||
		l) copy="$OPTARG" ;;
 | 
			
		||||
		n) run_namcap=true ;;
 | 
			
		||||
@@ -72,7 +73,7 @@ while getopts 'hcudr:I:l:n' arg; do
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
# Canonicalize chrootdir, getting rid of trailing /
 | 
			
		||||
chrootdir=$(readlink -e "$chrootdir")
 | 
			
		||||
chrootdir=$(readlink -e "$passeddir")
 | 
			
		||||
 | 
			
		||||
if [[ ${copy:0:1} = / ]]; then
 | 
			
		||||
	copydir=$copy
 | 
			
		||||
@@ -101,7 +102,7 @@ if [[ ! -f PKGBUILD && -z $install_pkg ]]; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ ! -d $chrootdir ]]; then
 | 
			
		||||
	die "No chroot dir defined, or invalid path '$chrootdir'"
 | 
			
		||||
	die "No chroot dir defined, or invalid path '$passeddir'"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ ! -d $chrootdir/root ]]; then
 | 
			
		||||
 
 | 
			
		||||
@@ -47,8 +47,8 @@ Architecture = auto
 | 
			
		||||
# the following line. This will treat any key imported into pacman's keyring as
 | 
			
		||||
# trusted.
 | 
			
		||||
#SigLevel = Optional TrustAll
 | 
			
		||||
# Disable signature checks for now
 | 
			
		||||
#SigLevel = Never
 | 
			
		||||
# For now, off by default unless you read the above.
 | 
			
		||||
SigLevel = Never
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# REPOSITORIES
 | 
			
		||||
 
 | 
			
		||||
@@ -47,7 +47,7 @@ Architecture = auto
 | 
			
		||||
# the following line. This will treat any key imported into pacman's keyring as
 | 
			
		||||
# trusted.
 | 
			
		||||
#SigLevel = Optional TrustAll
 | 
			
		||||
# Disable signature checks for now
 | 
			
		||||
# For now, off by default unless you read the above.
 | 
			
		||||
SigLevel = Never
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
 
 | 
			
		||||
@@ -47,7 +47,7 @@ Architecture = auto
 | 
			
		||||
# the following line. This will treat any key imported into pacman's keyring as
 | 
			
		||||
# trusted.
 | 
			
		||||
#SigLevel = Optional TrustAll
 | 
			
		||||
# Disable signature checks for now
 | 
			
		||||
# For now, off by default unless you read the above.
 | 
			
		||||
SigLevel = Never
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
 
 | 
			
		||||
@@ -47,7 +47,7 @@ Architecture = auto
 | 
			
		||||
# the following line. This will treat any key imported into pacman's keyring as
 | 
			
		||||
# trusted.
 | 
			
		||||
#SigLevel = Optional TrustAll
 | 
			
		||||
# Disable signature checks for now
 | 
			
		||||
# For now, off by default unless you read the above.
 | 
			
		||||
SigLevel = Never
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
 
 | 
			
		||||
@@ -47,7 +47,7 @@ Architecture = auto
 | 
			
		||||
# the following line. This will treat any key imported into pacman's keyring as
 | 
			
		||||
# trusted.
 | 
			
		||||
#SigLevel = Optional TrustAll
 | 
			
		||||
# Disable signature checks for now
 | 
			
		||||
# For now, off by default unless you read the above.
 | 
			
		||||
SigLevel = Never
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
 
 | 
			
		||||
@@ -47,8 +47,8 @@ Architecture = auto
 | 
			
		||||
# the following line. This will treat any key imported into pacman's keyring as
 | 
			
		||||
# trusted.
 | 
			
		||||
#SigLevel = Optional TrustAll
 | 
			
		||||
# Disable signature checks for now
 | 
			
		||||
#SigLevel = Never
 | 
			
		||||
# For now, off by default unless you read the above.
 | 
			
		||||
SigLevel = Never
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# REPOSITORIES
 | 
			
		||||
 
 | 
			
		||||
@@ -47,7 +47,7 @@ Architecture = auto
 | 
			
		||||
# the following line. This will treat any key imported into pacman's keyring as
 | 
			
		||||
# trusted.
 | 
			
		||||
#SigLevel = Optional TrustAll
 | 
			
		||||
# Disable signature checks for now
 | 
			
		||||
# For now, off by default unless you read the above.
 | 
			
		||||
SigLevel = Never
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
 
 | 
			
		||||
@@ -47,7 +47,7 @@ Architecture = auto
 | 
			
		||||
# the following line. This will treat any key imported into pacman's keyring as
 | 
			
		||||
# trusted.
 | 
			
		||||
#SigLevel = Optional TrustAll
 | 
			
		||||
# Disable signature checks for now
 | 
			
		||||
# For now, off by default unless you read the above.
 | 
			
		||||
SigLevel = Never
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user