mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 18:06:19 +02:00
Compare commits
33 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
14ba11dcdf | ||
![]() |
be5505a54a | ||
![]() |
d09d34d77a | ||
![]() |
5815d639f3 | ||
![]() |
f804be7bbb | ||
![]() |
397f4cb04b | ||
![]() |
f98eaebd1b | ||
![]() |
7a369b3c35 | ||
![]() |
a17eaf3be8 | ||
![]() |
962d84c708 | ||
![]() |
e06a4a7243 | ||
![]() |
d6792db31c | ||
![]() |
372fb4e7d1 | ||
![]() |
25133fcd17 | ||
![]() |
e3d2f1a020 | ||
![]() |
8440133032 | ||
![]() |
0adf83fadf | ||
![]() |
ecc3fcf86d | ||
![]() |
394d9c8b54 | ||
![]() |
7a3550c903 | ||
![]() |
c290215aa6 | ||
![]() |
32b55d1587 | ||
![]() |
6201853f52 | ||
![]() |
fbc3929ec0 | ||
![]() |
8cb3bcc17b | ||
![]() |
db7a90ccd2 | ||
![]() |
a9bfd8d2c9 | ||
![]() |
0d0e1a9079 | ||
![]() |
b9ea05789d | ||
![]() |
79ac757e7f | ||
![]() |
a4eabcceaa | ||
![]() |
b591e69541 | ||
![]() |
2f18ca1836 |
16
Makefile
16
Makefile
@@ -1,4 +1,4 @@
|
|||||||
V=0.9.9
|
V=0.9.16
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
||||||
@@ -13,6 +13,9 @@ install:
|
|||||||
ln -sf commitpkg $(DESTDIR)/usr/bin/stagingpkg
|
ln -sf commitpkg $(DESTDIR)/usr/bin/stagingpkg
|
||||||
ln -sf commitpkg $(DESTDIR)/usr/bin/communitypkg
|
ln -sf commitpkg $(DESTDIR)/usr/bin/communitypkg
|
||||||
ln -sf commitpkg $(DESTDIR)/usr/bin/community-testingpkg
|
ln -sf commitpkg $(DESTDIR)/usr/bin/community-testingpkg
|
||||||
|
ln -sf commitpkg $(DESTDIR)/usr/bin/community-stagingpkg
|
||||||
|
ln -sf commitpkg $(DESTDIR)/usr/bin/multilibpkg
|
||||||
|
ln -sf commitpkg $(DESTDIR)/usr/bin/multilib-testingpkg
|
||||||
# arch{co,release,rm}
|
# arch{co,release,rm}
|
||||||
install -m 755 archco $(DESTDIR)/usr/bin
|
install -m 755 archco $(DESTDIR)/usr/bin
|
||||||
install -m 755 communityco $(DESTDIR)/usr/bin
|
install -m 755 communityco $(DESTDIR)/usr/bin
|
||||||
@@ -29,6 +32,8 @@ install:
|
|||||||
ln -sf archbuild $(DESTDIR)/usr/bin/testing-x86_64-build
|
ln -sf archbuild $(DESTDIR)/usr/bin/testing-x86_64-build
|
||||||
ln -sf archbuild $(DESTDIR)/usr/bin/staging-i686-build
|
ln -sf archbuild $(DESTDIR)/usr/bin/staging-i686-build
|
||||||
ln -sf archbuild $(DESTDIR)/usr/bin/staging-x86_64-build
|
ln -sf archbuild $(DESTDIR)/usr/bin/staging-x86_64-build
|
||||||
|
ln -sf archbuild $(DESTDIR)/usr/bin/multilib-build
|
||||||
|
ln -sf archbuild $(DESTDIR)/usr/bin/multilib-testing-build
|
||||||
# Additional packaging helper scripts
|
# Additional packaging helper scripts
|
||||||
install -m 755 lddd $(DESTDIR)/usr/bin
|
install -m 755 lddd $(DESTDIR)/usr/bin
|
||||||
install -m 755 finddeps $(DESTDIR)/usr/bin
|
install -m 755 finddeps $(DESTDIR)/usr/bin
|
||||||
@@ -40,6 +45,8 @@ install:
|
|||||||
install -m 644 pacman-extra.conf $(DESTDIR)/usr/share/devtools
|
install -m 644 pacman-extra.conf $(DESTDIR)/usr/share/devtools
|
||||||
install -m 644 pacman-testing.conf $(DESTDIR)/usr/share/devtools
|
install -m 644 pacman-testing.conf $(DESTDIR)/usr/share/devtools
|
||||||
install -m 644 pacman-staging.conf $(DESTDIR)/usr/share/devtools
|
install -m 644 pacman-staging.conf $(DESTDIR)/usr/share/devtools
|
||||||
|
install -m 644 pacman-multilib.conf $(DESTDIR)/usr/share/devtools
|
||||||
|
install -m 644 pacman-multilib-testing.conf $(DESTDIR)/usr/share/devtools
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
# remove all files we installed
|
# remove all files we installed
|
||||||
@@ -51,6 +58,9 @@ uninstall:
|
|||||||
rm $(DESTDIR)/usr/bin/stagingpkg
|
rm $(DESTDIR)/usr/bin/stagingpkg
|
||||||
rm $(DESTDIR)/usr/bin/communitypkg
|
rm $(DESTDIR)/usr/bin/communitypkg
|
||||||
rm $(DESTDIR)/usr/bin/community-testingpkg
|
rm $(DESTDIR)/usr/bin/community-testingpkg
|
||||||
|
rm $(DESTDIR)/usr/bin/community-stagingpkg
|
||||||
|
rm $(DESTDIR)/usr/bin/multilibpkg
|
||||||
|
rm $(DESTDIR)/usr/bin/multilib-testingpkg
|
||||||
rm $(DESTDIR)/usr/sbin/mkarchroot
|
rm $(DESTDIR)/usr/sbin/mkarchroot
|
||||||
rm $(DESTDIR)/usr/sbin/makechrootpkg
|
rm $(DESTDIR)/usr/sbin/makechrootpkg
|
||||||
rm $(DESTDIR)/usr/bin/extra-i686-build
|
rm $(DESTDIR)/usr/bin/extra-i686-build
|
||||||
@@ -59,6 +69,8 @@ uninstall:
|
|||||||
rm $(DESTDIR)/usr/bin/testing-x86_64-build
|
rm $(DESTDIR)/usr/bin/testing-x86_64-build
|
||||||
rm $(DESTDIR)/usr/bin/staging-i686-build
|
rm $(DESTDIR)/usr/bin/staging-i686-build
|
||||||
rm $(DESTDIR)/usr/bin/staging-x86_64-build
|
rm $(DESTDIR)/usr/bin/staging-x86_64-build
|
||||||
|
rm $(DESTDIR)/usr/bin/multilib-build
|
||||||
|
rm $(DESTDIR)/usr/bin/multilib-testing-build
|
||||||
rm $(DESTDIR)/usr/bin/lddd
|
rm $(DESTDIR)/usr/bin/lddd
|
||||||
rm $(DESTDIR)/usr/bin/finddeps
|
rm $(DESTDIR)/usr/bin/finddeps
|
||||||
rm $(DESTDIR)/usr/bin/archco
|
rm $(DESTDIR)/usr/bin/archco
|
||||||
@@ -71,6 +83,8 @@ uninstall:
|
|||||||
rm $(DESTDIR)/usr/share/devtools/pacman-extra.conf
|
rm $(DESTDIR)/usr/share/devtools/pacman-extra.conf
|
||||||
rm $(DESTDIR)/usr/share/devtools/pacman-testing.conf
|
rm $(DESTDIR)/usr/share/devtools/pacman-testing.conf
|
||||||
rm $(DESTDIR)/usr/share/devtools/pacman-staging.conf
|
rm $(DESTDIR)/usr/share/devtools/pacman-staging.conf
|
||||||
|
rm $(DESTDIR)/usr/share/devtools/pacman-multilib.conf
|
||||||
|
rm $(DESTDIR)/usr/share/devtools/pacman-multilib-testing.conf
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
git archive --format=tar --prefix=devtools-$(V)/ $(V) | gzip -9 > devtools-$(V).tar.gz
|
git archive --format=tar --prefix=devtools-$(V)/ $(V) | gzip -9 > devtools-$(V).tar.gz
|
||||||
|
25
archbuild
25
archbuild
@@ -1,8 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
base_packages='base base-devel sudo'
|
||||||
|
|
||||||
cmd="$(basename "${0%-build}")"
|
cmd="$(basename "${0%-build}")"
|
||||||
repo=${cmd%-*}
|
if [ "${cmd%-*}" == 'multilib' ]; then
|
||||||
arch=${cmd#*-}
|
repo="${cmd}"
|
||||||
|
arch='x86_64'
|
||||||
|
base_packages+=' gcc-multilib libtool-multilib'
|
||||||
|
else
|
||||||
|
repo=${cmd%-*}
|
||||||
|
arch=${cmd##*-}
|
||||||
|
fi
|
||||||
chroots='/var/tmp/archbuild'
|
chroots='/var/tmp/archbuild'
|
||||||
clean_first=false
|
clean_first=false
|
||||||
|
|
||||||
@@ -21,11 +29,6 @@ while getopts 'cr:' arg; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$(uname -m)" == 'i686' -a "${arch}" != 'i686' ]; then
|
|
||||||
echo 'You can only build i686 packages on this system'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ${clean_first} || [ ! -d "${chroots}/${repo}-${arch}" ]; then
|
if ${clean_first} || [ ! -d "${chroots}/${repo}-${arch}" ]; then
|
||||||
echo "Creating chroot for [${repo}] (${arch})..."
|
echo "Creating chroot for [${repo}] (${arch})..."
|
||||||
sudo rm -rf ${chroots}/${repo}-${arch}
|
sudo rm -rf ${chroots}/${repo}-${arch}
|
||||||
@@ -34,8 +37,12 @@ if ${clean_first} || [ ! -d "${chroots}/${repo}-${arch}" ]; then
|
|||||||
-C /usr/share/devtools/pacman-${repo}.conf \
|
-C /usr/share/devtools/pacman-${repo}.conf \
|
||||||
-M /usr/share/devtools/makepkg-${arch}.conf \
|
-M /usr/share/devtools/makepkg-${arch}.conf \
|
||||||
${chroots}/${repo}-${arch}/root \
|
${chroots}/${repo}-${arch}/root \
|
||||||
base base-devel sudo
|
${base_packages}
|
||||||
|
else
|
||||||
|
setarch ${arch} sudo mkarchroot \
|
||||||
|
-u \
|
||||||
|
${chroots}/${repo}-${arch}/root
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Building in chroot for [${repo}] (${arch})..."
|
echo "Building in chroot for [${repo}] (${arch})..."
|
||||||
setarch ${arch} sudo makechrootpkg -c -u -r ${chroots}/${repo}-${arch}
|
setarch ${arch} sudo makechrootpkg -c -r ${chroots}/${repo}-${arch}
|
||||||
|
@@ -13,7 +13,9 @@ if [ ! -f PKGBUILD ]; then
|
|||||||
abort 'archrelease: PKGBUILD not found'
|
abort 'archrelease: PKGBUILD not found'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(basename $(readlink -f .))" != 'trunk' ]; then
|
trunk=$(basename $(pwd))
|
||||||
|
|
||||||
|
if [ "$(basename $(dirname $(pwd)))" == "repos" ]; then
|
||||||
abort 'archrelease: Not in a package trunk dir'
|
abort 'archrelease: Not in a package trunk dir'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -27,7 +29,7 @@ if [ -d "repos/${1}" ]; then
|
|||||||
svn rm --force -q "repos/${1}"
|
svn rm --force -q "repos/${1}"
|
||||||
svn commit -q -m "archrelease: remove ${1}" || abort
|
svn commit -q -m "archrelease: remove ${1}" || abort
|
||||||
fi
|
fi
|
||||||
svn copy -q -r HEAD trunk "repos/${1}"
|
svn copy -q -r HEAD "${trunk}" "repos/${1}"
|
||||||
svn commit -q -m "archrelease: copy trunk to ${1}" || abort
|
svn commit -q -m "archrelease: copy ${trunk} to ${1}" || abort
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
echo 'done'
|
echo 'done'
|
||||||
|
8
checkpkg
8
checkpkg
@@ -80,13 +80,13 @@ for _pkgname in ${pkgname[@]}; do
|
|||||||
sort -o filelist-$_pkgname filelist-$_pkgname
|
sort -o filelist-$_pkgname filelist-$_pkgname
|
||||||
sort -o filelist-$_pkgname-old filelist-$_pkgname-old
|
sort -o filelist-$_pkgname-old filelist-$_pkgname-old
|
||||||
|
|
||||||
diff filelist-$_pkgname-old filelist-$_pkgname
|
diff -u filelist-$_pkgname-old filelist-$_pkgname
|
||||||
|
|
||||||
if diff filelist-$_pkgname-old filelist-$_pkgname | grep '\.so\.' > /dev/null 2>&1; then
|
if diff filelist-$_pkgname-old filelist-$_pkgname | grep '\.so' > /dev/null 2>&1; then
|
||||||
mkdir -p pkg
|
mkdir -p pkg
|
||||||
cd pkg
|
cd pkg
|
||||||
bsdtar xf "$pkgfile" > /dev/null
|
bsdtar xf ../"$pkgfile" > /dev/null
|
||||||
for i in `diff ../filelist-$_pkgname-old ../filelist-$_pkgname | grep \> | grep \.so\. | awk '{print $2}'`; do
|
for i in `diff ../filelist-$_pkgname-old ../filelist-$_pkgname | grep \> | grep \.so | awk '{print $2}'`; do
|
||||||
echo -n "${i}: "
|
echo -n "${i}: "
|
||||||
objdump -p $i | grep SONAME
|
objdump -p $i | grep SONAME
|
||||||
done
|
done
|
||||||
|
11
commitpkg
11
commitpkg
@@ -54,6 +54,15 @@ elif [ "$cmd" == 'communitypkg' ]; then
|
|||||||
elif [ "$cmd" == 'community-testingpkg' ]; then
|
elif [ "$cmd" == 'community-testingpkg' ]; then
|
||||||
repo='community-testing'
|
repo='community-testing'
|
||||||
server='aur.archlinux.org'
|
server='aur.archlinux.org'
|
||||||
|
elif [ "$cmd" == 'community-stagingpkg' ]; then
|
||||||
|
repo='community-staging'
|
||||||
|
server='aur.archlinux.org'
|
||||||
|
elif [ "$cmd" == 'multilibpkg' ]; then
|
||||||
|
repo='multilib'
|
||||||
|
server='aur.archlinux.org'
|
||||||
|
elif [ "$cmd" == 'multilib-testingpkg' ]; then
|
||||||
|
repo='multilib-testing'
|
||||||
|
server='aur.archlinux.org'
|
||||||
else
|
else
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
abort 'usage: commitpkg <reponame> [-l limit] [commit message]'
|
abort 'usage: commitpkg <reponame> [-l limit] [commit message]'
|
||||||
@@ -110,7 +119,7 @@ for _arch in ${arch[@]}; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n 'uploading '
|
echo -n 'uploading '
|
||||||
rsync -p --chmod 'ug=rw,o=r' -c -h -L --progress $rsyncopts --partial "${pkgfile}" -e ssh $server:staging/$repo || abort
|
rsync -p --chmod 'ug=rw,o=r' -c -h -L --progress $rsyncopts --partial "${pkgfile}" -e ssh "$server:staging/$repo/${pkgfile##*/}" || abort
|
||||||
done
|
done
|
||||||
archrelease $repo-${_arch} || abort
|
archrelease $repo-${_arch} || abort
|
||||||
done
|
done
|
||||||
|
@@ -87,7 +87,7 @@ if [ "$EUID" != '0' ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f PKGBUILD ]; then
|
if [ ! -f PKGBUILD -a -z "$install_pkg" ]; then
|
||||||
echo 'This must be run in a directory containing a PKGBUILD.'
|
echo 'This must be run in a directory containing a PKGBUILD.'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -196,11 +196,8 @@ chown -R nobody "$copydir/build"
|
|||||||
chown -R nobody "$copydir/srcdest"
|
chown -R nobody "$copydir/srcdest"
|
||||||
chown -R nobody "$copydir/pkgdest"
|
chown -R nobody "$copydir/pkgdest"
|
||||||
|
|
||||||
if ! grep "^nobody" "$copydir/etc/sudoers" >/dev/null 2>&1; then
|
echo 'nobody ALL = NOPASSWD: /usr/bin/pacman' > "$copydir/etc/sudoers.d/nobody-pacman"
|
||||||
touch "$copydir/etc/sudoers"
|
chmod 440 "$copydir/etc/sudoers.d/nobody-pacman"
|
||||||
echo 'nobody ALL=(ALL) NOPASSWD: ALL' >> "$copydir/etc/sudoers"
|
|
||||||
chmod 440 "$copydir/etc/sudoers"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#This is a little gross, but this way the script is recreated every time in the
|
#This is a little gross, but this way the script is recreated every time in the
|
||||||
#working copy
|
#working copy
|
||||||
@@ -256,6 +253,4 @@ if [ -e "${copydir}/build/BUILD_FAILED" ]; then
|
|||||||
echo "Build failed, check $copydir/build"
|
echo "Build failed, check $copydir/build"
|
||||||
rm "${copydir}/build/BUILD_FAILED"
|
rm "${copydir}/build/BUILD_FAILED"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
|
||||||
rm -rf "${copydir}"/build/*
|
|
||||||
fi
|
fi
|
||||||
|
38
mkarchroot
38
mkarchroot
@@ -34,7 +34,7 @@ usage() {
|
|||||||
while getopts 'r:ufnhC:M:c:' arg; do
|
while getopts 'r:ufnhC:M:c:' arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
r) RUN="$OPTARG" ;;
|
r) RUN="$OPTARG" ;;
|
||||||
u) RUN='pacman -Syu --noconfirm' ;;
|
u) RUN='/bin/sh -c "pacman -Syu --noconfirm; pacman -Qqu >/dev/null && pacman -Su --noconfirm"' ;;
|
||||||
f) FORCE='y' ;;
|
f) FORCE='y' ;;
|
||||||
C) pac_conf="$OPTARG" ;;
|
C) pac_conf="$OPTARG" ;;
|
||||||
M) makepkg_conf="$OPTARG" ;;
|
M) makepkg_conf="$OPTARG" ;;
|
||||||
@@ -73,13 +73,13 @@ if [ -z "$cache_dir" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /etc/pacman.d/mirrorlist ]; then
|
if [ -f /etc/pacman.d/mirrorlist ]; then
|
||||||
host_mirror=$(grep -v '^#' -m1 /etc/pacman.d/mirrorlist | sed -E 's#/os/(i686|x86_64)#/os/\$arch#g')
|
host_mirror=$(pacman -Sdp extra/devtools 2>/dev/null | sed -E 's#(.*/)extra/os/.*#\1$repo/os/$arch#')
|
||||||
fi
|
fi
|
||||||
if [ -z "${host_mirror}" ]; then
|
if [ -z "${host_mirror}" ]; then
|
||||||
host_mirror='Server = http://mirrors.kernel.org/archlinux/$repo/os/$arch'
|
host_mirror='http://mirrors.kernel.org/archlinux/$repo/os/$arch'
|
||||||
fi
|
fi
|
||||||
if echo "${host_mirror}" | grep -q 'file://'; then
|
if echo "${host_mirror}" | grep -q 'file://'; then
|
||||||
host_mirror_path=$(echo "${host_mirror}" | sed -E 's#Server\s=\sfile://(/.*)/\$repo/os/(\$arch|i686|x86_64)#\1#g')
|
host_mirror_path=$(echo "${host_mirror}" | sed -E 's#file://(/.*)/\$repo/os/\$arch#\1#g')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# {{{ functions
|
# {{{ functions
|
||||||
@@ -92,13 +92,27 @@ chroot_mount() {
|
|||||||
mount -t proc proc "${working_dir}/proc"
|
mount -t proc proc "${working_dir}/proc"
|
||||||
|
|
||||||
[ -e "${working_dir}/dev" ] || mkdir "${working_dir}/dev"
|
[ -e "${working_dir}/dev" ] || mkdir "${working_dir}/dev"
|
||||||
mount -o bind /dev "${working_dir}/dev"
|
mount -t tmpfs dev "${working_dir}/dev" -o mode=0755,size=10M,nosuid
|
||||||
|
mknod -m 666 "${working_dir}/dev/null" c 1 3
|
||||||
|
mknod -m 666 "${working_dir}/dev/zero" c 1 5
|
||||||
|
mknod -m 600 "${working_dir}/dev/console" c 5 1
|
||||||
|
mknod -m 644 "${working_dir}/dev/random" c 1 8
|
||||||
|
mknod -m 644 "${working_dir}/dev/urandom" c 1 9
|
||||||
|
mknod -m 666 "${working_dir}/dev/tty" c 5 0
|
||||||
|
mknod -m 666 "${working_dir}/dev/tty0" c 4 0
|
||||||
|
mknod -m 666 "${working_dir}/dev/full" c 1 7
|
||||||
|
ln -s /proc/kcore "${working_dir}/dev/core"
|
||||||
|
ln -s /proc/self/fd "${working_dir}/dev/fd"
|
||||||
|
ln -s /proc/self/fd/0 "${working_dir}/dev/stdin"
|
||||||
|
ln -s /proc/self/fd/1 "${working_dir}/dev/stdout"
|
||||||
|
ln -s /proc/self/fd/2 "${working_dir}/dev/stderr"
|
||||||
|
|
||||||
[ -e "${working_dir}/dev/shm" ] || mkdir "${working_dir}/dev/shm"
|
[ -e "${working_dir}/dev/shm" ] || mkdir "${working_dir}/dev/shm"
|
||||||
mount -t tmpfs shm "${working_dir}/dev/shm"
|
mount -t tmpfs shm "${working_dir}/dev/shm" -o nodev,nosuid,size=128M
|
||||||
|
|
||||||
[ -e "${working_dir}/dev/pts" ] || mkdir "${working_dir}/dev/pts"
|
[ -e "${working_dir}/dev/pts" ] || mkdir "${working_dir}/dev/pts"
|
||||||
mount -t devpts devpts "${working_dir}/dev/pts"
|
mount -t devpts devpts "${working_dir}/dev/pts" -o newinstance,ptmxmode=666
|
||||||
|
ln -s pts/ptmx "${working_dir}/dev/ptmx"
|
||||||
|
|
||||||
[ -e "${cache_dir}" ] || mkdir -p "${cache_dir}"
|
[ -e "${cache_dir}" ] || mkdir -p "${cache_dir}"
|
||||||
[ -e "${working_dir}/${cache_dir}" ] || mkdir -p "${working_dir}/${cache_dir}"
|
[ -e "${working_dir}/${cache_dir}" ] || mkdir -p "${working_dir}/${cache_dir}"
|
||||||
@@ -110,13 +124,13 @@ chroot_mount() {
|
|||||||
mount -o remount,ro,bind "${host_mirror_path}" "${working_dir}/${host_mirror_path}"
|
mount -o remount,ro,bind "${host_mirror_path}" "${working_dir}/${host_mirror_path}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap 'chroot_umount' 0 1 2 15
|
trap 'chroot_umount' EXIT INT QUIT TERM HUP
|
||||||
}
|
}
|
||||||
|
|
||||||
copy_hostconf () {
|
copy_hostconf () {
|
||||||
cp /etc/mtab "${working_dir}/etc/mtab"
|
chroot "${working_dir}" /bin/findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS > "${working_dir}/etc/mtab"
|
||||||
cp /etc/resolv.conf "${working_dir}/etc/resolv.conf"
|
cp /etc/resolv.conf "${working_dir}/etc/resolv.conf"
|
||||||
echo "${host_mirror}" > ${working_dir}/etc/pacman.d/mirrorlist
|
echo "Server = ${host_mirror}" > ${working_dir}/etc/pacman.d/mirrorlist
|
||||||
}
|
}
|
||||||
|
|
||||||
chroot_umount () {
|
chroot_umount () {
|
||||||
@@ -143,7 +157,7 @@ if [ "$RUN" != "" ]; then
|
|||||||
chroot_mount
|
chroot_mount
|
||||||
copy_hostconf
|
copy_hostconf
|
||||||
|
|
||||||
chroot "${working_dir}" ${RUN}
|
eval chroot "${working_dir}" ${RUN}
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
else
|
else
|
||||||
@@ -153,7 +167,7 @@ if [ "$RUN" != "" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "${working_dir}/var/lib/pacman/"
|
mkdir -p "${working_dir}/var/lib/pacman/sync"
|
||||||
mkdir -p "${working_dir}/etc/"
|
mkdir -p "${working_dir}/etc/"
|
||||||
|
|
||||||
chroot_mount
|
chroot_mount
|
||||||
|
@@ -58,23 +58,18 @@ Architecture = auto
|
|||||||
# after the header, and they will be used before the default mirrors.
|
# after the header, and they will be used before the default mirrors.
|
||||||
|
|
||||||
#[testing]
|
#[testing]
|
||||||
## Add your preferred servers here, they will be used first
|
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
# Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
# Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
#[community-testing]
|
#[community-testing]
|
||||||
## Add your preferred servers here, they will be used first
|
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[community]
|
[community]
|
||||||
# Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
|
87
pacman-multilib-testing.conf
Normal file
87
pacman-multilib-testing.conf
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
#
|
||||||
|
# /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
|
||||||
|
HoldPkg = pacman glibc
|
||||||
|
# If upgrades are available for these packages they will be asked for first
|
||||||
|
SyncFirst = pacman
|
||||||
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
|
#XferCommand = /usr/bin/curl -C - %u > %o
|
||||||
|
#CleanMethod = KeepInstalled
|
||||||
|
Architecture = auto
|
||||||
|
|
||||||
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||||
|
#IgnorePkg =
|
||||||
|
#IgnoreGroup =
|
||||||
|
|
||||||
|
#NoUpgrade =
|
||||||
|
#NoExtract =
|
||||||
|
|
||||||
|
# Misc options (all disabled by default)
|
||||||
|
#UseSyslog
|
||||||
|
#ShowSize
|
||||||
|
#UseDelta
|
||||||
|
#TotalDownload
|
||||||
|
|
||||||
|
#
|
||||||
|
# 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]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[core]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[extra]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community-testing]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
# If you want to run 32 bit applications on your x86_64 system,
|
||||||
|
# enable the multilib repository here.
|
||||||
|
[multilib-testing]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[multilib]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
|
# tips on creating your own repositories.
|
||||||
|
#[custom]
|
||||||
|
#Server = file:///home/custompkgs
|
||||||
|
|
84
pacman-multilib.conf
Normal file
84
pacman-multilib.conf
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
#
|
||||||
|
# /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
|
||||||
|
HoldPkg = pacman glibc
|
||||||
|
# If upgrades are available for these packages they will be asked for first
|
||||||
|
SyncFirst = pacman
|
||||||
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
|
#XferCommand = /usr/bin/curl -C - %u > %o
|
||||||
|
#CleanMethod = KeepInstalled
|
||||||
|
Architecture = auto
|
||||||
|
|
||||||
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||||
|
#IgnorePkg =
|
||||||
|
#IgnoreGroup =
|
||||||
|
|
||||||
|
#NoUpgrade =
|
||||||
|
#NoExtract =
|
||||||
|
|
||||||
|
# Misc options (all disabled by default)
|
||||||
|
#UseSyslog
|
||||||
|
#ShowSize
|
||||||
|
#UseDelta
|
||||||
|
#TotalDownload
|
||||||
|
|
||||||
|
#
|
||||||
|
# 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]
|
||||||
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[core]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[extra]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
#[community-testing]
|
||||||
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
# If you want to run 32 bit applications on your x86_64 system,
|
||||||
|
# enable the multilib repository here.
|
||||||
|
[multilib]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
|
# tips on creating your own repositories.
|
||||||
|
#[custom]
|
||||||
|
#Server = file:///home/custompkgs
|
||||||
|
|
@@ -58,31 +58,24 @@ Architecture = auto
|
|||||||
# after the header, and they will be used before the default mirrors.
|
# after the header, and they will be used before the default mirrors.
|
||||||
|
|
||||||
[staging]
|
[staging]
|
||||||
## Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[testing]
|
[testing]
|
||||||
## Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
# Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
# Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[community-staging]
|
[community-staging]
|
||||||
## Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[community-testing]
|
[community-testing]
|
||||||
## Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[community]
|
[community]
|
||||||
# Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
|
@@ -58,23 +58,18 @@ Architecture = auto
|
|||||||
# after the header, and they will be used before the default mirrors.
|
# after the header, and they will be used before the default mirrors.
|
||||||
|
|
||||||
[testing]
|
[testing]
|
||||||
## Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
# Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
# Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[community-testing]
|
[community-testing]
|
||||||
## Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[community]
|
[community]
|
||||||
# Add your preferred servers here, they will be used first
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
|
Reference in New Issue
Block a user