diff options
-rw-r--r-- | libre/base/PKGBUILD | 10 | ||||
-rw-r--r-- | libre/cups-filters/PKGBUILD | 2 | ||||
-rw-r--r-- | libre/icecat/PKGBUILD | 28 | ||||
-rw-r--r-- | libre/icecat/rust_1.48.patch.gz | bin | 0 -> 38741 bytes | |||
-rw-r--r-- | libre/okular/PKGBUILD | 15 | ||||
-rw-r--r-- | libre/rz-cutter/PKGBUILD | 1 | ||||
-rw-r--r-- | libre/systemd/PKGBUILD | 8 | ||||
-rw-r--r-- | nonsystemd/eudev/PKGBUILD | 98 | ||||
-rw-r--r-- | pcr/mirror-sync/PKGBUILD | 25 | ||||
-rw-r--r-- | pcr/mirror-sync/mirror-sync.service | 17 | ||||
-rw-r--r-- | pcr/mirror-sync/mirror-sync.sh | 140 | ||||
-rw-r--r-- | pcr/mirror-sync/mirror-sync.timer | 9 |
12 files changed, 31 insertions, 322 deletions
diff --git a/libre/base/PKGBUILD b/libre/base/PKGBUILD index 26e8e0187..a0ca93365 100644 --- a/libre/base/PKGBUILD +++ b/libre/base/PKGBUILD @@ -1,12 +1,12 @@ -# Maintainer (arch): Arch Linux Team -# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org> -# Contributor: Eli Schwartz <eschwartz@archlinux.org> +# Maintainer (Arch): Arch Linux Team +# Contributor (Arch): Levente Polyak <anthraxx[at]archlinux[dot]org> +# Contributor (Arch): Eli Schwartz <eschwartz@archlinux.org> # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> pkgname=base pkgver=2 pkgrel=2 -pkgrel+=.parabola2 +pkgrel+=.parabola1 pkgdesc="Minimal package-set to define the essential Parabola GNU/Linux-libre systemd CLI system" url='https://www.parabola.nu' arch=('any') @@ -28,7 +28,7 @@ depends=( 'iputils' 'iproute2' # parabola - 'your-freedom' 'icu-compat' + 'your-freedom' ) optdepends=('linux-libre: bare metal support' 'parabola-base: standard Parabola GNU/Linux-libre CLI system') diff --git a/libre/cups-filters/PKGBUILD b/libre/cups-filters/PKGBUILD index e1de85374..280af8094 100644 --- a/libre/cups-filters/PKGBUILD +++ b/libre/cups-filters/PKGBUILD @@ -11,7 +11,7 @@ pkgname=cups-filters pkgver=1.28.10 -pkgrel=2 +pkgrel=1 pkgrel+=.parabola1 pkgdesc="OpenPrinting CUPS Filters" pkgdesc+=", without foomatic-db-nonfree recommendation" diff --git a/libre/icecat/PKGBUILD b/libre/icecat/PKGBUILD index a9e29aa70..7e19563a0 100644 --- a/libre/icecat/PKGBUILD +++ b/libre/icecat/PKGBUILD @@ -15,18 +15,18 @@ # Contributor: grizzlyuser <grizzlyuser@protonmail.com> -# NOTE: icecat (60.7 < V <= 91.4) are not upstream releases +# NOTE: icecat (60.7 < V <= 78.10) are not upstream releases # upstream releases would normally have '-gnu' appended to $_upstream_ver # this build is based on gnuzilla VCS developement sources -# rev: dd79d69e5dc6e6e751195001f322b30746be6903 +# rev: b72c22186cf381d7b1f93be550c9da30865d03b4 pkgname=icecat -_upstream_ver=91.4.0-pre # -gnu1 +_upstream_ver=78.10.0-pre2 # -gnu1 pkgver=${_upstream_ver//-/_} pkgrel=1 pkgdesc="the GNU web browser, based on Mozilla Firefox ESR" -arch=(armv7h i686 x86_64) +arch=(x86_64 i686 armv7h) license=(MPL GPL LGPL) url=http://www.gnu.org/software/gnuzilla/ depends=(gtk3 libxt mime-types dbus-glib ffmpeg nss ttf-font libpulse) @@ -34,12 +34,12 @@ makedepends=(m4 unzip zip diffutils python2-setuptools yasm mesa imake inetutils xorg-server-xvfb autoconf2.13 rust clang llvm jack gtk2 python nodejs python2-psutil cbindgen nasm) makedepends+=(mozilla-searchplugins jq) -#if [[ "${CARCH}" == 'i686' ]] -#then makedepends=(${makedepends[*]/llvm/llvm10}) # FIXME: i686 configure fails with LLVM11 +if [[ "${CARCH}" == 'i686' ]] +then makedepends=(${makedepends[*]/llvm/llvm10}) # FIXME: i686 configure fails with LLVM11 # rustup: error while loading shared libraries: libLLVM-10.so -# makedepends=(${makedepends[*]/rust/rust=1:1.47.0}) # FIXME: Sandbox: seccomp sandbox violation -#else makedepends=(${makedepends[*]/rust/rust=1:1.49.0}) # https://lists.gnu.org/archive/html/gnuzilla-dev/2021-04/msg00000.html -#fi + makedepends=(${makedepends[*]/rust/rust=1:1.47.0}) # FIXME: Sandbox: seccomp sandbox violation +else makedepends=(${makedepends[*]/rust/rust=1:1.49.0}) # https://lists.gnu.org/archive/html/gnuzilla-dev/2021-04/msg00000.html +fi optdepends=('networkmanager: Location detection via available WiFi networks' 'libnotify: Notification integration' 'pulseaudio: Audio support' @@ -48,15 +48,17 @@ optdepends=('networkmanager: Location detection via available WiFi networks' options=(!emptydirs !makeflags !strip) source=(https://repo.parabola.nu/other/${pkgname}/${pkgname}-${_upstream_ver}.tar.bz2{,.sig} icecat.desktop icecat-safe.desktop - 0001-Use-remoting-name-for-GDK-application-names.patch) + 0001-Use-remoting-name-for-GDK-application-names.patch + rust_1.48.patch.gz) source+=(searchplugins_list.json 9003-misc-libre.patch) source_i686=('rust-static-disable-network-test-on-static-libraries.patch') -sha256sums=('74e4cbe35c6e121d9c9059b1383717e5729bbc0b7ea877cd295f4e34a473b1ee' +sha256sums=('f4334ab97a30bf8e8fe400c55ed00fcea1d44536dc6df1c7f65fec8eae1664a3' 'SKIP' 'e00dbf01803cdd36fd9e1c0c018c19bb6f97e43016ea87062e6134bdc172bc7d' '33dd309eeb99ec730c97ba844bf6ce6c7840f7d27da19c82389cdefee8c20208' - 'e0eaec8ddd24bbebf4956563ebc6d7a56f8dada5835975ee4d320dd3d0c9c442') + 'e0eaec8ddd24bbebf4956563ebc6d7a56f8dada5835975ee4d320dd3d0c9c442' + 'c7f867ccee684939c9f0a9c30ea69127077bbe43af545a03f09dfbbdc02545a9') sha256sums+=('3edb4add450f94c579f2df7c16ac4d9bd9f5c6acf3fbd8a05ce24c21c317257d' '28029afa3201e1be8138be06f741c59d64869edf0c9e90dbb05cfa6b5fff4ecd') sha256sums_i686=('068efe37a99561490e6ec7b70a3cd4dd84e89e6bdf19f04a475d06c78fd28920') @@ -116,7 +118,7 @@ prepare() { patch -Np1 -i ../0001-Use-remoting-name-for-GDK-application-names.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=1667736 -# patch -Np1 -i ../rust_1.48.patch + patch -Np1 -i ../rust_1.48.patch cat >../mozconfig <<END ac_add_options --enable-application=browser diff --git a/libre/icecat/rust_1.48.patch.gz b/libre/icecat/rust_1.48.patch.gz Binary files differnew file mode 100644 index 000000000..eb1577e33 --- /dev/null +++ b/libre/icecat/rust_1.48.patch.gz diff --git a/libre/okular/PKGBUILD b/libre/okular/PKGBUILD index bd90ea90d..c4e0138e3 100644 --- a/libre/okular/PKGBUILD +++ b/libre/okular/PKGBUILD @@ -12,14 +12,14 @@ pkgname=okular -pkgver=21.08.1 +pkgver=20.12.3 pkgrel=1 pkgrel+=.parabola1 pkgdesc='Document Viewer' pkgdesc+=', with copy-protection anti-feature disabled, without nonfree recommendations' arch=(x86_64) arch+=(i686 armv7h) -url='https://apps.kde.org/okular/' +url="https://kde.org/applications/graphics/okular/" license=(GPL LGPL FDL) groups=(kde-applications kde-graphics) depends=(djvulibre libspectre libkexiv2 poppler-qt5 kpty kactivities threadweaver kjs kparts purpose discount phonon-qt5) @@ -27,13 +27,10 @@ makedepends=(extra-cmake-modules ebook-tools kdegraphics-mobipocket kdoctools kh optdepends=('ebook-tools: mobi and epub support' 'kdegraphics-mobipocket: mobi support' 'libzip: CHM support' 'khtml: CHM support' 'chmlib: CHM support' 'calligra: ODT and ODP support' - 'unrar: Comic Book Archive support' 'unarchiver: Comic Book Archive support (alternative)') -echo "=${#optdepends[@]}=${optdepends[6]}" -# optdepends=( "${optdepends[@]/unrar: */}" ) -echo "=${#optdepends[@]}=${optdepends[6]}" -source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig}) + 'unarchiver: Comic Book Archive support') +source=("https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig}) source+=(disable-drm.patch) -sha256sums=('370ca3b90b8c4b44cee88f07e56cb1649c281c0ef110dce72e0ba00888ad61ee' +sha256sums=('ae570fcd2b35cc9c061c1c55b6f8de256358f0f5dd8d0a8283f13eae006b73dc' 'SKIP') sha256sums+=('83cf760b3ae6e03d49e02369375dae3ecc05a6800d512dd9ffeaac1648c19457') validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7 # Albert Astals Cid <aacid@kde.org> @@ -41,9 +38,7 @@ validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7 # Albert Astals Cid <aac D81C0CB38EB725EF6691C385BB463350D6EF31EF) # Heiko Becker <heiko.becker@kde.org> options=(!zipman) - prepare() { -exit 1 mkdir -p build cd $pkgname-$pkgver diff --git a/libre/rz-cutter/PKGBUILD b/libre/rz-cutter/PKGBUILD index 0df24359d..a15377d63 100644 --- a/libre/rz-cutter/PKGBUILD +++ b/libre/rz-cutter/PKGBUILD @@ -6,7 +6,6 @@ pkgname=rz-cutter _gitcommit=6dab092b515024ba769e81554c91c0d8b9883264 pkgver=2.0.3 -[[ "${CARCH}" == 'i686' ]] && pkgver=2.0.2 _gitcommit=8d4c86069055f7bc70af8845f7de3069193f6be3 pkgrel=2 pkgrel+=.parabola1 pkgdesc='Qt and C++ GUI for rizin reverse engineering framework' diff --git a/libre/systemd/PKGBUILD b/libre/systemd/PKGBUILD index 61332eb9d..e81e2258d 100644 --- a/libre/systemd/PKGBUILD +++ b/libre/systemd/PKGBUILD @@ -43,6 +43,7 @@ source=("git+https://github.com/systemd/systemd-stable#tag=${_tag}?signed" 'systemd-user.pam' 'systemd-hook' '20-systemd-sysusers.hook' + 'udev-hook' '30-systemd-binfmt.hook' '30-systemd-catalog.hook' '30-systemd-daemon-reload.hook' @@ -68,15 +69,16 @@ sha512sums=('SKIP' '6c6f579644ea2ebb6b46ee274ab15110718b0de40def8c30173ba8480b045d403f2aedd15b50ad9b96453f4ad56920d1350ff76563755bb9a80b10fa7f64f1d9' 'a50bc85061a9a16d776235099867bc1a17c17dddb74c1ecf5614c849735a9779c5e34e5ddca8ca6af4b59a40f57c08ecf219b98cab09476ddb0f110e6a35e45c' 'b90c99d768dc2a4f020ba854edf45ccf1b86a09d2f66e475de21fe589ff7e32c33ef4aa0876d7f1864491488fd7edb2682fc0d68e83a6d4890a0778dc2d6fe19' - '217a9dc3f9d8cd0c9fee54f777396f5a270c2e8a30c572ce5f635165adadcec275af0dae1456019cedb9cc93b7cef0862e5070aeb99a19e496625200e8dfac93' + 'f47638f4f0c154b7833a055b78b6dad14f17be43af0279f65d26e34926a80263bcec33eeda03debd72cdd2b9b0ef23d91f1a7e5ab2915936046c3231e97e3acb' '299dcc7094ce53474521356647bdd2fb069731c08d14a872a425412fcd72da840727a23664b12d95465bf313e8e8297da31259508d1c62cc2dcea596160e21c5' + '456cbd555bf173252647488c01f4111d9f6c0dc7dc67af6f1fb5a65089649a388b2a2c0364eb4ab626b4dcb02cc9d775bbd9f87b56434780a073f6753ff06d65' '0d6bc3d928cfafe4e4e0bc04dbb95c5d2b078573e4f9e0576e7f53a8fab08a7077202f575d74a3960248c4904b5f7f0661bf17dbe163c524ab51dd30e3cb80f7' '2b50b25e8680878f7974fa9d519df7e141ca11c4bfe84a92a5d01bb193f034b1726ea05b3c0030bad1fbda8dbb78bf1dc7b73859053581b55ba813c39b27d9dc' '63e55b3acd14bc54320b6f2310b43398651ad4e262d4f4a0135e05d34a993e56ed673cc46e57f15b418371df5c4cef6f54486db96325e4abb1d33fb1a3946254' - 'a1661ab946c6cd7d3c6251a2a9fd68afe231db58ce33c92c42594aedb5629be8f299ba08a34713327b373a3badd1554a150343d8d3e5dfb102999c281bd49154' + 'cee9240dac5888d1dde916429ac25c022e30b5d7c53ba9e699e281021d2224bfd6e4cc4ac1c71c15f768b720d524cac0dabaae06d026a68759f6fe84b4c62751' '9426829605bbb9e65002437e02ed54e35c20fdf94706770a3dc1049da634147906d6b98bf7f5e7516c84068396a12c6feaf72f92b51bdf19715e0f64620319de' 'da7a97d5d3701c70dd5388b0440da39006ee4991ce174777931fea2aa8c90846a622b2b911f02ae4d5fffb92680d9a7e211c308f0f99c04896278e2ee0d9a4dc' - 'a50d202a9c2e91a4450b45c227b295e1840cc99a5e545715d69c8af789ea3dd95a03a30f050d52855cabdc9183d4688c1b534eaa755ebe93616f9d192a855ee3' + '5aa475f37d35752a95e73417c38c4d3bc4d15d5f1052e95d75b4c4144b74c79af94da1d1e954be536339f9829a1ceb3a1bc5c6adceb187df7a8e5f5a83e4a850' '825b9dd0167c072ba62cabe0677e7cd20f2b4b850328022540f122689d8b25315005fa98ce867cf6e7460b2b26df16b88bb3b5c9ebf721746dce4e2271af7b97' 'e963859d9958e527802f118a5ac5f2051343a2ee987f60cae256fc4e8c71f5fe16439375a5d1caf0338f1156775ad087eaab9e8bf9d18633e62ea4d32e713e7f' '8466d1945d72a7605e3a9c3402ddb8c67272506ffba89a35f3e7787e03d0e8895b6d52d9390899381b6763da00e49703953794696366b6c510e037c67aff96ac' diff --git a/nonsystemd/eudev/PKGBUILD b/nonsystemd/eudev/PKGBUILD deleted file mode 100644 index 5bf06f27c..000000000 --- a/nonsystemd/eudev/PKGBUILD +++ /dev/null @@ -1,98 +0,0 @@ -# Maintainer: David P. <megver83@parabola.nu> -# Contributor: Luke Shumaker <lukeshu@sbcglobal.net> -# Contributor: Omar Vega Ramos <ovruni@gnu.org.pe> -# Maintainer (Artix): artoo <artoo@artixlinux.org> -# Contributor (Artix): Alexey D. <lq07829icatm@rambler.ru> -# Contributor (Artix): Ivailo Monev <xakepa10@gmail.com> - -_udev_ver=243 - -pkgbase=eudev -pkgname=('eudev' 'eudev-libudev') -pkgver=3.2.9 -pkgrel=2 -pkgdesc="The userspace dev tools (udev) forked by Gentoo" -arch=('x86_64' 'i686' 'armv7h') -url="http://www.gentoo.org/proj/en/eudev/" -license=('GPL') -makedepends=('gobject-introspection' 'gperf' 'gtk-doc' 'intltool' 'kmod' 'util-linux' 'libelf') -options=('!libtool') -source=("$pkgname-$pkgver.tar.gz::https://github.com/gentoo/eudev/archive/v${pkgver}.tar.gz" - 'initcpio_hooks' - 'initcpio_install' - '30-udev-hwdb.hook' - '30-udev-reload.hook' - 'udev-hook' - 'udev-hwdb-path.patch' - 'udev-default-rules.patch') -sha256sums=('7d281276b480da3935d1acb239748c2c9db01a8043aad7e918ce57a223d8cd24' - '892ce43218e0a458981bbce451252c8987dc398e60b8de288e7542b8f2409c13' - '77dd1fd318b4456409aceb077f060b87944defb07cf39d29ad1968dc6f361875' - '2782bd3a7686596e98bd2d3fdef9d59d7d439682b87bbcc43b1fd1f5fabb3505' - '13596caef6ed85b58de674ebe7c47d9c7dd676240de5cc28ef3ccee2ce1d8a90' - '80c8f87549374d3bc7c2831b9e069b0005cc5ef90122c2d02e78e27c9bc1dbed' - 'e05e468d15d09fb49343f33bc8d21c08f54db3ecff412dc35d4acb0630f869a3' - '13c167e448411b53b18532469e783e2e51a4c46ff4cf9c46e0481d6440b53f8d') - -prepare(){ - cd "${pkgbase}-${pkgver}" - patch -Np 1 -i ${srcdir}/udev-hwdb-path.patch - patch -Np 1 -i ${srcdir}/udev-default-rules.patch - ./autogen.sh -} - -build() { - cd "${pkgbase}-${pkgver}" - - ./configure \ - --prefix=/usr \ - --with-rootprefix=/usr \ - --sysconfdir=/etc \ - --libdir=/usr/lib \ - --sbindir=/usr/bin \ - --enable-introspection \ - --enable-kmod \ - --enable-manpages \ - --enable-split-usr - - make -} - -check(){ - cd "${pkgbase}-${pkgver}" - make -k check -} - -package_eudev() { - provides=("udev=${_udev_ver}" ) - depends=("eudev-libudev=$pkgver" 'kbd' 'kmod' 'hwdata' 'util-linux') - backup=('etc/udev/udev.conf') - - cd "${pkgbase}-${pkgver}" - - make DESTDIR="${pkgdir}" install - - install -dm755 ${srcdir}/_libeudev - - mv -v ${pkgdir}/usr/lib/libudev*.so* ${srcdir}/_libeudev - - install -Dm644 "${srcdir}/initcpio_hooks" "${pkgdir}/usr/lib/initcpio/hooks/udev" - install -Dm644 "${srcdir}/initcpio_install" "${pkgdir}/usr/lib/initcpio/install/udev" - - # pacman hooks - install -Dm755 ${srcdir}/udev-hook "$pkgdir"/usr/share/libalpm/scripts/udev-hook - install -Dm644 -t "$pkgdir"/usr/share/libalpm/hooks ${srcdir}/*.hook -} - -package_eudev-libudev() { - pkgdesc="eudev client libraries" - depends=('glibc' 'libelf') - provides=("libudev=${_udev_ver}" 'libudev.so') - - provides+=("libeudev=$pkgver") - conflicts+=('libeudev') - replaces+=('libeudev') - - install -dm755 ${pkgdir}/usr/lib - mv -v ${srcdir}/_libeudev/libudev*.so* ${pkgdir}/usr/lib -} diff --git a/pcr/mirror-sync/PKGBUILD b/pcr/mirror-sync/PKGBUILD deleted file mode 100644 index d0aa219a2..000000000 --- a/pcr/mirror-sync/PKGBUILD +++ /dev/null @@ -1,25 +0,0 @@ -# Maintainer: nobody@nowhere.man - -pkgname=repo-sync -pkgver=0.0.1 -pkgrel=1 -pkgdesc="arch-like package repository synchronization timer (systemd)" -arch=(any) -url=https://nowhere.man -license=(GPL) - -depends=(rsync) -source=(repo-sync.timer - repo-sync.sh) - -sha256sums=(0 - 0) - - -package() -{ - cd "${srcdir}" - - install -Dm644 repo-sync.timer "${pkgdir}"/usr/lib/systemd/repo-sync.timer - install -Dm644 repo-sync.sh "${pkgdir}"/usr/lib/${pkgname}/repo-sync.sh -} diff --git a/pcr/mirror-sync/mirror-sync.service b/pcr/mirror-sync/mirror-sync.service deleted file mode 100644 index 958a2848d..000000000 --- a/pcr/mirror-sync/mirror-sync.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=mirror sync -ConditionPathIsReadWrite=/srv/repo/ -ConditionPathIsReadWrite=/srv/repo-staging/ -After=network-online.target -Wants=network-online.target - -[Service] -Type=oneshot -ExecStart=/usr/lib/mirror-sync/mirror-sync.sh -Nice=19 -StandardOutput=journal -StandardError=journal -PrivateTmp=yes -PrivateDevices=yes -CapabilityBoundingSet= -NoNewPrivileges=yes diff --git a/pcr/mirror-sync/mirror-sync.sh b/pcr/mirror-sync/mirror-sync.sh deleted file mode 100644 index 773d7a538..000000000 --- a/pcr/mirror-sync/mirror-sync.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/env bash - -# TODO: this is a WIP, to replace repo-sync.sh - -# This file is derrived from 'syncrepo-template.sh', -# originally fetched from: https://gitlab.archlinux.org/archlinux/infrastructure/-/raw/master/roles/syncrepo/files/syncrepo-template.sh - -######## -# -# Copyright © 2014-2019 Florian Pritz <bluewind@xinu.at> -# Copyright © 2021-2022 bill-auger <bill-auger@programmer.net> (Parabola) -# For a complete list of contributors, see: -# https://gitlab.archlinux.org/archlinux/infrastructure/-/graphs/master -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# -######## - -# This is a simple mirroring script. To save bandwidth it first checks a -# timestamp via HTTP and only runs rsync when the timestamp differs from the -# local copy. As of 2016, a single rsync run without changes transfers roughly -# 6MiB of data which adds up to roughly 250GiB of traffic per month when rsync -# is run every minute. Performing a simple check via HTTP first can thus save a -# lot of traffic. -# -# Preparation: -# -# This script is mostly pre-configured; but some initial manual steps are required. -# -# * $UPSTREAM_HOST must be defined explicitly. -# -# * $LOCAL_DIR and $TEMP_DIR must be writable by the user executing this script. -# -# * In order for the $LOCK_FILE to work on systemd systems, you will need to add -# a configuration file to /etc/tempfiles.d/ (eg: /etc/tempfiles.d/mirror-sync.conf), -# with the following text: -# D /run/lock/<MIRROR_SYNC_LOCK_DIR> - <REPO_USER> <REPO_GROUP> - - -# where: -# * <MIRROR_SYNC_LOCK_DIR> corresponds to the $LOCK_FILE entry -# eg: /var/lock/MIRROR_SYNC_LOCK_DIR/mirror-sync.lck -# * <REPO_LOGIN> and <REPO_GROUP> are login (or UID) and group (or GID) -# of the user executing this script - -# Parabola changes: -# * renamed vars and made constant -# * refactored into functions -# * always guard sync with '/lastupdate' file check -# * added parabola mirror examples - - -### CONFIG BEGIN ### - -# Mandatory - Local filesystem path to the repo. Example: /srv/repo -readonly LOCAL_DIR=/srv/repo - -# Mandatory - Local filesystem path to the staging directory. Example: /srv/repo-staging -# This should be on the same filesystem as, but not a subdirectory of $LOCAL_DIR. -readonly TEMP_DIR=/srv/repo-staging - -# Mandatory - Lock file -readonly LOCK_FILE=/var/lock/mirror-sync/mirror-sync.lck - -# Mandatory - Maximum incoming bandwidth limit. -# Use 0 to disable the limit. -# The default unit is KiB (see `man rsync` --bwlimit for the valid syntax) -readonly BW_LIMIT=0 - -# Mandatory - Source URL of the mirror from which you want to sync. -# eg: Parabola tier-1 mirrors: -# 'rsync.cyberbits.eu' # Roubaix, France # IPv4 -# 'mirror.grapentin.org' # Falkenstein, Germany # IPv4 IPv6 -# 'parabola.ip-connect.info' # Vinnytsia, Ukraine # IPv4 IPv6 -readonly UPSTREAM_HOST= - -# Optional - Non-standard port number (eg: ':2222') -# Normally, this will be empty -readonly UPSTREAM_PORT= - -# Optional - Upstream filesystem path -# Conventionally, this is empty, or '/parabola' -readonly UPSTREAM_PATH=/parabola - -### CONFIG END ### - - -readonly RSYNC_URL=rsync://${UPSTREAM_HOST}${UPSTREAM_PORT}${UPSTREAM_PATH} -readonly HTTP_URL=https://${UPSTREAM_HOST}${UPSTREAM_PATH} -readonly VERBOSE_OPTS='--human-readable --verbose --progress' -readonly QUIET_OPTS='--quiet' -readonly HAS_TTY=$( /usr/bin/tty -s && echo 1 || echo 0 ) -readonly VERBOSITY="$( (( HAS_TTY )) && echo "${VERBOSE_OPTS}" || echo "${QUIET_OPTS}" )" - - -rsync_cmd() -{ - /usr/bin/rsync --recursive --perms --times --links --hard-links --safe-links \ - --temp-dir="${TEMP_DIR}" --delete-after --delay-updates \ - --bwlimit="${BW_LIMIT}" --timeout=600 --contimeout=60 \ - --no-motd --exclude='*.links.tar.gz*' ${VERBOSITY} "$@" -} - -init() -{ - # Sanity checks and take lock. - [[ -n "${UPSTREAM_HOST}" ]] || return 1 - mkdir -p "${LOCAL_DIR}" "${TEMP_DIR}" || return 1 - exec 9> "${LOCK_FILE}" || return 1 - /usr/bin/flock -n 9 || return 1 - - # Cleanup any temporary files from old run that might remain. - find "${LOCAL_DIR}" -name '.~tmp~' -exec rm -rf {} + -} - -main() -{ - init || return 1 - - # Syncronize only when there are changes. - local local_ts=$( /usr/bin/cat "${LOCAL_DIR}"/lastupdate ) - local upstream_ts=$( /usr/bin/curl -Ls "${HTTP_URL}"/lastupdate ) - if [[ "${upstream_ts}" == "${local_ts}" ]] - then # Force syncronize 'lastsync' file for statistics. - rsync_cmd "$@" "${RSYNC_URL}"/lastsync "${LOCAL_DIR}"/lastsync - else rsync_cmd "$@" "${RSYNC_URL}"/ "${LOCAL_DIR}"/ - fi -} - - -main "$@" diff --git a/pcr/mirror-sync/mirror-sync.timer b/pcr/mirror-sync/mirror-sync.timer deleted file mode 100644 index 8949484e9..000000000 --- a/pcr/mirror-sync/mirror-sync.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=mirror sync timer - -[Timer] -OnUnitInactiveSec=900 -Persistent=yes - -[Install] -WantedBy=timers.target |