forked from artix/artools
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 98ad5abd88 | |||
| 660a7025a7 | |||
| f5daac0d67 | |||
| 2484ea39a4 | |||
| 9b222bdb83 | |||
| a3e6b17c5f | |||
| 21a37f6b00 | |||
| 80416b76d5 |
14
Makefile
14
Makefile
@@ -1,4 +1,4 @@
|
|||||||
VERSION=0.18
|
VERSION=0.19
|
||||||
|
|
||||||
CHROOT_VERSION=0.10
|
CHROOT_VERSION=0.10
|
||||||
|
|
||||||
@@ -116,6 +116,11 @@ ISO_LIBS = \
|
|||||||
|
|
||||||
ISO_UTIL = lib/util-iso.sh
|
ISO_UTIL = lib/util-iso.sh
|
||||||
|
|
||||||
|
DOCKER_DATA = \
|
||||||
|
data/docker/pacman-docker.conf
|
||||||
|
|
||||||
|
DOCKER_ALPM = \
|
||||||
|
data/docker/package-cleanup.hook
|
||||||
|
|
||||||
DIRMODE = -dm0755
|
DIRMODE = -dm0755
|
||||||
FILEMODE = -m0644
|
FILEMODE = -m0644
|
||||||
@@ -154,6 +159,13 @@ $(BIN): %: %.in Makefile
|
|||||||
clean:
|
clean:
|
||||||
$(RM) $(BIN) $(UTIL)
|
$(RM) $(BIN) $(UTIL)
|
||||||
|
|
||||||
|
install_docker:
|
||||||
|
install $(DIRMODE) $(DESTDIR)$(DATADIR)/$(TOOLS)
|
||||||
|
install $(FILEMODE) $(DOCKER_DATA) $(DESTDIR)$(DATADIR)/$(TOOLS)
|
||||||
|
|
||||||
|
install $(DIRMODE) $(DESTDIR)$(DATADIR)/libalpm/hooks
|
||||||
|
install $(FILEMODE) $(DOCKER_ALPM) $(DESTDIR)$(DATADIR)/libalpm/hooks
|
||||||
|
|
||||||
install_base:
|
install_base:
|
||||||
install $(DIRMODE) $(DESTDIR)$(SYSCONFDIR)/$(TOOLS)
|
install $(DIRMODE) $(DESTDIR)$(SYSCONFDIR)/$(TOOLS)
|
||||||
install $(FILEMODE) $(BASE_CONF) $(DESTDIR)$(SYSCONFDIR)/$(TOOLS)
|
install $(FILEMODE) $(BASE_CONF) $(DESTDIR)$(SYSCONFDIR)/$(TOOLS)
|
||||||
|
|||||||
@@ -113,9 +113,6 @@ show_deps(){
|
|||||||
subrepo_new(){
|
subrepo_new(){
|
||||||
cd ${TREE_DIR_ARTIX}/${GROUP}
|
cd ${TREE_DIR_ARTIX}/${GROUP}
|
||||||
|
|
||||||
msg2 "team: %s" "${TEAM}"
|
|
||||||
msg2 "group: %s" "${GROUP}"
|
|
||||||
|
|
||||||
local org=$(get_pkg_org "${PACKAGE}")
|
local org=$(get_pkg_org "${PACKAGE}")
|
||||||
|
|
||||||
create_repo "${PACKAGE}" "$org"
|
create_repo "${PACKAGE}" "$org"
|
||||||
@@ -139,20 +136,14 @@ from_arch(){
|
|||||||
msg "repo: %s" "$repo"
|
msg "repo: %s" "$repo"
|
||||||
|
|
||||||
local archpath=$srcpath/repos/$repo
|
local archpath=$srcpath/repos/$repo
|
||||||
local artixpath=$(find_pkg ${TREE_DIR_ARTIX} ${PACKAGE})
|
local artixpath=$(find_pkg "${TREE_DIR_ARTIX}" "${PACKAGE}")
|
||||||
|
|
||||||
show_deps "$archpath"
|
show_deps "$archpath"
|
||||||
|
|
||||||
if [[ -f "$artixpath"/.gitrepo ]]; then
|
if [[ -f "$artixpath"/.gitrepo ]]; then
|
||||||
artixpath=$artixpath/trunk
|
artixpath="$artixpath"/trunk
|
||||||
|
|
||||||
if [[ -f $artixpath/PKGBUILD ]];then
|
|
||||||
|
|
||||||
. $artixpath/PKGBUILD 2>/dev/null
|
|
||||||
local artixver=$(get_full_version)
|
|
||||||
|
|
||||||
msg2 "Artix Version: %s" "$artixver"
|
|
||||||
|
|
||||||
|
if [[ -d "$artixpath" ]];then
|
||||||
sync_pkg "$archpath" "$artixpath"
|
sync_pkg "$archpath" "$artixpath"
|
||||||
patch_pkg "$artixpath"
|
patch_pkg "$artixpath"
|
||||||
fi
|
fi
|
||||||
@@ -173,7 +164,7 @@ view_build(){
|
|||||||
check_tree(){
|
check_tree(){
|
||||||
local archpath=$(find_pkg "${TREE_DIR_ARCH}" "${PACKAGE}")
|
local archpath=$(find_pkg "${TREE_DIR_ARCH}" "${PACKAGE}")
|
||||||
[[ -z $archpath ]] && die "Package '%s' does not exist!" "${PACKAGE}"
|
[[ -z $archpath ]] && die "Package '%s' does not exist!" "${PACKAGE}"
|
||||||
local artixpath=$(find_pkg "${TREE_DIR_ARTIX}" ${PACKAGE})
|
local artixpath=$(find_pkg "${TREE_DIR_ARTIX}" "${PACKAGE}")
|
||||||
local group=${artixpath%/*}
|
local group=${artixpath%/*}
|
||||||
msg "group: %s" "${group##*/}"
|
msg "group: %s" "${group##*/}"
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,11 @@ get_path(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
prepare_commit(){
|
prepare_commit(){
|
||||||
local dest="$1"
|
local dest="$1" to_rm="${2:-none}"
|
||||||
|
if [[ -d repos/$to_rm ]]; then
|
||||||
|
git rm -r repos/$to_rm
|
||||||
|
git commit -m "change of package arch"
|
||||||
|
fi
|
||||||
[[ -d repos/$dest ]] && git rm -r repos/$dest
|
[[ -d repos/$dest ]] && git rm -r repos/$dest
|
||||||
[[ ! -d repos ]] && mkdir repos
|
[[ ! -d repos ]] && mkdir repos
|
||||||
[[ ! -d repos/$dest ]] && mkdir repos/$dest
|
[[ ! -d repos/$dest ]] && mkdir repos/$dest
|
||||||
@@ -101,6 +105,15 @@ commit_pkg(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_rm_arch(){
|
||||||
|
local rm_arch='none'
|
||||||
|
case "$CARCH" in
|
||||||
|
'any') rm_arch="${REPO_DEST}-x86_64" ;;
|
||||||
|
'x86_64') rm_arch="${REPO_DEST}-any" ;;
|
||||||
|
esac
|
||||||
|
echo $rm_arch
|
||||||
|
}
|
||||||
|
|
||||||
repo_commit_pkg(){
|
repo_commit_pkg(){
|
||||||
local artixpath=$(find_pkg "${TREE_DIR_ARTIX}" "${PACKAGE}")
|
local artixpath=$(find_pkg "${TREE_DIR_ARTIX}" "${PACKAGE}")
|
||||||
if [[ -n ${artixpath} ]];then
|
if [[ -n ${artixpath} ]];then
|
||||||
@@ -124,7 +137,7 @@ repo_commit_pkg(){
|
|||||||
local action='add'
|
local action='add'
|
||||||
local dest="${REPO_DEST}-$CARCH"
|
local dest="${REPO_DEST}-$CARCH"
|
||||||
|
|
||||||
prepare_commit "$dest"
|
prepare_commit "$dest" "$(get_rm_arch)"
|
||||||
|
|
||||||
cp trunk/* repos/$dest/
|
cp trunk/* repos/$dest/
|
||||||
else
|
else
|
||||||
@@ -132,7 +145,7 @@ repo_commit_pkg(){
|
|||||||
local src="${REPO_SRC}-$CARCH" dest="${REPO_DEST}-$CARCH"
|
local src="${REPO_SRC}-$CARCH" dest="${REPO_DEST}-$CARCH"
|
||||||
|
|
||||||
[[ ! -f repos/$src/PKGBUILD ]] && die "%s does not exist!" "repos/$src/PKGBUILD"
|
[[ ! -f repos/$src/PKGBUILD ]] && die "%s does not exist!" "repos/$src/PKGBUILD"
|
||||||
prepare_commit "$dest"
|
prepare_commit "$dest" "$(get_rm_arch)"
|
||||||
|
|
||||||
cp repos/$src/* repos/$dest/
|
cp repos/$src/* repos/$dest/
|
||||||
git rm -r repos/$src
|
git rm -r repos/$src
|
||||||
|
|||||||
@@ -34,30 +34,29 @@ get_pkgbasename(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
add(){
|
add(){
|
||||||
packages+=("$pkg")
|
packages+=("$pkg.$ext")
|
||||||
if [[ -e "${pkgfile}" ]]; then
|
|
||||||
action='add'
|
action='add'
|
||||||
ln -sf "${pkgfile}"{,.sig} "$repo_path"/
|
ln -sf "${pkgfile}"{,.sig} "$repo_path"/
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
remove(){
|
remove(){
|
||||||
packages+=("$(get_pkgbasename "$pkg")")
|
local to_remove=$(get_pkgbasename "$pkg.$ext")
|
||||||
if [[ -e "$repo_path"/"$pkg" ]]; then
|
packages+=("$to_remove")
|
||||||
action='remove'
|
action='remove'
|
||||||
rm "$repo_path"/"$pkg"
|
rm "$repo_path"/"$to_remove"*pkg.tar*
|
||||||
fi
|
|
||||||
[[ -e "$repo_path"/"$pkg".sig ]] && rm "$repo_path"/"$pkg".sig
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repo_action(){
|
repo_action(){
|
||||||
local packages=() action= func="$1"
|
local packages=() action= func="$1"
|
||||||
for pkg in ${passfiles[@]}; do
|
for pkgname in ${passfiles[@]}; do
|
||||||
if pkgfile=$(find_cached_pkgfile "$pkg");then
|
pkg=${pkgname%.*}
|
||||||
|
for ext in zst xz;do
|
||||||
|
if pkgfile=$(find_cached_pkgfile "$pkg.$ext");then
|
||||||
msg "Found: %s" "${pkgfile}"
|
msg "Found: %s" "${pkgfile}"
|
||||||
"$func"
|
"$func"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
done
|
||||||
cd $repo_path
|
cd $repo_path
|
||||||
if [[ -n "$action" ]]; then
|
if [[ -n "$action" ]]; then
|
||||||
repo-"$action" -R "${dest_repo}"."${PKGDBEXT}" "${packages[@]}"
|
repo-"$action" -R "${dest_repo}"."${PKGDBEXT}" "${packages[@]}"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ sign_pkg(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${BUILDBOT_GPGP}" ]]; then
|
if [[ -n "${BUILDBOT_GPGP}" ]]; then
|
||||||
msg2 "Signing [%s]" "${file_to_sign##*/}"
|
msg "Signing [%s]" "${file_to_sign##*/}"
|
||||||
gpg --batch --passphrase "${BUILDBOT_GPGP}" --detach-sign "$file_to_sign"
|
gpg --batch --passphrase "${BUILDBOT_GPGP}" --detach-sign "$file_to_sign"
|
||||||
else
|
else
|
||||||
msg2 "Signing [%s] with key %s" "${file_to_sign##*/}" "${GPGKEY}..."
|
msg2 "Signing [%s] with key %s" "${file_to_sign##*/}" "${GPGKEY}..."
|
||||||
@@ -39,7 +39,7 @@ sign_pkg(){
|
|||||||
|
|
||||||
for pkg in ${passfiles[@]}; do
|
for pkg in ${passfiles[@]}; do
|
||||||
if pkgfile=$(find_cached_pkgfile "$pkg");then
|
if pkgfile=$(find_cached_pkgfile "$pkg");then
|
||||||
msg "Found: %s" "${pkgfile}"
|
msg2 "Found: %s" "${pkgfile}"
|
||||||
[[ -e "${pkgfile}".sig ]] && rm "${pkgfile}".sig
|
[[ -e "${pkgfile}".sig ]] && rm "${pkgfile}".sig
|
||||||
sign_pkg "${pkgfile}"
|
sign_pkg "${pkgfile}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
11
data/docker/package-cleanup.hook
Normal file
11
data/docker/package-cleanup.hook
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Trigger]
|
||||||
|
Operation = Install
|
||||||
|
Operation = Upgrade
|
||||||
|
Type = Package
|
||||||
|
Target = *
|
||||||
|
|
||||||
|
[Action]
|
||||||
|
Description = Cleaning up package cache...
|
||||||
|
Depends = coreutils
|
||||||
|
When = PostTransaction
|
||||||
|
Exec = /usr/bin/find /var/cache/pacman/pkg/ -type f -delete
|
||||||
111
data/docker/pacman-docker.conf
Normal file
111
data/docker/pacman-docker.conf
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
#
|
||||||
|
# /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/
|
||||||
|
#HookDir = /etc/pacman.d/hooks/
|
||||||
|
HoldPkg = pacman glibc
|
||||||
|
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||||
|
#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 = usr/share/help/* !usr/share/help/en*
|
||||||
|
NoExtract = usr/share/gtk-doc/html/* usr/share/doc/*
|
||||||
|
NoExtract = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/*
|
||||||
|
NoExtract = !*locale*/en*/* !usr/share/i18n/charmaps/UTF-8.gz !usr/share/*locale*/locale.*
|
||||||
|
NoExtract = !usr/share/*locales/en_?? !usr/share/*locales/i18n* !usr/share/*locales/iso*
|
||||||
|
NoExtract = !usr/share/*locales/trans*
|
||||||
|
NoExtract = usr/share/man/* usr/share/info/*
|
||||||
|
NoExtract = usr/share/vim/vim*/lang/*
|
||||||
|
|
||||||
|
# Misc options
|
||||||
|
#UseSyslog
|
||||||
|
#Color
|
||||||
|
#TotalDownload
|
||||||
|
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 = Required DatabaseOptional
|
||||||
|
LocalFileSigLevel = Optional
|
||||||
|
#RemoteFileSigLevel = Required
|
||||||
|
|
||||||
|
# NOTE: You must run `pacman-key --init` before first using pacman; the local
|
||||||
|
# keyring can then be populated with the keys of all official Artix Linux
|
||||||
|
# packagers with `pacman-key --populate archlinux artix`.
|
||||||
|
|
||||||
|
#
|
||||||
|
# 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 gremlins 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.
|
||||||
|
|
||||||
|
[system]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[world]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[galaxy]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
# If you want to run 32 bit applications on your x86_64 system,
|
||||||
|
# enable the lib32 repositories as required here.
|
||||||
|
|
||||||
|
#[lib32]
|
||||||
|
#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
|
||||||
|
|
||||||
|
#
|
||||||
|
# ARCHLINUX
|
||||||
|
#
|
||||||
|
|
||||||
|
#[extra]
|
||||||
|
#Include = /etc/pacman.d/mirrorlist-arch
|
||||||
|
|
||||||
|
#[community]
|
||||||
|
#Include = /etc/pacman.d/mirrorlist-arch
|
||||||
|
|
||||||
|
#[multilib]
|
||||||
|
#Include = /etc/pacman.d/mirrorlist-arch
|
||||||
Reference in New Issue
Block a user