mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-23 01:16:04 +01:00
fix locale?
This commit is contained in:
parent
6e43af43e0
commit
013ff999fb
@ -27,7 +27,8 @@ function start-docker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function build-pkg() {
|
function build-pkg() {
|
||||||
sudo docker-compose run makepkg "${1}"
|
# --rm: Remove container after run.
|
||||||
|
sudo docker-compose run --rm makepkg "${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function push-pkg() {
|
function push-pkg() {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
version: '3.7'
|
version: '3.7'
|
||||||
services:
|
services:
|
||||||
|
|
||||||
|
# usage: sudo docker-compose run --rm makepkg
|
||||||
makepkg:
|
makepkg:
|
||||||
build: .
|
build: .
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
_pkgname=locale
|
_pkgname=locale
|
||||||
_reponame=arch
|
_reponame=arch
|
||||||
pkgname="de-p1st-$_pkgname"
|
pkgname="de-p1st-$_pkgname"
|
||||||
pkgver=0.0.8
|
pkgver=0.0.9
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="locale and timezone"
|
pkgdesc="locale and timezone"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
@ -10,7 +10,7 @@ url="https://codeberg.org/privacy1st/${_reponame}"
|
|||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=('holo')
|
depends=('holo')
|
||||||
makedepends=('git')
|
makedepends=('git')
|
||||||
backup=('etc/locale.conf')
|
backup=('etc/locale.conf' 'etc/localtime')
|
||||||
install='.install'
|
install='.install'
|
||||||
source=("git+${url}.git")
|
source=("git+${url}.git")
|
||||||
sha256sums=('SKIP')
|
sha256sums=('SKIP')
|
||||||
@ -21,13 +21,15 @@ package() {
|
|||||||
# Note: The following three files are overwritten with "holo apply --force ..."
|
# Note: The following three files are overwritten with "holo apply --force ..."
|
||||||
# See ".install" script
|
# See ".install" script
|
||||||
|
|
||||||
# (!)
|
# Copy locale.conf to /etc/locale.conf so that one package owns that file
|
||||||
# install -Dm0644 locale.conf "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/locale.conf
|
# in this PKGBUILD, add /etc/locale.conf to backup array so that pacman does not fail if this file already exists on the filesystem
|
||||||
|
# (a ".pacnew" file will be created in that case)
|
||||||
|
# and then use holo with "--force" to overwrite the local version with the desired one
|
||||||
install -Dm0644 locale.conf "$pkgdir"/etc/locale.conf
|
install -Dm0644 locale.conf "$pkgdir"/etc/locale.conf
|
||||||
|
install -Dm0644 locale.conf "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/locale.conf
|
||||||
|
#
|
||||||
|
ln -sf /usr/share/zoneinfo/Europe/Berlin "$pkgdir"/etc/localtime
|
||||||
|
ln -sf /usr/share/zoneinfo/Europe/Berlin "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/localtime
|
||||||
|
|
||||||
install -Dm0644 locale.gen "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/locale.gen
|
install -Dm0644 locale.gen "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/locale.gen
|
||||||
|
|
||||||
# (!)
|
|
||||||
# ln -sf /usr/share/zoneinfo/Europe/Berlin "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/localtime
|
|
||||||
ln -sf /usr/share/zoneinfo/Europe/Berlin "$pkgdir"/etc/localtime
|
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source /etc/de-p1st-repo/arch-repo.cfg || exit
|
source /etc/de-p1st-repo/arch-repo.cfg || exit
|
||||||
|
# Enable nullglob for the case that not all patterns match, e.g. just *.zst but not *.xz packages exist.
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
cd "${LOCAL_PKG_DIR}" || return $?
|
cd "${LOCAL_PKG_DIR}" || return $?
|
||||||
|
|
||||||
# check if at least one matching file exists
|
# Check if at least one matching file exists
|
||||||
match="0"
|
match="0"
|
||||||
for PKG in ./*.pkg.tar.{xz,zst}; do
|
for PKG in ./*.pkg.tar.{xz,zst}; do
|
||||||
[ -f "$PKG" ] || { echo "There are no local packages inside ${LOCAL_PKG_DIR} for pattern $PKG"; continue; }
|
# There is at least one match!
|
||||||
|
|
||||||
# if we are here, then there is at least one match!
|
|
||||||
match="1"
|
match="1"
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
@ -22,28 +22,26 @@ function main() {
|
|||||||
|
|
||||||
|
|
||||||
# Get list of new packages, one package per line.
|
# Get list of new packages, one package per line.
|
||||||
# Enable nullglob for the case that e.g. just *.zst but not *.xz packages exist.
|
|
||||||
shopt -s nullglob
|
|
||||||
rsync --ignore-existing --out-format="%n" --dry-run \
|
rsync --ignore-existing --out-format="%n" --dry-run \
|
||||||
./*.pkg.tar.{xz,zst} "${REMOTE_SSH_HOST}":"${REMOTE_PKG_DIR}" > new-pkg.txt || return $?
|
./*.pkg.tar.{xz,zst} "${REMOTE_SSH_HOST}":"${REMOTE_PKG_DIR}" > new-pkg.txt || return $?
|
||||||
|
|
||||||
# if there are no new packages to push/synchronize, then return
|
# If there are no new packages to push/synchronize, then return
|
||||||
if [ ! -s new-pkg.txt ]; then
|
if [ ! -s new-pkg.txt ]; then
|
||||||
echo "No new packages inside ${LOCAL_PKG_DIR}";
|
echo "No new packages inside ${LOCAL_PKG_DIR}";
|
||||||
return 0;
|
return 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# transfer new packages using rsync
|
# Transfer new packages using rsync
|
||||||
rsync --ignore-existing --progress --human-readable \
|
rsync --ignore-existing --progress --human-readable \
|
||||||
./*.pkg.tar.{xz,zst} "${REMOTE_SSH_HOST}":"${REMOTE_PKG_DIR}" || return $?
|
./*.pkg.tar.{xz,zst} "${REMOTE_SSH_HOST}":"${REMOTE_PKG_DIR}" || return $?
|
||||||
|
|
||||||
# transfer new-pkg.txt
|
# Transfer new-pkg.txt
|
||||||
rsync --ignore-times --checksum --progress --human-readable \
|
rsync --ignore-times --checksum --progress --human-readable \
|
||||||
new-pkg.txt "${REMOTE_SSH_HOST}":"${REMOTE_PKG_DIR}" || return $?
|
new-pkg.txt "${REMOTE_SSH_HOST}":"${REMOTE_PKG_DIR}" || return $?
|
||||||
|
|
||||||
|
|
||||||
# add each new package to database
|
# Add each new package to database
|
||||||
ssh "${REMOTE_SSH_HOST}" "/usr/bin/arch-repo-receive-new" || return $?
|
ssh "${REMOTE_SSH_HOST}" "/usr/bin/arch-repo-receive-new" || return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user