perf(temp): remove browser config*

This commit is contained in:
Eshan Roy (Eshanized)
2024-05-14 02:46:24 +05:30
parent a6f533072a
commit 5ec6b047e8
23333 changed files with 2052080 additions and 0 deletions

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Snigdha OS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

1
README.md Normal file
View File

@@ -0,0 +1 @@
# SNIGDHA OS PKGBUILDS

21
eshanized-keyring/LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Snigdha OS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,11 @@
V=20240430
PREFIX = /usr/local
install:
install -dm755 $(DESTDIR)$(PREFIX)/share/pacman/keyrings/
install -m0644 eshanized{.gpg,-trusted,-revoked} $(DESTDIR)$(PREFIX)/share/pacman/keyrings/
uninstall:
rm -f $(DESTDIR)$(PREFIX)/share/pacman/keyrings/eshanized{.gpg,-trusted,-revoked}
rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(PREFIX)/share/pacman/keyrings/

View File

@@ -0,0 +1,25 @@
# Based on the file created for Arch Linux by:
# Eshan Roy <eshan@snigdhaos.org>
pkgname=eshanized-keyring
pkgver=20240430
pkgrel=1
pkgdesc='Eshanized GPG keyring'
arch=('any')
url='https://snigdhaos.org'
license=('MIT')
install="${pkgname}.install"
source=('Makefile'
'eshanized.gpg'
'eshanized-revoked'
'eshanized-trusted')
validpgpkeys=('90036098D2B5C70D601D904D3EADBD4DF45A55DD') # eshan
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP')
package() {
cd "${srcdir}"
make PREFIX=/usr DESTDIR=${pkgdir} install
}

View File

@@ -0,0 +1,14 @@
post_upgrade() {
if usr/bin/pacman-key -l >/dev/null 2>&1; then
usr/bin/pacman-key --populate eshanized
else
echo " >>> Run \`pacman-key --init\` to set up your pacman keyring."
echo " >>> Then run \`pacman-key --populate eshanized\` to install the Snigdha OS keyring."
fi
}
post_install() {
if [ -x usr/bin/pacman-key ]; then
post_upgrade
fi
}

View File

View File

@@ -0,0 +1 @@
90036098D2B5C70D601D904D3EADBD4DF45A55DD:4:

View File

@@ -0,0 +1,42 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
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
grtK
=sH9j
-----END PGP PUBLIC KEY BLOCK-----

32
push.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
# Author : Eshan Roy
# URI : https://eshanized.github.io
# NOTE: If you are on Snigdha OS,
# you can install commitizen-go with `sudo pacman -S commitizen-go`
# or `s commitizen-go`. Else you need to install `yay` or `yay-bin`
# to install commitizen. I have written this script only for *Arch Linux.
# Function to check if Commitizen is installed
check_commitizen() {
if ! pacman -Qq commitizen-go &> /dev/null; then
echo "Commitizen is not installed. Please install it using 'yay -S commitizen-go'." >&2
exit 1
fi
}
# Function to stage, commit, and push changes
push_to_github() {
git add .
git cz
git push origin master
}
# Main Function
main() {
check_commitizen
push_to_github
}
main

View File

@@ -0,0 +1,20 @@
pkgbase = asian-fonts
pkgdesc = Meta-package containing common asian fonts
pkgver = 3
pkgrel = 1
url = https://wiki.archlinux.org/index.php/Fonts
arch = any
license = GPL
depends = fonts-tlwg
depends = lohit-fonts
depends = opendesktop-fonts
depends = otf-ipafont
depends = ttf-baekmuk
depends = ttf-hannom
depends = ttf-indic-otf
depends = ttf-khmer
depends = ttf-tibetan-machine
source = 90-bengali.conf
sha256sums = 298b598553e88e1d905748a19ed2ecc00dd6845a8e7213c87d84dcfca57ddee6
pkgname = asian-fonts

View File

@@ -0,0 +1,27 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="pattern">
<test name="lang" compare="contains">
<string>bn</string>
</test>
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" binding="strong" mode="prepend">
<string>Noto Serif Bengali</string>
</edit>
</match>
<match target="pattern">
<test name="lang" compare="contains">
<string>bn</string>
</test>
<test qual="any" name="family">
<string>serif</string>
</test>
<edit name="family" binding="strong" mode="prepend">
<string>Noto Serif Bengali</string>
</edit>
</match>
<dir>~/.fonts</dir>
</fontconfig>

View File

@@ -0,0 +1,33 @@
# Maintainer: dr460nf1r3 <dr460nf1r3 at garudalinux dot org>
# Contributor: Librewish <librewish@gmail.com>
# Contributor: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-asian-fonts
pkgver=3
pkgrel=1
arch=("any")
url="https://wiki.archlinux.org/index.php/Fonts"
license=("GPL")
pkgdesc="Meta-package containing common asian fonts"
source=(90-bengali.conf)
sha256sums=('298b598553e88e1d905748a19ed2ecc00dd6845a8e7213c87d84dcfca57ddee6')
depends=("fonts-tlwg"
"lohit-fonts"
"opendesktop-fonts"
"otf-ipafont"
"ttf-baekmuk"
"ttf-hannom"
"ttf-indic-otf"
"ttf-khmer"
"ttf-tibetan-machine")
install="${pkgname}.install"
pkgver() {
# cd "$srcdir/$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
mkdir -p "$pkgdir"/etc/fonts/conf.d
install -D -m644 90-bengali.conf "$pkgdir"/etc/fonts/conf.d/90-bengali.conf
}

View File

@@ -0,0 +1,7 @@
post_install() {
echo -e "\n** The files have been installed in /etc/fonts/conf.d **\n"
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,36 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-assistant
pkgver=2.0
_pkgver=a1.0.0
pkgrel=2
pkgdesc="A setup utility for Snigdha OS which helps setting up & installing applications"
arch=('any')
url="https://gitlab.com/snigdhaos/snigdhaos-assistant/"
license=('MIT')
depends=('yad' 'wget' 'qt5-base')
optdepends=('pamac')
makedepends=('git' 'cmake')
groups=()
source=("https://github.com/Snigdha-OS/${pkgname}/archive/refs/tags/${_pkgver}.tar.gz")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/$pkgname" || exit
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cmake -B build -S "$pkgname-$_pkgver" \
-DCMAKE_BUILD_TYPE='Release' \
-DCMAKE_INSTALL_PREFIX='/usr' \
-Wno-dev
make -C build
}
package() {
make -C build DESTDIR="$pkgdir" install
install -d "$pkgdir"/usr
cp -rf "$srcdir"/$pkgname-$_pkgver/usr "$pkgdir"
}

View File

@@ -0,0 +1,27 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-backgrounds
pkgver=r28.1d04059
pkgrel=1
pkgdesc="Snigdha OS Wallpapers for GNOME"
arch=('any')
url="https://github.com/Snigdha-OS/snigdhaos-backgrounds"
license=('MIT')
makedepends=('git')
source=("git+https://github.com/Snigdha-OS/snigdhaos-backgrounds.git")
sha256sums=('SKIP')
install="${pkgname}.install"
pkgver() {
cd "$srcdir/$pkgname" || exit
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
cd "${pkgname}" || exit
install -d "${pkgdir}/usr/share/backgrounds/${pkgname}"
cp "${srcdir}/${pkgname}/src/${pkgname}"/*.jpg "${pkgdir}/usr/share/backgrounds/${pkgname}"
install -d "${pkgdir}/usr/share/gnome-background-properties"
cp "${srcdir}/${pkgname}/src/${pkgname}/${pkgname}.xml" "${pkgdir}/usr/share/gnome-background-properties/snigdhaos-backgrounds.xml"
}

View File

@@ -0,0 +1,7 @@
post_install() {
echo -e "\n** The files have been installed in /usr/share/backgrounds **\n"
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,20 @@
# Maintainer: dr460nf1r3 <dr460nf1r3 at garudalinux dot org>
# Contributor: Librewish <librewish@gmail.com>
pkgname=snigdhaos-bluetooth-support
pkgver=1
pkgrel=7
arch=('any')
url="https://wiki.archlinux.org/index.php/Bluetooth"
license=('GPL')
pkgdesc="Meta-package containing needed packages for using Bluetooth"
depends=("bluez"
"bluez-hid2hci"
"bluez-libs"
"bluez-plugins"
"bluez-tools"
"bluez-utils")
optdepends=("blueman: A GTK bluetooth manager"
"bluedevil: Qt bluetooth frontend"
"blueberry: Bluetooth configuration tool")
install="$pkgname".install

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Snigdha OS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,45 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-bootloader-grub
org=Snigdha-OS
branch='master'
_destination1="/etc/pacman.d/hooks"
_licensedir="/usr/share/snigdhaos/licenses/"
pkgver=1
pkgrel=1
pkgdesc="Snigdha OS Config File"
arch=(
'any'
)
url="https://snigdhaos.org/"
license=('MIT')
makedepends=()
depends=()
conflicts=(
'snigdhaos-bootloader-grub-dev'
)
backup=()
provides=(
"${pkgname}"
"${pkgname}-dev"
)
options=(
!strip
!emptydirs
)
source=("$pkgname.tar.gz")
sha256sums=(
'SKIP'
)
install=$pkgname.install
pkgver() {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package(){
install -dm755 "$pkgdir/$_licensedir/$pkgname"
install -m644 "$srcdir/$pkgname/LICENSE" "$pkdir/$_licensedir/$pkgname"
install -dm755 "$pkgdir/$_destination1"
cp -r ${srcdir}/${pkgname}/${_destination1}/* ${pkgdir}/${_destination1}
}

View File

@@ -0,0 +1,15 @@
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = grub
Target = amd-ucode
Target = intel-ucode
Target = linux
Target = linux-lts*
Target = linux-zen*
[Action]
Description = Executing grub-install
When = PostTransaction
Exec = /usr/bin/grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=SnigdhaOS

View File

@@ -0,0 +1,15 @@
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = grub
Target = amd-ucode
Target = intel-ucode
Target = linux
Target = linux-lts*
Target = linux-zen*
[Action]
Description = Executing grub-mkconfig
When = PostTransaction
Exec = /bin/sh -c "grub-mkconfig -o /boot/grub/grub.cfg"

View File

@@ -0,0 +1,7 @@
post_install(){
echo -e "\n All the files has been installed on /etc/pacman.d/hooks/ \n"
}
post_upgrade(){
post_install
}

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Snigdha OS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,45 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-bootloader-systemd
org=Snigdha-OS
branch='master'
_destination1="/etc/pacman.d/hooks"
_licensedir="/usr/share/snigdhaos/licenses/"
pkgver=1
pkgrel=1
pkgdesc="Snigdha OS Config File"
arch=(
'any'
)
url="https://snigdhaos.org/"
license=('MIT')
makedepends=()
depends=()
conflicts=(
'snigdhaos-bootloader-systemd-dev'
)
backup=()
provides=(
'${pkgname}'
'${pkgname}-dev'
)
options=(
!strip
!emptydirs
)
source=("$pkgname.tar.gz")
sha256sums=(
'SKIP'
)
install=$pkgname.install
pkgver() {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package(){
install -dm755 "$pkgdir/$_licensedir/$pkgname"
install -m644 "$srcdir/$pkgname/LICENSE" "$pkdir/$_licensedir/$pkgname"
install -dm755 "$pkgdir/$_destination1"
cp -r ${srcdir}/${pkgname}/${_destination1}/* ${pkgdir}/${_destination1}
}

View File

@@ -0,0 +1,9 @@
[Trigger]
Type = Package
Operation = Upgrade
Target = systemd
[Action]
Description = Updating systemd-boot
When = PostTransaction
Exec = /usr/bin/systemctl restart systemd-boot-update.service

View File

@@ -0,0 +1,15 @@
[Trigger]
Operation = Install
Operation = Upgrade
Operation = Remove
Type = Path
Target = usr/src/*/dkms.conf
Target = usr/lib/modules/*/build/include/
Target = usr/lib/modules/*/modules.alias
Target = usr/lib/modules/*/vmlinuz
Target = usr/lib/modules/*/extramodules/*
[Action]
Description = Check for NVIDIA Config
When = PostTransaction
Exec = /usr/local/bin/snigdhaos-nvidia-dkms-check

View File

@@ -0,0 +1,7 @@
post_install(){
echo -e "\n All the files has been installed on /etc/pacman.d/hooks/ \n"
}
post_upgrade(){
post_install
}

View File

@@ -0,0 +1,32 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-calamares-config
_pkgname=snigdhaos-calamares-config
_destname="/etc/calamares"
_licensedir="/usr/share/snigdhaos/licenses/"
pkgver=1
pkgrel=1
pkgdesc="Snigdha OS calamares Config"
arch=('any')
url="https://github.com/Snigdha-OS/${_pkgname}"
license=('MIT')
makedepends=('git')
depends=()
conflicts=()
provides=("${pkgname}")
options=(!strip !emptydirs)
source=(${_pkgname}::"git+$url")
sha256sums=('SKIP')
install="${_pkgname}.install"
pkgver() {
cd "$srcdir/$pkgname" || exit
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
mkdir -p "${pkgdir}${_licensedir}${_pkgname}"
mv "${srcdir}/${_pkgname}/"LICENSE "${pkgdir}${_licensedir}${_pkgname}/LICENSE"
mkdir -p "${pkgdir}${_destname}"
cp -r "${srcdir}/${_pkgname}/calamares/"* "${pkgdir}${_destname}"
}

View File

@@ -0,0 +1,7 @@
post_install() {
echo -e "\n** The files have been installed in /etc/calamares **\n"
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,127 @@
#https://github.com/calamares/calamares/releases
#change prepare number too
pkgname=snigdhaos-calamares
_pkgname=calamares
pkgver=3.3.6
pkgrel=06
pkgdesc='Distribution-independent installer framework'
arch=('i686' 'x86_64')
license=(GPL)
url="https://github.com/calamares/calamares/releases"
license=('LGPL')
#'appstream-qt5' out as dependency and on iso
provides=('calamares')
depends=(
'boost-libs'
'ckbcomp'
'cryptsetup'
'doxygen'
'efibootmgr'
'gptfdisk'
'gtk-update-icon-cache'
'hwinfo'
'icu'
'kconfig'
'kcoreaddons'
'kcrash'
'ki18n'
'kparts'
'kpmcore'
'kservice'
'kwidgetsaddons'
'libpwquality'
'mkinitcpio-openswap'
'polkit-qt6'
'rsync'
'qt6-declarative'
'solid'
'squashfs-tools'
'yaml-cpp'
)
conflicts=()
makedepends=(
'boost'
'cmake'
'extra-cmake-modules'
'git'
'ninja'
'python-jsonschema'
'python-pyaml'
'python-unidecode'
'qt6-tools'
)
backup=('usr/share/calamares/modules/bootloader.conf'
'usr/share/calamares/modules/displaymanager.conf'
'usr/share/calamares/modules/initcpio.conf'
'usr/share/calamares/modules/unpackfs.conf')
source=("calamares::https://github.com/erikdubois/calamares/archive/refs/tags/$pkgver-$pkgrel.tar.gz"
"snigdhaos-calamares.desktop"
"snigdhaos-calamares-debug.desktop"
"calamares_polkit")
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP')
prepare() {
cp -rv ../modules/* ${srcdir}/$_pkgname-${pkgver}-${pkgrel}/src/modules/
sed -i -e 's/"Install configuration files" OFF/"Install configuration files" ON/' "$srcdir/${_pkgname}-${pkgver}-${pkgrel}/CMakeLists.txt"
sed -i -e "s/desired_size = 512 \* 1024 \* 1024 \# 512MiB/desired_size = 512 \* 1024 \* 1024 \* 4 \# 2048MiB/" "$srcdir/${_pkgname}-${pkgver}-${pkgrel}/src/modules/fstab/main.py"
cd ${_pkgname}-${pkgver}-${pkgrel}
sed -i -e "s|CALAMARES_VERSION 3.3.5|CALAMARES_VERSION $pkgver-$pkgrel|g" CMakeLists.txt
sed -i -e '/property real padding: 16;/d' "$srcdir/${_pkgname}-${pkgver}-${pkgrel}/src/qml/calamares-qt5/slideshow/Presentation.qml"
sed -i -e '/property real padding: 16;/d' "$srcdir/${_pkgname}-${pkgver}-${pkgrel}/src/qml/calamares-qt6/slideshow/Presentation.qml"
}
build() {
cd $_pkgname-$pkgver-${pkgrel}
cmake -S . -Bbuild \
-GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DWITH_APPSTREAM=OFF \
-DWITH_PYBIND11=OFF \
-DWITH_QT6=ON \
-DSKIP_MODULES="dracut \
dracutlukscfg \
dummycpp \
dummyprocess \
dummypython \
dummypythonqt \
initramfs \
initramfscfg \
interactiveterminal \
keyboardq \
license \
localeq \
oemid \
packagechooserq \
partitionq \
services-openrc \
services-systemd \
summaryq \
tracking \
usersq \
welcomeq \
zfs \
zfshostid"
cmake --build build
}
package() {
cd ${_pkgname}-${pkgver}-${pkgrel}/build
DESTDIR="${pkgdir}" cmake --build . --target install
install -Dm644 "$srcdir/snigdhaos-calamares.desktop" "$pkgdir/usr/share/applications/snigdhaos-calamares.desktop"
install -Dm644 "$srcdir/snigdhaos-calamares-debug.desktop" "$pkgdir/usr/share/applications/snigdhaos-calamares-debug.desktop"
install -Dm755 "$srcdir/calamares_polkit" "$pkgdir/usr/bin/calamares_polkit"
rm "$pkgdir/usr/share/applications/calamares.desktop"
}

View File

@@ -0,0 +1,6 @@
#!/bin/bash
if [ $(which pkexec) ]; then
pkexec --disable-internal-agent "/usr/bin/calamares" "$@"
else
/usr/bin/calamares "$@"
fi

View File

@@ -0,0 +1,39 @@
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
# SPDX-License-Identifier: GPL-3.0-or-later
---
$schema: https://json-schema.org/schema#
$id: https://calamares.io/schemas/displaymanager
additionalProperties: false
type: object
properties:
displaymanagers:
type: array
items:
type: string
enum: [slim, sddm, lightdm, gdm, mdm, lxdm, greetd]
minItems: 1 # Must be non-empty, if present at all
defaultDesktopEnvironment:
type: object
properties:
executable: { type: string }
desktopFile: { type: string }
required: [ executable, desktopFile ]
basicSetup: { type: boolean, default: false }
sysconfigSetup: { type: boolean, default: false }
greetd:
type: object
properties:
greeter_user: { type: string }
greeter_group: { type: string }
greeter_css_location: { type: string }
additionalProperties: false
lightdm:
type: object
properties:
preferred_greeters: { type: array, items: { type: string } }
additionalProperties: false
sddm:
type: object
properties:
configuration_file: { type: string }
additionalProperties: false

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
---
type: "job"
name: "displaymanager"
interface: "python"
script: "main.py"

View File

@@ -0,0 +1,3 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
rootMountPoint: /tmp

View File

@@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
#
# We have tests to load (some) of the DMs specifically, to test their
# configuration code. Those tests conventionally live in Python
# files here in the tests/ directory. Add them.
foreach(_dmname greetd sddm)
add_test(
NAME configure-displaymanager-${_dmname}
COMMAND env PYTHONPATH=.: python3 ${CMAKE_CURRENT_LIST_DIR}/test-dm-${_dmname}.py
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
endforeach()

View File

@@ -0,0 +1,33 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
#
# Calamares Boilerplate
import libcalamares
libcalamares.globalstorage = libcalamares.GlobalStorage(None)
libcalamares.globalstorage.insert("testing", True)
# Module prep-work
from src.modules.displaymanager import main
default_desktop_environment = main.DesktopEnvironment("startplasma-x11", "kde-plasma.desktop")
import os
os.makedirs("/tmp/etc/greetd/", exist_ok=True)
try:
os.remove("/tmp/etc/greetd/config.toml")
except FileNotFoundError as e:
pass
try:
import toml
except ImportError:
# This is a failure of the test-environment.
import sys
print("Can't find module toml.", file=sys.stderr)
sys.exit(0)
# Specific DM test
d = main.DMgreetd("/tmp")
d.set_autologin("d", True, default_desktop_environment)
# .. and again (this time checks load/save)
d.set_autologin("d", True, default_desktop_environment)
d.set_autologin("d", True, default_desktop_environment)

View File

@@ -0,0 +1,18 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
#
# Calamares Boilerplate
import libcalamares
libcalamares.globalstorage = libcalamares.GlobalStorage(None)
libcalamares.globalstorage.insert("testing", True)
# Module prep-work
from src.modules.displaymanager import main
default_desktop_environment = main.DesktopEnvironment("startplasma-x11", "kde-plasma.desktop")
# Specific DM test
d = main.DMsddm("/tmp")
d.set_autologin("d", True, default_desktop_environment)
# .. and again (this time checks load/save)
d.set_autologin("d", True, default_desktop_environment)
d.set_autologin("d", True, default_desktop_environment)

View File

@@ -0,0 +1,819 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# === This file is part of Calamares - <https://calamares.io> ===
#
# SPDX-FileCopyrightText: 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
# SPDX-FileCopyrightText: 2015-2017 Teo Mrnjavac <teo@kde.org>
# SPDX-FileCopyrightText: 2016-2017 Kyle Robbertze <kyle@aims.ac.za>
# SPDX-FileCopyrightText: 2017 Alf Gaida <agaida@siduction.org>
# SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
# SPDX-FileCopyrightText: 2018 Philip Müller <philm@manjaro.org>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Calamares is Free Software: see the License-Identifier above.
#
import abc
from string import Template
import subprocess
import libcalamares
from libcalamares.utils import check_target_env_call, target_env_call
from libcalamares.utils import gettext_path, gettext_languages
import gettext
_translation = gettext.translation("calamares-python",
localedir=gettext_path(),
languages=gettext_languages(),
fallback=True)
_ = _translation.gettext
_n = _translation.ngettext
total_packages = 0 # For the entire job
completed_packages = 0 # Done so far for this job
group_packages = 0 # One group of packages from an -install or -remove entry
# A PM object may set this to a string (take care of translations!)
# to override the string produced by pretty_status_message()
custom_status_message = None
INSTALL = object()
REMOVE = object()
mode_packages = None # Changes to INSTALL or REMOVE
def _change_mode(mode):
global mode_packages
mode_packages = mode
libcalamares.job.setprogress(completed_packages * 1.0 / total_packages)
def pretty_name():
return _("Install packages.")
def pretty_status_message():
if custom_status_message is not None:
return custom_status_message
if not group_packages:
if (total_packages > 0):
# Outside the context of an operation
s = _("Processing packages (%(count)d / %(total)d)")
else:
s = _("Install packages.")
elif mode_packages is INSTALL:
s = _n("Installing one package.",
"Installing %(num)d packages.", group_packages)
elif mode_packages is REMOVE:
s = _n("Removing one package.",
"Removing %(num)d packages.", group_packages)
else:
# No mode, generic description
s = _("Install packages.")
return s % {"num": group_packages,
"count": completed_packages,
"total": total_packages}
class PackageManager(metaclass=abc.ABCMeta):
"""
Package manager base class. A subclass implements package management
for a specific backend, and must have a class property `backend`
with the string identifier for that backend.
Subclasses are collected below to populate the list of possible
backends.
"""
backend = None
@abc.abstractmethod
def install(self, pkgs, from_local=False):
"""
Install a list of packages (named) into the system.
Although this handles lists, in practice it is called
with one package at a time.
@param pkgs: list[str]
list of package names
@param from_local: bool
if True, then these are local packages (on disk) and the
pkgs names are paths.
"""
pass
@abc.abstractmethod
def remove(self, pkgs):
"""
Removes packages.
@param pkgs: list[str]
list of package names
"""
pass
@abc.abstractmethod
def update_db(self):
pass
def run(self, script):
if script != "":
check_target_env_call(script.split(" "))
def install_package(self, packagedata, from_local=False):
"""
Install a package from a single entry in the install list.
This can be either a single package name, or an object
with pre- and post-scripts. If @p packagedata is a dict,
it is assumed to follow the documented structure.
@param packagedata: str|dict
@param from_local: bool
see install.from_local
"""
if isinstance(packagedata, str):
self.install([packagedata], from_local=from_local)
else:
self.run(packagedata["pre-script"])
self.install([packagedata["package"]], from_local=from_local)
self.run(packagedata["post-script"])
def remove_package(self, packagedata):
"""
Remove a package from a single entry in the remove list.
This can be either a single package name, or an object
with pre- and post-scripts. If @p packagedata is a dict,
it is assumed to follow the documented structure.
@param packagedata: str|dict
"""
if isinstance(packagedata, str):
self.remove([packagedata])
else:
self.run(packagedata["pre-script"])
self.remove([packagedata["package"]])
self.run(packagedata["post-script"])
def operation_install(self, package_list, from_local=False):
"""
Installs the list of packages named in @p package_list .
These can be strings -- plain package names -- or
structures (with a pre- and post-install step).
This operation is called for "critical" packages,
which are expected to succeed, or fail, all together.
However, if there are packages with pre- or post-scripts,
then packages are installed one-by-one instead.
NOTE: package managers may reimplement this method
NOTE: exceptions are expected to leave this method, to indicate
failure of the installation.
"""
if all([isinstance(x, str) for x in package_list]):
self.install(package_list, from_local=from_local)
else:
for package in package_list:
self.install_package(package, from_local=from_local)
def operation_try_install(self, package_list):
"""
Installs the list of packages named in @p package_list .
These can be strings -- plain package names -- or
structures (with a pre- and post-install step).
This operation is called for "non-critical" packages,
which can succeed or fail without affecting the overall installation.
Packages are installed one-by-one to support package managers
that do not have a "install as much as you can" mode.
NOTE: package managers may reimplement this method
NOTE: no package-installation exceptions should be raised
"""
# we make a separate package manager call for each package so a
# single failing package won't stop all of them
for package in package_list:
try:
self.install_package(package)
except subprocess.CalledProcessError:
libcalamares.utils.warning("Could not install package %s" % package)
def operation_remove(self, package_list):
"""
Removes the list of packages named in @p package_list .
These can be strings -- plain package names -- or
structures (with a pre- and post-install step).
This operation is called for "critical" packages, which are
expected to succeed or fail all together.
However, if there are packages with pre- or post-scripts,
then packages are removed one-by-one instead.
NOTE: package managers may reimplement this method
NOTE: exceptions should be raised to indicate failure
"""
if all([isinstance(x, str) for x in package_list]):
self.remove(package_list)
else:
for package in package_list:
self.remove_package(package)
def operation_try_remove(self, package_list):
"""
Same relation as try_install has to install, except it removes
packages instead. Packages are removed one-by-one.
NOTE: package managers may reimplement this method
NOTE: no package-installation exceptions should be raised
"""
for package in package_list:
try:
self.remove_package(package)
except subprocess.CalledProcessError:
libcalamares.utils.warning("Could not remove package %s" % package)
### PACKAGE MANAGER IMPLEMENTATIONS
#
# Keep these alphabetical (presumably both by class name and backend name),
# even the Dummy implementation.
#
class PMApk(PackageManager):
backend = "apk"
def install(self, pkgs, from_local=False):
for pkg in pkgs:
check_target_env_call(["apk", "add", pkg])
def remove(self, pkgs):
for pkg in pkgs:
check_target_env_call(["apk", "del", pkg])
def update_db(self):
check_target_env_call(["apk", "update"])
def update_system(self):
check_target_env_call(["apk", "upgrade", "--available"])
class PMApt(PackageManager):
backend = "apt"
def install(self, pkgs, from_local=False):
check_target_env_call(["apt-get", "-q", "-y", "install"] + pkgs)
def remove(self, pkgs):
check_target_env_call(["apt-get", "--purge", "-q", "-y",
"remove"] + pkgs)
check_target_env_call(["apt-get", "--purge", "-q", "-y",
"autoremove"])
def update_db(self):
check_target_env_call(["apt-get", "update"])
def update_system(self):
# Doesn't need to update the system explicitly
pass
class PMDnf(PackageManager):
"""
This is "legacy" DNF, called DNF-4 even though the
executable is dnf-3 in modern Fedora. Executable dnf
is a symlink to dnf-3 in systems that use it.
"""
backend = "dnf"
def install(self, pkgs, from_local=False):
check_target_env_call(["dnf-3", "-y", "install"] + pkgs)
def remove(self, pkgs):
# ignore the error code for now because dnf thinks removing a
# nonexistent package is an error
target_env_call(["dnf-3", "--disablerepo=*", "-C", "-y",
"remove"] + pkgs)
def update_db(self):
# Doesn't need updates
pass
def update_system(self):
check_target_env_call(["dnf-3", "-y", "upgrade"])
class PMDnf5(PackageManager):
"""
This is "modern" DNF, DNF-5 which is for Fedora 41 (presumably)
and later. Executable dnf is a symlink to dnf5 in systems that use it.
"""
backend = "dnf5"
def install(self, pkgs, from_local=False):
check_target_env_call(["dnf5", "-y", "install"] + pkgs)
def remove(self, pkgs):
# ignore the error code for now because dnf thinks removing a
# nonexistent package is an error
target_env_call(["dnf5", "--disablerepo=*", "-C", "-y",
"remove"] + pkgs)
def update_db(self):
# Doesn't need updates
pass
def update_system(self):
check_target_env_call(["dnf5", "-y", "upgrade"])
class PMDummy(PackageManager):
backend = "dummy"
def install(self, pkgs, from_local=False):
from time import sleep
libcalamares.utils.debug("Dummy backend: Installing " + str(pkgs))
sleep(3)
def remove(self, pkgs):
from time import sleep
libcalamares.utils.debug("Dummy backend: Removing " + str(pkgs))
sleep(3)
def update_db(self):
libcalamares.utils.debug("Dummy backend: Updating DB")
def update_system(self):
libcalamares.utils.debug("Dummy backend: Updating System")
def run(self, script):
libcalamares.utils.debug("Dummy backend: Running script '" + str(script) + "'")
class PMEntropy(PackageManager):
backend = "entropy"
def install(self, pkgs, from_local=False):
check_target_env_call(["equo", "i"] + pkgs)
def remove(self, pkgs):
check_target_env_call(["equo", "rm"] + pkgs)
def update_db(self):
check_target_env_call(["equo", "update"])
def update_system(self):
# Doesn't need to update the system explicitly
pass
class PMFlatpak(PackageManager):
backend = "flatpak"
def install(self, pkgs, from_local=False):
check_target_env_call(["flatpak", "install", "--assumeyes"] + pkgs)
def remove(self, pkgs):
check_target_env_call(["flatpak", "uninstall", "--noninteractive"] + pkgs)
def update_db(self):
pass
def update_system(self):
# Doesn't need to update the system explicitly
pass
class PMLuet(PackageManager):
backend = "luet"
def install(self, pkgs, from_local=False):
check_target_env_call(["luet", "install", "-y"] + pkgs)
def remove(self, pkgs):
check_target_env_call(["luet", "uninstall", "-y"] + pkgs)
def update_db(self):
# Luet checks for DB update everytime its ran.
pass
def update_system(self):
check_target_env_call(["luet", "upgrade", "-y"])
class PMPackageKit(PackageManager):
backend = "packagekit"
def install(self, pkgs, from_local=False):
for pkg in pkgs:
check_target_env_call(["pkcon", "-py", "install", pkg])
def remove(self, pkgs):
for pkg in pkgs:
check_target_env_call(["pkcon", "-py", "remove", pkg])
def update_db(self):
check_target_env_call(["pkcon", "refresh"])
def update_system(self):
check_target_env_call(["pkcon", "-py", "update"])
class PMPacman(PackageManager):
backend = "pacman"
def __init__(self):
import re
progress_match = re.compile("^\\((\\d+)/(\\d+)\\)")
def line_cb(line):
if line.startswith(":: "):
self.in_package_changes = "package" in line or "hooks" in line
else:
if self.in_package_changes and line.endswith("...\n"):
# Update the message, untranslated; do not change the
# progress percentage, since there may be more "installing..."
# lines in the output for the group, than packages listed
# explicitly. We don't know how to calculate proper progress.
global custom_status_message
custom_status_message = "pacman: " + line.strip()
libcalamares.job.setprogress(self.progress_fraction)
libcalamares.utils.debug(line)
self.in_package_changes = False
self.line_cb = line_cb
pacman = libcalamares.job.configuration.get("pacman", None)
if pacman is None:
pacman = dict()
if type(pacman) is not dict:
libcalamares.utils.warning("Job configuration *pacman* will be ignored.")
pacman = dict()
self.pacman_num_retries = pacman.get("num_retries", 0)
self.pacman_disable_timeout = pacman.get("disable_download_timeout", False)
self.pacman_needed_only = pacman.get("needed_only", False)
def reset_progress(self):
self.in_package_changes = False
# These are globals
self.progress_fraction = (completed_packages * 1.0 / total_packages)
def run_pacman(self, command, callback=False):
"""
Call pacman in a loop until it is successful or the number of retries is exceeded
:param command: The pacman command to run
:param callback: An optional boolean that indicates if this pacman run should use the callback
:return:
"""
pacman_count = 0
while pacman_count <= self.pacman_num_retries:
pacman_count += 1
try:
if False: # callback:
libcalamares.utils.target_env_process_output(command, self.line_cb)
else:
libcalamares.utils.target_env_process_output(command)
return
except subprocess.CalledProcessError:
if pacman_count <= self.pacman_num_retries:
pass
else:
raise
def install(self, pkgs, from_local=False):
command = ["pacman"]
if from_local:
command.append("-U")
else:
command.append("-S")
# Don't ask for user intervention, take the default action
command.append("--noconfirm")
# Don't report download progress for each file
command.append("--noprogressbar")
if self.pacman_needed_only is True:
command.append("--needed")
command.append("--ask=4")
if self.pacman_disable_timeout is True:
command.append("--disable-download-timeout")
command += pkgs
self.reset_progress()
self.run_pacman(command, True)
def remove(self, pkgs):
self.reset_progress()
self.run_pacman(["pacman", "-Rs", "--noconfirm"] + pkgs, True)
def update_db(self):
self.run_pacman(["pacman", "-Sy"])
def update_system(self):
self.run_pacman(["pacman", "-S", "archlinux-keyring", "--noconfirm"])
command = ["pacman", "-Su", "--noconfirm"]
if self.pacman_disable_timeout is True:
command.append("--disable-download-timeout")
self.run_pacman(command)
class PMPamac(PackageManager):
backend = "pamac"
def del_db_lock(self, lock="/var/lib/pacman/db.lck"):
# In case some error or crash, the database will be locked,
# resulting in remaining packages not being installed.
check_target_env_call(["rm", "-f", lock])
def install(self, pkgs, from_local=False):
self.del_db_lock()
check_target_env_call([self.backend, "install", "--no-confirm"] + pkgs)
def remove(self, pkgs):
self.del_db_lock()
check_target_env_call([self.backend, "remove", "--no-confirm"] + pkgs)
def update_db(self):
self.del_db_lock()
check_target_env_call([self.backend, "update", "--no-confirm"])
def update_system(self):
self.del_db_lock()
check_target_env_call([self.backend, "upgrade", "--no-confirm"])
class PMPisi(PackageManager):
backend = "pisi"
def install(self, pkgs, from_local=False):
check_target_env_call(["pisi", "install" "-y"] + pkgs)
def remove(self, pkgs):
check_target_env_call(["pisi", "remove", "-y"] + pkgs)
def update_db(self):
check_target_env_call(["pisi", "update-repo"])
def update_system(self):
# Doesn't need to update the system explicitly
pass
class PMPortage(PackageManager):
backend = "portage"
def install(self, pkgs, from_local=False):
check_target_env_call(["emerge", "-v"] + pkgs)
def remove(self, pkgs):
check_target_env_call(["emerge", "-C"] + pkgs)
check_target_env_call(["emerge", "--depclean", "-q"])
def update_db(self):
check_target_env_call(["emerge", "--sync"])
def update_system(self):
# Doesn't need to update the system explicitly
pass
class PMXbps(PackageManager):
backend = "xbps"
def install(self, pkgs, from_local=False):
check_target_env_call(["xbps-install", "-Sy"] + pkgs)
def remove(self, pkgs):
check_target_env_call(["xbps-remove", "-Ry", "--noconfirm"] + pkgs)
def update_db(self):
check_target_env_call(["xbps-install", "-S"])
def update_system(self):
check_target_env_call(["xbps", "-Suy"])
class PMYum(PackageManager):
backend = "yum"
def install(self, pkgs, from_local=False):
check_target_env_call(["yum", "-y", "install"] + pkgs)
def remove(self, pkgs):
check_target_env_call(["yum", "--disablerepo=*", "-C", "-y",
"remove"] + pkgs)
def update_db(self):
# Doesn't need updates
pass
def update_system(self):
check_target_env_call(["yum", "-y", "upgrade"])
class PMZypp(PackageManager):
backend = "zypp"
def install(self, pkgs, from_local=False):
check_target_env_call(["zypper", "--non-interactive",
"--quiet-install", "install",
"--auto-agree-with-licenses",
"install"] + pkgs)
def remove(self, pkgs):
check_target_env_call(["zypper", "--non-interactive",
"remove"] + pkgs)
def update_db(self):
check_target_env_call(["zypper", "--non-interactive", "update"])
def update_system(self):
# Doesn't need to update the system explicitly
pass
# Collect all the subclasses of PackageManager defined above,
# and index them based on the backend property of each class.
backend_managers = [
(c.backend, c)
for c in globals().values()
if type(c) is abc.ABCMeta and issubclass(c, PackageManager) and c.backend]
def subst_locale(plist):
"""
Returns a locale-aware list of packages, based on @p plist.
Package names that contain LOCALE are localized with the
BCP47 name of the chosen system locale; if the system
locale is 'en' (e.g. English, US) then these localized
packages are dropped from the list.
@param plist: list[str|dict]
Candidate packages to install.
@return: list[str|dict]
"""
locale = libcalamares.globalstorage.value("locale")
if not locale:
# It is possible to skip the locale-setting entirely.
# Then pretend it is "en", so that {LOCALE}-decorated
# package names are removed from the list.
locale = "en"
ret = []
for packagedata in plist:
if isinstance(packagedata, str):
packagename = packagedata
else:
packagename = packagedata["package"]
# Update packagename: substitute LOCALE, and drop packages
# if locale is en and LOCALE is in the package name.
if locale != "en":
packagename = Template(packagename).safe_substitute(LOCALE=locale)
elif 'LOCALE' in packagename:
packagename = None
if packagename is not None:
# Put it back in packagedata
if isinstance(packagedata, str):
packagedata = packagename
else:
packagedata["package"] = packagename
ret.append(packagedata)
return ret
def run_operations(pkgman, entry):
"""
Call package manager with suitable parameters for the given
package actions.
:param pkgman: PackageManager
This is the manager that does the actual work.
:param entry: dict
Keys are the actions -- e.g. "install" -- to take, and the values
are the (list of) packages to apply the action to. The actions are
not iterated in a specific order, so it is recommended to use only
one action per dictionary. The list of packages may be package
names (strings) or package information dictionaries with pre-
and post-scripts.
"""
global group_packages, completed_packages, mode_packages
for key in entry.keys():
package_list = subst_locale(entry[key])
group_packages = len(package_list)
if key == "install":
_change_mode(INSTALL)
pkgman.operation_install(package_list)
elif key == "try_install":
_change_mode(INSTALL)
pkgman.operation_try_install(package_list)
elif key == "remove":
_change_mode(REMOVE)
pkgman.operation_remove(package_list)
elif key == "try_remove":
_change_mode(REMOVE)
pkgman.operation_try_remove(package_list)
elif key == "localInstall":
_change_mode(INSTALL)
pkgman.operation_install(package_list, from_local=True)
elif key == "source":
libcalamares.utils.debug("Package-list from {!s}".format(entry[key]))
else:
libcalamares.utils.warning("Unknown package-operation key {!s}".format(key))
completed_packages += len(package_list)
libcalamares.job.setprogress(completed_packages * 1.0 / total_packages)
libcalamares.utils.debug("Pretty name: {!s}, setting progress..".format(pretty_name()))
group_packages = 0
_change_mode(None)
def run():
"""
Calls routine with detected package manager to install locale packages
or remove drivers not needed on the installed system.
:return:
"""
global mode_packages, total_packages, completed_packages, group_packages
backend = libcalamares.job.configuration.get("backend")
for identifier, impl in backend_managers:
if identifier == backend:
pkgman = impl()
break
else:
return "Bad backend", "backend=\"{}\"".format(backend)
skip_this = libcalamares.job.configuration.get("skip_if_no_internet", False)
if skip_this and not libcalamares.globalstorage.value("hasInternet"):
libcalamares.utils.warning( "Package installation has been skipped: no internet" )
return None
update_db = libcalamares.job.configuration.get("update_db", False)
if update_db and libcalamares.globalstorage.value("hasInternet"):
try:
pkgman.update_db()
except subprocess.CalledProcessError as e:
libcalamares.utils.warning(str(e))
libcalamares.utils.debug("stdout:" + str(e.stdout))
libcalamares.utils.debug("stderr:" + str(e.stderr))
return (_("Package Manager error"),
_("The package manager could not prepare updates. The command <pre>{!s}</pre> returned error code {!s}.")
.format(e.cmd, e.returncode))
update_system = libcalamares.job.configuration.get("update_system", False)
if update_system and libcalamares.globalstorage.value("hasInternet"):
try:
pkgman.update_system()
except subprocess.CalledProcessError as e:
libcalamares.utils.warning(str(e))
libcalamares.utils.debug("stdout:" + str(e.stdout))
libcalamares.utils.debug("stderr:" + str(e.stderr))
return (_("Package Manager error"),
_("The package manager could not update the system. The command <pre>{!s}</pre> returned error code {!s}.")
.format(e.cmd, e.returncode))
operations = libcalamares.job.configuration.get("operations", [])
if libcalamares.globalstorage.contains("packageOperations"):
operations += libcalamares.globalstorage.value("packageOperations")
mode_packages = None
total_packages = 0
completed_packages = 0
for op in operations:
for packagelist in op.values():
total_packages += len(subst_locale(packagelist))
if not total_packages:
# Avoids potential divide-by-zero in progress reporting
return None
for entry in operations:
group_packages = 0
libcalamares.utils.debug(pretty_name())
try:
run_operations(pkgman, entry)
except subprocess.CalledProcessError as e:
libcalamares.utils.warning(str(e))
libcalamares.utils.debug("stdout:" + str(e.stdout))
libcalamares.utils.debug("stderr:" + str(e.stderr))
return (_("Package Manager error"),
_("The package manager could not make changes to the installed system. The command <pre>{!s}</pre> returned error code {!s}.")
.format(e.cmd, e.returncode))
mode_packages = None
libcalamares.job.setprogress(1.0)
return None

View File

@@ -0,0 +1,7 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
---
type: "job"
name: "packages"
interface: "python"
script: "main.py"

View File

@@ -0,0 +1,54 @@
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
# SPDX-License-Identifier: GPL-3.0-or-later
---
$schema: https://json-schema.org/schema#
$id: https://calamares.io/schemas/packages
additionalProperties: false
type: object
properties:
backend:
type: string
enum:
- apk
- apt
- dnf
- dnf5
- entropy
- luet
- packagekit
- pacman
- pamac
- portage
- yum
- zypp
- dummy
update_db: { type: boolean, default: true }
update_system: { type: boolean, default: false }
skip_if_no_internet: { type: boolean, default: false }
pacman:
additionalProperties: false
type: object
properties:
num_retries: { type: integer, default: 0 }
disable_download_timeout: { type: boolean, default: false }
needed_only: { type: boolean, default: false }
operations:
type: array
items:
additionalProperties: false
type: object
properties:
# TODO: these are either-string-or-struct items,
# need their own little schema.
install: { type: array }
remove: { type: array }
try_install: { type: array }
try_remove: { type: array }
localInstall: { type: array }
source: { type: string }
required: [ backend ]

View File

@@ -0,0 +1,3 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
rootMountPoint: /tmp

View File

@@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
backend: dummy
operations:
- install:
- pre-script: touch /tmp/foo
package: vi
post-script: rm /tmp/foo
- wget
- binutils
- remove:
- vi
- wget

View File

@@ -0,0 +1,46 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
#
# We have tests to load (some) of the package-managers specifically, to
# test their configuration code and implementation. Those tests conventionally
# live in Python files here in the tests/ directory. Add them.
# Pacman (Arch) tests
set(_pm pacman)
add_test(
NAME configure-packages-${_pm}
COMMAND env PYTHONPATH=.: python3 ${CMAKE_CURRENT_LIST_DIR}/test-pm-${_pm}.py
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
add_test(
NAME configure-packages-${_pm}-ops-1
COMMAND
env PYTHONPATH=.: python3 ${CMAKE_CURRENT_LIST_DIR}/test-pm-${_pm}.py ${CMAKE_CURRENT_LIST_DIR}/pm-pacman-1.yaml
4 1 1
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
add_test(
NAME configure-packages-${_pm}-ops-2
COMMAND
env PYTHONPATH=.: python3 ${CMAKE_CURRENT_LIST_DIR}/test-pm-${_pm}.py ${CMAKE_CURRENT_LIST_DIR}/pm-pacman-2.yaml
3 0 0
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
if(BUILD_TESTING AND BUILD_SCHEMA_TESTING AND Python_Interpreter_FOUND)
set(_module packages)
set(_schema_file "${CMAKE_CURRENT_SOURCE_DIR}/${_module}/${_module}.schema.yaml")
message(STATUS "Schema ${_schema_file}")
foreach(_cf pm-pacman-1.yaml pm-pacman-2.yaml)
set(_conf_file "${CMAKE_CURRENT_SOURCE_DIR}/${_module}/tests/${_cf}")
if(EXISTS "${_schema_file}" AND EXISTS "${_conf_file}")
add_test(
NAME validate-packages-${_cf}
COMMAND
${Python_EXECUTABLE} "${CMAKE_SOURCE_DIR}/ci/configvalidator.py" "${_schema_file}" "${_conf_file}"
)
else()
message(FATAL_ERROR "Missing ${_conf_file}")
endif()
endforeach()
endif()

View File

@@ -0,0 +1,10 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
backend: pacman
operations: []
pacman:
num_retries: 4
disable_download_timeout: true
needed_only: true

View File

@@ -0,0 +1,9 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
backend: pacman
operations: []
# Leave some things unspecified
pacman:
num_retries: 3

View File

@@ -0,0 +1,36 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
#
# Calamares Boilerplate
import libcalamares
libcalamares.globalstorage = libcalamares.GlobalStorage(None)
libcalamares.globalstorage.insert("testing", True)
# Module prep-work
from src.modules.packages import main
# .. we don't have a job in this test, so fake one
class Job(object):
def __init__(self, filename):
self.configuration = libcalamares.utils.load_yaml(filename) if filename is not None else dict()
import sys
if len(sys.argv) > 4:
filename = sys.argv[1]
retry = int(sys.argv[2])
timeout = bool(int(sys.argv[3]))
needed = bool(int(sys.argv[4]))
else:
filename = None
retry = 0
timeout = False
needed = False
libcalamares.utils.warning("Expecting {!s} retry={!s} timeout={!s} needed={!s}".format(filename, retry, timeout, needed))
# Specific PM test
libcalamares.job = Job(filename)
p = main.PMPacman()
assert p.pacman_num_retries == retry, "{!r} vs {!r}".format(p.pacman_num_retries, retry)
assert p.pacman_disable_timeout == timeout, "{!r} vs {!r}".format(p.pacman_disable_timeout, timeout)
assert p.pacman_needed_only == needed, "{!r} vs {!r}".format(p.pacman_needed_only, needed)

View File

@@ -0,0 +1,99 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# === This file is part of Calamares - <http://github.com/calamares> ===
#
# Copyright 2014 - 2019, Philip Müller <philm@manjaro.org>
# Copyright 2016, Artoo <artoo@manjaro.org>
#
# Calamares 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 3 of the License, or
# (at your option) any later version.
#
# Calamares 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 Calamares. If not, see <http://www.gnu.org/licenses/>.
import libcalamares
import subprocess
from shutil import copy2
from distutils.dir_util import copy_tree
from os.path import join, exists
from libcalamares.utils import target_env_call
class ConfigController:
def __init__(self):
self.__root = libcalamares.globalstorage.value("rootMountPoint")
self.__keyrings = libcalamares.job.configuration.get('keyrings', [])
@property
def root(self):
return self.__root
@property
def keyrings(self):
return self.__keyrings
def init_keyring(self):
target_env_call(["pacman-key", "--init"])
def populate_keyring(self):
target_env_call(["pacman-key", "--populate"] + self.keyrings)
def terminate(self, proc):
target_env_call(['killall', '-9', proc])
def copy_file(self, file):
if exists("/" + file):
copy2("/" + file, join(self.root, file))
def copy_folder(self, source, target):
if exists("/" + source):
copy_tree("/" + source, join(self.root, target))
def remove_pkg(self, pkg, path):
if exists(join(self.root, path)):
target_env_call(['pacman', '-R', '--noconfirm', pkg])
def umount(self, mp):
subprocess.call(["umount", "-l", join(self.root, mp)])
def mount(self, mp):
subprocess.call(["mount", "-B", "/" + mp, join(self.root, mp)])
def rmdir(self, dir):
subprocess.call(["rm", "-Rf", join(self.root, dir)])
def mkdir(self, dir):
subprocess.call(["mkdir", "-p", join(self.root, dir)])
def run(self):
# ucode
cpu_ucode = subprocess.getoutput("hwinfo --cpu | grep Vendor: -m1 | cut -d\'\"\' -f2")
if cpu_ucode == "AuthenticAMD":
#target_env_call(["pacman", "-S", "amd-ucode", "--noconfirm"])
target_env_call(["pacman", "-R", "intel-ucode", "--noconfirm"])
elif cpu_ucode == "GenuineIntel":
#target_env_call(["pacman", "-S", "intel-ucode", "--noconfirm"])
target_env_call(["pacman", "-R", "amd-ucode", "--noconfirm"])
if exists(join(self.root, "usr/bin/snapper")):
target_env_call(["snapper", "-c", "root", "--no-dbus", "create-config", "/"])
target_env_call(["btrfs", "subvolume", "create", "/.snapshots"])
target_env_call(["chmod", "a+rx", "/.snapshots"])
target_env_call(["chown", ":users", "/.snapshots"])
def run():
""" Post installation configurations """
config = ConfigController()
return config.run()

View File

@@ -0,0 +1,6 @@
# Syntax is YAML 1.2
---
type: "job"
name: "ucode"
interface: "python"
script: "main.py" #assumed relative to the current directory

View File

@@ -0,0 +1,240 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=Install Snigdha OS Debug
Comment=Installer for Snigdha OS debug
GenericName=System Installer
Keywords=calamares;system;installer;
TryExec=/usr/bin/calamares_polkit %f -d -style breeze
Exec=/usr/bin/calamares_polkit %f -d -style breeze
Icon=snigdhaos-calamares
Terminal=false
Type=Application
StartupNotify=true
Categories=GTK;Settings;Security;X-GNOME-Settings-Panel;X-GNOME-SystemSettings;X-Unity-Settings-Panel;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;Utility;System;Filesystem;GNOME;Qt;KDE;
X-AppStream-Ignore=true
Name[ar]=تثبيت النظام
Icon[ar]=كالامارس
GenericName[ar]=مثبت النظام
Comment[ar]=كالامارس - مثبت النظام
Name[as]=চিছটেম ইনস্তল কৰক
Icon[as]=কেলামাৰেচ
GenericName[as]=চিছটেম ইনস্তলাৰ
Comment[as]=কেলামাৰেচ — চিছটেম​ ইনস্তলাৰ
Name[az]=Sistemi Quraşdırmaq
Icon[az]=calamares
GenericName[az]=Sistem Quraşdırıcısı
Comment[az]=Calamares Sistem Quraşdırıcısı
Name[be]=Усталяваць сістэму
Icon[be]=calamares
GenericName[be]=Усталёўшчык сістэмы
Comment[be]=Calamares — усталёўшчык сістэмы
Name[bg]=Инсталирай системата
Icon[bg]=calamares
GenericName[bg]=Системен Инсталатор
Comment[bg]=Calamares — Системен Инсталатор
Name[bn]=সিস্টেম ইনস্টল করুন
Icon[bn]=ক্যালামারেস
GenericName[bn]=সিস্টেম ইনস্টলার
Comment[bn]=ক্যালামারেস - সিস্টেম ইনস্টলার
Name[ca]=Instal·la el sistema
Icon[ca]=calamares
GenericName[ca]=Instal·lador de sistema
Comment[ca]=Calamares — Instal·lador de sistema
Name[da]=Installér system
Icon[da]=calamares
GenericName[da]=Systeminstallationsprogram
Comment[da]=Calamares — Systeminstallationsprogram
Name[de]=System installieren
Icon[de]=calamares
GenericName[de]=Installation des Betriebssystems
Comment[de]=Calamares - Installation des Betriebssystems
Name[el]=Εγκατάσταση συστήματος
Icon[el]=calamares
GenericName[el]=Εγκατάσταση συστήματος
Comment[el]=Calamares — Εγκατάσταση συστήματος
Name[en_GB]=Install System
Icon[en_GB]=calamares
GenericName[en_GB]=System Installer
Comment[en_GB]=Calamares — System Installer
Name[es]=Instalar Sistema
Icon[es]=calamares
GenericName[es]=Instalador del Sistema
Comment[es]=Calamares — Instalador del Sistema
Name[et]=Paigalda süsteem
Icon[et]=calamares
GenericName[et]=Süsteemipaigaldaja
Comment[et]=Calamares — süsteemipaigaldaja
Name[eu]=Sistema instalatu
Icon[eu]=calamares
GenericName[eu]=Sistema instalatzailea
Comment[eu]=Calamares - sistema instalatzailea
Name[fa]=نصب سامانه
Icon[fa]=کالامارس
GenericName[fa]=نصب‌کنندهٔ سامانه
Comment[fa]=کالامارس — نصب‌کنندهٔ سامانه
Name[es_PR]=Instalar el sistema
Name[fr]=Installer le système
Icon[fr]=calamares
GenericName[fr]=Installateur système
Comment[fr]=Calamares - Installateur système
Name[fur]=Instale il sisteme
Icon[fur]=calamares
GenericName[fur]=Program di instalazion dal sisteme
Comment[fur]=Calamares — Program di instalazion dal sisteme
Name[gl]=Instalación do Sistema
Icon[gl]=calamares
GenericName[gl]=Instalador de sistemas
Comment[gl]=Calamares — Instalador de sistemas
Name[he]=התקנת מערכת
Icon[he]=calamares
GenericName[he]=אשף התקנה
Comment[he]=Calamares - אשף התקנה
Name[hi]=सिस्टम इंस्टॉल करें
Icon[hi]=calamares
GenericName[hi]=सिस्टम इंस्टॉलर
Comment[hi]=Calamares — सिस्टम इंस्टॉलर
Name[hr]=Instaliraj sustav
Icon[hr]=calamares
GenericName[hr]=Instalacija sustava
Comment[hr]=Calamares — Instalacija sustava
Name[ie]=Installar li sistema
Icon[ie]=calamares
GenericName[ie]=Installator del sistema
Comment[ie]=Calamares — Installator del sistema
Name[hu]=Rendszer telepítése
Icon[hu]=calamares
GenericName[hu]=Rendszertelepítő
Comment[hu]=Calamares Rendszertelepítő
Name[id]=Instal Sistem
Icon[id]=calamares
GenericName[id]=Pemasang
Comment[id]=Calamares — Pemasang Sistem
Name[is]=Setja upp kerfið
Icon[is]=calamares
GenericName[is]=Kerfis uppsetning
Comment[is]=Calamares — Kerfis uppsetning
Name[cs_CZ]=Nainstalovat systém
Icon[cs_CZ]=calamares
GenericName[cs_CZ]=Instalátor systému
Comment[cs_CZ]=Calamares instalátor operačních systémů
Name[ja]=システムをインストール
Icon[ja]=calamares
GenericName[ja]=システムインストーラー
Comment[ja]=Calamares — システムインストーラー
Name[ko]=시스템 설치
Icon[ko]=깔라마레스
GenericName[ko]=시스템 설치 관리자
Comment[ko]=깔라마레스 — 시스템 설치 관리자
Name[lt]=Įdiegti Sistemą
Icon[lt]=calamares
GenericName[lt]=Sistemos diegimas į kompiuterį
Comment[lt]=Calamares — Sistemos diegimo programa
Name[it_IT]=Installa il sistema
Icon[it_IT]=calamares
GenericName[it_IT]=Programma d'installazione del sistema
Comment[it_IT]=Calamares — Programma d'installazione del sistema
Name[mk]=Инсталирај го системот
Icon[mk]=calamares
GenericName[mk]=Системен Инсталер
Comment[mk]=Calamares - Системен Инсталер
Name[ml]=സിസ്റ്റം ഇൻസ്റ്റാൾ ചെയ്യുക
Icon[ml]=കലാമാരേസ്
GenericName[ml]=സിസ്റ്റം ഇൻസ്റ്റാളർ
Comment[ml]=കലാമാരേസ് - സിസ്റ്റം ഇൻസ്റ്റാളർ
Name[nb]=Installer System
Icon[nb]=calamares
GenericName[nb]=Systeminstallatør
Comment[nb]=Calamares-systeminstallatør
Name[nl]=Installeer systeem
Icon[nl]=calamares
GenericName[nl]=Installatieprogramma
Comment[nl]=Calamares — Installatieprogramma
Name[az_AZ]=Sistemi quraşdırmaq
Icon[az_AZ]=calamares
GenericName[az_AZ]=Sistem quraşdırcısı
Comment[az_AZ]=Calamares — Sistem Quraşdırıcısı
Name[pl]=Zainstaluj system
Icon[pl]=calamares
GenericName[pl]=Instalator systemu
Comment[pl]=Calamares — Instalator systemu
Name[pt_BR]=Sistema de Instalação
Icon[pt_BR]=calamares
GenericName[pt_BR]=Instalador de Sistema
Comment[pt_BR]=Calamares — Instalador de Sistema
Name[ro]=Instalează sistemul
Icon[ro]=calamares
GenericName[ro]=Instalator de sistem
Comment[ro]=Calamares — Instalator de sistem
Name[ru]=Установить систему
Icon[ru]=calamares
GenericName[ru]=Установщик системы
Comment[ru]=Calamares - Установщик системы
Name[sk]=Inštalovať systém
Icon[sk]=calamares
GenericName[sk]=Inštalátor systému
Comment[sk]=Calamares — Inštalátor systému
Name[sl]=Namesti sistem
Name[sq]=Instalo Sistemin
Icon[sq]=calamares
GenericName[sq]=Instalues Sistemi
Comment[sq]=Calamares — Instalues Sistemi
Name[fi_FI]=Asenna Järjestelmä
Icon[fi_FI]=calamares
GenericName[fi_FI]=Järjestelmän Asennusohjelma
Comment[fi_FI]=Calamares — Järjestelmän Asentaja
Name[sr@latin]=Instaliraj sistem
Name[sr]=Инсталирај систем
Icon[sr]=calamares
GenericName[sr]=Инсталатер система
Comment[sr]=Каламарес — инсталатер система
Name[sv]=Installera system
Icon[sv]=calamares
GenericName[sv]=Systeminstallerare
Comment[sv]=Calamares — Systeminstallerare
Name[tg]=Насбкунии низом
Icon[tg]=calamares
GenericName[tg]=Насбкунандаи низомӣ
Comment[tg]=Calamares — Насбкунандаи низомӣ
Name[th]=ติดตั้งระบบ
Name[uk]=Встановити Систему
Icon[uk]=calamares
GenericName[uk]=Встановлювач системи
Comment[uk]=Calamares - Встановлювач системи
Name[vi]=Cài đặt hệ thống
Icon[vi]=calamares
GenericName[vi]=Bộ cài đặt hệ thống
Comment[vi]=Calamares — Bộ cài đặt hệ thống
Name[zh_CN]=安装系统
Icon[zh_CN]=calamares
GenericName[zh_CN]=系统安装程序
Comment[zh_CN]=Calamares — 系统安装程序
Name[zh_TW]=安裝系統
Icon[zh_TW]=calamares
GenericName[zh_TW]=系統安裝程式
Comment[zh_TW]=Calamares ── 系統安裝程式
Name[ast]=Instalar el sistema
Icon[ast]=calamares
GenericName[ast]=Instalador del sistema
Comment[ast]=Calamares — Instalador del sistema
Name[eo]=Instali Sistemo
Icon[eo]=calamares
GenericName[eo]=Sistema Instalilo
Comment[eo]=Calamares — Sistema Instalilo
Name[ne_NP]= सिस्टम इन्स्टल गर्नुहोस्
Icon[ne_NP]=Calamares
GenericName[ne_NP]=सिस्टम इन्स्टलर
Comment[ne_NP]=Calamares - सिस्टम इन्स्टलर
Name[es_MX]=Instalar el Sistema
Icon[es_MX]=calamares
GenericName[es_MX]=Instalador del sistema
Comment[es_MX]=Calamares - Instalador del sistema
Name[pt_PT]=Instalar Sistema
Icon[pt_PT]=calamares
GenericName[pt_PT]=Instalador de Sistema
Comment[pt_PT]=Calamares - Instalador de Sistema
Name[tr_TR]=Sistemi Yükle
Icon[tr_TR]=calamares
GenericName[tr_TR]=Sistem Yükleyici
Comment[tr_TR]=Calamares Sistem Yükleyici

View File

@@ -0,0 +1,240 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=Install Snigdha OS
Comment=Installer for Snigdha OS
GenericName=System Installer
Keywords=calamares;system;installer;
TryExec=/usr/bin/calamares_polkit %f -style breeze
Exec=/usr/bin/calamares_polkit %f -style breeze
Icon=snigdhaos-calamares
Terminal=false
Type=Application
StartupNotify=true
Categories=GTK;Settings;Security;X-GNOME-Settings-Panel;X-GNOME-SystemSettings;X-Unity-Settings-Panel;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;Utility;System;Filesystem;GNOME;Qt;KDE;
X-AppStream-Ignore=true
Name[ar]=تثبيت النظام
Icon[ar]=كالامارس
GenericName[ar]=مثبت النظام
Comment[ar]=كالامارس - مثبت النظام
Name[as]=চিছটেম ইনস্তল কৰক
Icon[as]=কেলামাৰেচ
GenericName[as]=চিছটেম ইনস্তলাৰ
Comment[as]=কেলামাৰেচ — চিছটেম​ ইনস্তলাৰ
Name[az]=Sistemi Quraşdırmaq
Icon[az]=calamares
GenericName[az]=Sistem Quraşdırıcısı
Comment[az]=Calamares Sistem Quraşdırıcısı
Name[be]=Усталяваць сістэму
Icon[be]=calamares
GenericName[be]=Усталёўшчык сістэмы
Comment[be]=Calamares — усталёўшчык сістэмы
Name[bg]=Инсталирай системата
Icon[bg]=calamares
GenericName[bg]=Системен Инсталатор
Comment[bg]=Calamares — Системен Инсталатор
Name[bn]=সিস্টেম ইনস্টল করুন
Icon[bn]=ক্যালামারেস
GenericName[bn]=সিস্টেম ইনস্টলার
Comment[bn]=ক্যালামারেস - সিস্টেম ইনস্টলার
Name[ca]=Instal·la el sistema
Icon[ca]=calamares
GenericName[ca]=Instal·lador de sistema
Comment[ca]=Calamares — Instal·lador de sistema
Name[da]=Installér system
Icon[da]=calamares
GenericName[da]=Systeminstallationsprogram
Comment[da]=Calamares — Systeminstallationsprogram
Name[de]=System installieren
Icon[de]=calamares
GenericName[de]=Installation des Betriebssystems
Comment[de]=Calamares - Installation des Betriebssystems
Name[el]=Εγκατάσταση συστήματος
Icon[el]=calamares
GenericName[el]=Εγκατάσταση συστήματος
Comment[el]=Calamares — Εγκατάσταση συστήματος
Name[en_GB]=Install System
Icon[en_GB]=calamares
GenericName[en_GB]=System Installer
Comment[en_GB]=Calamares — System Installer
Name[es]=Instalar Sistema
Icon[es]=calamares
GenericName[es]=Instalador del Sistema
Comment[es]=Calamares — Instalador del Sistema
Name[et]=Paigalda süsteem
Icon[et]=calamares
GenericName[et]=Süsteemipaigaldaja
Comment[et]=Calamares — süsteemipaigaldaja
Name[eu]=Sistema instalatu
Icon[eu]=calamares
GenericName[eu]=Sistema instalatzailea
Comment[eu]=Calamares - sistema instalatzailea
Name[fa]=نصب سامانه
Icon[fa]=کالامارس
GenericName[fa]=نصب‌کنندهٔ سامانه
Comment[fa]=کالامارس — نصب‌کنندهٔ سامانه
Name[es_PR]=Instalar el sistema
Name[fr]=Installer le système
Icon[fr]=calamares
GenericName[fr]=Installateur système
Comment[fr]=Calamares - Installateur système
Name[fur]=Instale il sisteme
Icon[fur]=calamares
GenericName[fur]=Program di instalazion dal sisteme
Comment[fur]=Calamares — Program di instalazion dal sisteme
Name[gl]=Instalación do Sistema
Icon[gl]=calamares
GenericName[gl]=Instalador de sistemas
Comment[gl]=Calamares — Instalador de sistemas
Name[he]=התקנת מערכת
Icon[he]=calamares
GenericName[he]=אשף התקנה
Comment[he]=Calamares - אשף התקנה
Name[hi]=सिस्टम इंस्टॉल करें
Icon[hi]=calamares
GenericName[hi]=सिस्टम इंस्टॉलर
Comment[hi]=Calamares — सिस्टम इंस्टॉलर
Name[hr]=Instaliraj sustav
Icon[hr]=calamares
GenericName[hr]=Instalacija sustava
Comment[hr]=Calamares — Instalacija sustava
Name[ie]=Installar li sistema
Icon[ie]=calamares
GenericName[ie]=Installator del sistema
Comment[ie]=Calamares — Installator del sistema
Name[hu]=Rendszer telepítése
Icon[hu]=calamares
GenericName[hu]=Rendszertelepítő
Comment[hu]=Calamares Rendszertelepítő
Name[id]=Instal Sistem
Icon[id]=calamares
GenericName[id]=Pemasang
Comment[id]=Calamares — Pemasang Sistem
Name[is]=Setja upp kerfið
Icon[is]=calamares
GenericName[is]=Kerfis uppsetning
Comment[is]=Calamares — Kerfis uppsetning
Name[cs_CZ]=Nainstalovat systém
Icon[cs_CZ]=calamares
GenericName[cs_CZ]=Instalátor systému
Comment[cs_CZ]=Calamares instalátor operačních systémů
Name[ja]=システムをインストール
Icon[ja]=calamares
GenericName[ja]=システムインストーラー
Comment[ja]=Calamares — システムインストーラー
Name[ko]=시스템 설치
Icon[ko]=깔라마레스
GenericName[ko]=시스템 설치 관리자
Comment[ko]=깔라마레스 — 시스템 설치 관리자
Name[lt]=Įdiegti Sistemą
Icon[lt]=calamares
GenericName[lt]=Sistemos diegimas į kompiuterį
Comment[lt]=Calamares — Sistemos diegimo programa
Name[it_IT]=Installa il sistema
Icon[it_IT]=calamares
GenericName[it_IT]=Programma d'installazione del sistema
Comment[it_IT]=Calamares — Programma d'installazione del sistema
Name[mk]=Инсталирај го системот
Icon[mk]=calamares
GenericName[mk]=Системен Инсталер
Comment[mk]=Calamares - Системен Инсталер
Name[ml]=സിസ്റ്റം ഇൻസ്റ്റാൾ ചെയ്യുക
Icon[ml]=കലാമാരേസ്
GenericName[ml]=സിസ്റ്റം ഇൻസ്റ്റാളർ
Comment[ml]=കലാമാരേസ് - സിസ്റ്റം ഇൻസ്റ്റാളർ
Name[nb]=Installer System
Icon[nb]=calamares
GenericName[nb]=Systeminstallatør
Comment[nb]=Calamares-systeminstallatør
Name[nl]=Installeer systeem
Icon[nl]=calamares
GenericName[nl]=Installatieprogramma
Comment[nl]=Calamares — Installatieprogramma
Name[az_AZ]=Sistemi quraşdırmaq
Icon[az_AZ]=calamares
GenericName[az_AZ]=Sistem quraşdırcısı
Comment[az_AZ]=Calamares — Sistem Quraşdırıcısı
Name[pl]=Zainstaluj system
Icon[pl]=calamares
GenericName[pl]=Instalator systemu
Comment[pl]=Calamares — Instalator systemu
Name[pt_BR]=Sistema de Instalação
Icon[pt_BR]=calamares
GenericName[pt_BR]=Instalador de Sistema
Comment[pt_BR]=Calamares — Instalador de Sistema
Name[ro]=Instalează sistemul
Icon[ro]=calamares
GenericName[ro]=Instalator de sistem
Comment[ro]=Calamares — Instalator de sistem
Name[ru]=Установить систему
Icon[ru]=calamares
GenericName[ru]=Установщик системы
Comment[ru]=Calamares - Установщик системы
Name[sk]=Inštalovať systém
Icon[sk]=calamares
GenericName[sk]=Inštalátor systému
Comment[sk]=Calamares — Inštalátor systému
Name[sl]=Namesti sistem
Name[sq]=Instalo Sistemin
Icon[sq]=calamares
GenericName[sq]=Instalues Sistemi
Comment[sq]=Calamares — Instalues Sistemi
Name[fi_FI]=Asenna Järjestelmä
Icon[fi_FI]=calamares
GenericName[fi_FI]=Järjestelmän Asennusohjelma
Comment[fi_FI]=Calamares — Järjestelmän Asentaja
Name[sr@latin]=Instaliraj sistem
Name[sr]=Инсталирај систем
Icon[sr]=calamares
GenericName[sr]=Инсталатер система
Comment[sr]=Каламарес — инсталатер система
Name[sv]=Installera system
Icon[sv]=calamares
GenericName[sv]=Systeminstallerare
Comment[sv]=Calamares — Systeminstallerare
Name[tg]=Насбкунии низом
Icon[tg]=calamares
GenericName[tg]=Насбкунандаи низомӣ
Comment[tg]=Calamares — Насбкунандаи низомӣ
Name[th]=ติดตั้งระบบ
Name[uk]=Встановити Систему
Icon[uk]=calamares
GenericName[uk]=Встановлювач системи
Comment[uk]=Calamares - Встановлювач системи
Name[vi]=Cài đặt hệ thống
Icon[vi]=calamares
GenericName[vi]=Bộ cài đặt hệ thống
Comment[vi]=Calamares — Bộ cài đặt hệ thống
Name[zh_CN]=安装系统
Icon[zh_CN]=calamares
GenericName[zh_CN]=系统安装程序
Comment[zh_CN]=Calamares — 系统安装程序
Name[zh_TW]=安裝系統
Icon[zh_TW]=calamares
GenericName[zh_TW]=系統安裝程式
Comment[zh_TW]=Calamares ── 系統安裝程式
Name[ast]=Instalar el sistema
Icon[ast]=calamares
GenericName[ast]=Instalador del sistema
Comment[ast]=Calamares — Instalador del sistema
Name[eo]=Instali Sistemo
Icon[eo]=calamares
GenericName[eo]=Sistema Instalilo
Comment[eo]=Calamares — Sistema Instalilo
Name[ne_NP]= सिस्टम इन्स्टल गर्नुहोस्
Icon[ne_NP]=Calamares
GenericName[ne_NP]=सिस्टम इन्स्टलर
Comment[ne_NP]=Calamares - सिस्टम इन्स्टलर
Name[es_MX]=Instalar el Sistema
Icon[es_MX]=calamares
GenericName[es_MX]=Instalador del sistema
Comment[es_MX]=Calamares - Instalador del sistema
Name[pt_PT]=Instalar Sistema
Icon[pt_PT]=calamares
GenericName[pt_PT]=Instalador de Sistema
Comment[pt_PT]=Calamares - Instalador de Sistema
Name[tr_TR]=Sistemi Yükle
Icon[tr_TR]=calamares
GenericName[tr_TR]=Sistem Yükleyici
Comment[tr_TR]=Calamares Sistem Yükleyici

View File

@@ -0,0 +1,29 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-gnome-config
pkgver=1
_pkgver=1.0.0
pkgrel=1
arch=('any')
url="https://github.com/Snigdha-OS/$pkgname"
license=('MIT')
makedepends=('coreutils')
source=("https://github.com/Snigdha-OS/$pkgname/archive/refs/tags/{$_pkgver}.tar.gz")
sha256sums=('SKIP')
pkgdesc='Snigdha OS Gnome Config'
install=$pkgname.install
provides=('snigdhaos-desktop-config')
conflicts=('snigdhaos-desktop-config')
pkgver(){
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
install -d "$pkgdir"/etc
cp -rf "$srcdir"/$pkgname-$_pkgver/etc "$pkgdir"
depends=('snigdhaos-backgrounds'
'gnome-themes-extra'
'kvantum'
'kvantum-qt5'
'ttf-overpass')
}

View File

@@ -0,0 +1,29 @@
# Font-icon directories
FONT_DIRS="/usr/share/fonts/TTF /usr/share/fonts/OTF /usr/share/fonts/misc"
ICON_DIR="/usr/share/icons/hicolor"
GLIB_SCHEMA_DIR="usr/share/glib-2.0/schemas"
# Font-related commands
update_fonts() {
mkfontscale "$FONT_DIRS" >/dev/null 2>&1
mkfontdir "$FONT_DIRS" >/dev/null 2>&1
fc-cache -s >/dev/null
}
# GTK related commands
update_gtk() {
glib-compile-schemas $GLIB_SCHEMA_DIR
gtk-update-icon-cache -ftq $ICON_DIR
/bin/sh -c 'dconf update'
}
# Post installation
post_install() {
post_upgrade
}
# Post upgrade
post_upgrade() {
update_fonts
update_gtk
}

View File

@@ -0,0 +1,28 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=('snigdhaos-grub-theme')
org=Snigdha-OS
branch=master
pkgver=r10.353d955
pkgrel=1
pkgdesc='Grub Theme For Snigdha OS'
arch=('any')
url="https://github.com/$org/$pkgname"
license=('GPL')
makedepends=('git')
source=("grub-theme::git+$url.git")
sha256sums=('SKIP')
pkgver() {
cd "${srcdir}"/grub-theme || exit
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
depends=('grub')
install=$pkgname.install
provides=('snigdhaos-grub-theme')
cd grub-theme/snigdhaos-live || exit
sed -i -e 's,.*text = "Welcome to Snigdha OS".*,#text = "Welcome to Snigdha OS",' theme.txt #remove welcome message
find . -type f -exec install -D -m644 {} "${pkgdir}"/usr/share/grub/themes/snigdhaos-grub-theme/{} \;
}

View File

@@ -0,0 +1,29 @@
post_install() {
sed -i -e 's,.*GRUB_THEME=.*,GRUB_THEME="/usr/share/grub/themes/snigdhaos-grub-theme/theme.txt",' /etc/default/grub
sed -i -e 's,.*GRUB_GFXMODE=.*,GRUB_GFXMODE=auto,' /etc/default/grub
sed -i -e 's,.*GRUB_DISTRIBUTOR=.*,GRUB_DISTRIBUTOR="Snigdha",' /etc/default/grub
grub-mkconfig -o /boot/grub/grub.cfg
cat <<_EOF
==> Installation: Theme is added to your /etc/default/grub: GRUB_THEME="/usr/share/grub/themes/snigdhaos-grub-theme/theme.txt"
==> Default resolution "auto"
_EOF
}
post_upgrade() {
post_install
}
post_remove() {
cat <<_EOF
==> IMPORTANT: Edit /boot/grub/grub.cfg , remove
==> set theme="/boot/grub/themes/snigdhaos-grub-theme/theme.txt"
==> and uncomment an existing one / default!
==> (Maybe without "/boot", depending on PC setup)
_EOF
}

View File

@@ -0,0 +1,22 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-gtk-theme
pkgver=1
pkgrel=1
pkgdesc='An Flat Gtk+ theme based on Material Design'
arch=('any')
license=('GPL3')
url='https://github.com/Snigdha-OS/snigdhaos-gtk-theme'
source=("$pkgname.zip")
sha256sums=('SKIP')
pkgver() {
cd "${srcdir}"/"${pkgdir}" || exit
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
install -d "$pkgdir/usr/share/themes/"
cp -r -a --no-preserve=ownership \
* "$pkgdir/usr/share/themes"
}

View File

@@ -0,0 +1,15 @@
pkgname=snigdhaos-keyring
pkgver=1.0.0
pkgrel=2
pkgdesc="Keyring for Snigdha OS."
arch=('any')
license=("MIT")
source=("$pkgname.tar.gz")
package() {
mkdir -p "${pkgdir}/usr/share/pacman/keyrings"
cp -rf "${srcdir}"/usr/share/pacman/keyrings/* "${pkgdir}/usr/share/pacman/keyrings/"
}
sha512sums=('SKIP')

21
snigdhaos-keyring/build.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/sh
set -e
pkgname=$(grep "^pkgname=" PKGBUILD | awk -F"=" '{print $2}')
pkgrel=$(grep "^pkgrel=" PKGBUILD | awk -F"=" '{split($2,a," ");gsub(/"/, "", a[1]);print a[1]}')
arch=$(grep "^arch=" PKGBUILD | awk -F"'" '{print $2}')
#NEED ONLY TO EDIT sourcefiles VARIABLE
sourcefiles="usr"
#sed -i -e '/^sha256/d' -e '/^sha512/d' PKGBUILD
tar -zcvf $pkgname.tar.gz $sourcefiles
# updpkgsums
#makepkg -g >> PKGBUILD
makepkg -f -scr --noconfirm
pkgver=$(grep "^pkgver=" PKGBUILD | awk -F"=" '{print $2}')
pkgfile=$pkgname-$pkgver-$pkgrel-$arch.pkg.tar.zst
rm -rf src pkg $pkgname.tar.gz

View File

@@ -0,0 +1 @@
DEF9989943683A113B698123A6423A627F8CD2B6:4:

View File

@@ -0,0 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGYw34sBEADbxTnFeBAcK0gn6JFBoExfwVHEh19J6+OgTj1cmI+gD68h3M99
LllD7Ntd6a15PoCErMjOl4l6UeDNDOyqepXM8V80OyHxFNBrkWtXNofRd2QvnMfQ
bpWtXpZnF5M8oDfu/D+JYNlkHuqwmF9hhld9xtjhiH9524y5EeHaiiy2fiAmbsBB
ytFr3WXPsDFyXj2a9baKEe8aXICONKtvxOyvCyQGUPCf05HDVOvmRhA1A2sFnCOc
+TqBdK0nFPQPCGdjq+ODZPp2Zr9rjh55wfMVm2aYjbvijCX74W+7qmJCWM5JdW5r
Wbk2ZSn5FZGRwTpkCNjmzshU1+xddSg6GLO/XK+oTFXNxphZIFpdc5EJBjAzMYs/
/1N9kLGKSXkV7VNK6XT2Mo6sDd8ur7f6kan6Tat4euA2QEk6zMTmiC1/K4IBI/sZ
IioeZkJc4dIshfujF0GmYJjSeakg2FmqQFGVIZ6VtUxB6hiHPBrcF+Xlo1ySMAGO
/ob59mKDNjZGXGxWruZCWRfpZZ3cfqPSh2L1fdCSopKfKv5b4EJrNaSF3HozpU98
3CSXMbWwKYt5Bf9x/v/hkxhFsVUba5mme+bX4vbkYJdO4l/6PbIzhKkyEEjsKfgl
H+wM+zQKUPMpDz0SB9JSOH73UhPW92Q5H6f9vvMMRl4eWV7RAoIMtwu6ZQARAQAB
tERTTklHREhBIE9TIChiZSBzaWxlbnQgd2hlbiBpdCBpcyB0aW1lIHRvIGhlYXIp
IDxoZWxsb0BzbmlnZGhhb3Mub3JnPokCVwQTAQgAQRYhBN75mJlDaDoRO2mBI6ZC
OmJ/jNK2BQJmMN+LAhsDBQkJZgGABQsJCAcCAiICBhUKCQgLAgQWAgMBAh4HAheA
AAoJEKZCOmJ/jNK2fHwP/1zGlygzz+iZRIK1hxdjFxIxt0k4AsdjCSeKBAkqcmrt
6eBuT2VM/yMQqDUjbkV6BOJvEoCl5MiQj19alXHK5JcWOefRWwDneIzsOFJJEiNU
ng4YjnAc9YLG8oiJfREWA5NhFueWWTEyLr0UqwT9O2ZXYDREzzLtFYq1g5N07xMW
8EdlV+BZklUn7R9WQwejoXjtP1gceilGvpBEiEXC/iSliubYNDllMNQ1u4Qo3fvB
azqm7Yd4lNuusm+4T2N0tkUyqwMpMqL7dDbLFG4qcO+aIMu35X4sLviWHRxHU0bN
GkRF4NCo8ODlro3KPFksK/wGGeGTssLK+PyaFY/vKtPbhdxp8umJqyvSu1rYThzi
sWy9k6cK89JX3qjjGpzNfxlupLZmnGLs6wQkJyZ1rU+nMG2Kxjd3j6zLOGZlDTBE
fF8oYJgkfH3gP89RPIbUCL8b/yyt/SG7jF6Ub9ADFXtekQQXMSwBh80kh1aImAT0
VoyPHMp4jNttA6qnAiN+cHFR6BOZrcG69BfTwAwHPvAT6OU9drgRjiu9reUfGE2f
Up10I21kZ1QMuycbUWyXd2oYb1RsFWG9uX/j/7k25vyUTuW2hCWrZJMhUeQSmiyu
QSp9u6JhaXDQcylyNtl7f1QR1uF+nmVGBPweL1Evww4LCpu2Rw+MjX4oq+jwNX6y
uQINBGYw34sBEADTjEVRhTn+O5+zRcnevgWj2AxfkGa0qAc8ajZItHYpCngWarf6
SynhEdFSCPYVgSnh1k/zQsHiGSCKQ1P9u7NQVAakjj5IF+s5yWAciTTZqYaivoUQ
QSJaPZdhWttbv8UyGkcVjSSEy2LUuOkDKH3nQoJDjEdRizl8lzCyFFGKiXoQy9fR
CKhndQKoMGj+eNVkXkmH3Z9lgxjAi3QQDGROAcfxEgRQZNRryOKagBj4vUmqBps3
/cxyhSN8yjSmzci0H+Q+oirPaWV0myCaGsOcq24SWX8yUF8Mh+pqWZQeC0vQf9iY
KvXXGMZ3HFRQQr0Ju3yc25JeJ4effAcqEOCRW9SH6OZzsSaN8HfeXHu4NqiqPQxL
lBD0YA7Ia0yTiowspdN6IepzeuhkevsMpmdePMA1+2fcEJl4+1XX3YV+G2p4EyJg
LUIim58rO/KaHxNpL/8QYaZI6frTPgmx6/nZVR82Qp18n5+ue7XIp1OvwrXR8Ch/
l97Vf/zM9eb5b3XgebDzfq50y6nsMh0RXitQ5OSnhzIaEpdSDUVoSBzA06G7SNTW
J7hFr/WprEESqkxVrTYqm8QcqM3udbjCYB7njsFgz1LHYDQF923iAAlt4qdEFCzh
fubYWV9Ld1/tAG2+5aKDadkkNCyopm11mxLuKNE3Jcjvce4OG2woaTdn9wARAQAB
iQI8BBgBCAAmFiEE3vmYmUNoOhE7aYEjpkI6Yn+M0rYFAmYw34sCGwwFCQlmAYAA
CgkQpkI6Yn+M0rZf5xAA2FqUbJzPJHfKwQEWli4qo5cO6hyXnZWlauyMPQO74KOR
s5k4cDiIsl+beJuBzVZRumoiKypQidMXKbPNW+cvQqZQxsR4RHrgCmwAt82fwHsU
qhXtL7ZEbw22RyyrEdFvLrRvu13ZAnoimHzFvOCKWW89l/ylybfnq4syNYJUrpLy
lyNzw390yryqPyCPPQgKunsiufVqDWyoWxmxSiBAGt7jUp+ryP1NEqFeamAX+lhi
gwbhXZCunGkY2VFbI8+REHHy7fhgzZa4oBkTWglg5auwFDYtKqMmnxMpVoGf4nOf
zbAQ+XfGKQZqomYkIUsnqNhDz1EumaQJoO1cu+hMXYo0Bf5u5ZFCkr5AN+hu33XQ
+Ibh2dZRz6/UGkceDqsq7Pzw3HZ55qL/wSzW+La/zrTUOZlmF8bDISURssZdLKhb
M5u1HhWv58TkL1+3akiUvPXaosoFyzP2rBHeP/QAiwG3BDicqhwO4200oEY0lpxg
PHzw3NgfEOSC+V1deFIc8lTr0047MzGt1gR+EpTBcpwuCLe+9iDyxvWhO0nuTOp1
POdIb+kxqJ6isV8fJ5jYOJ5H1Wnle3b+xnEuJYkzMkH56VL1tRBKc65VfVCdi/li
7/f5FgUEQic3qhRqyjQCoa35Ze6o+fD4KSuUxVpcomUODnYwnDbGiis41H7ogmo=
=FBF+
-----END PGP PUBLIC KEY BLOCK-----

View File

@@ -0,0 +1,28 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-launcher
org=Snigdha-OS
pkgdesc="Terminal Executer for Snigdha OS"
pkgver=1
pkgrel=1
arch=('any')
license=('MIT')
depends=(
'libnotify'
)
source=(
"launch-terminal"
)
sha256sums=(
'SKIP'
)
install="${pkgname}.install"
pkgver(){
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
install -Dm755 launch-terminal "$pkgdir"/usr/lib/snigdhaos/launch-terminal
install -d "$pkgdir"/var/lib/snigdhaos/tmp
}

View File

@@ -0,0 +1,96 @@
#!/usr/bin/bash
set -e
LAUNCH_TERMINAL_SHELL=bash
usage() {
echo "Usage: ${0##*/} [cmd]"
echo ' -s [shell] Change shell to [shell]'
echo ' -h This help'
exit 1
}
opts='s:h'
while getopts "${opts}" arg; do
case "${arg}" in
s) LAUNCH_TERMINAL_SHELL="$OPTARG" ;;
h | ?) usage 0 ;;
*)
echo "invalid argument '${arg}'"
usage 1
;;
esac
done
shift $(($OPTIND - 1))
initfile="$(mktemp)"
codefile="$initfile"
echo "#!/usr/bin/env bash" >"$initfile"
if [ "$LAUNCH_TERMINAL_SHELL" != "bash" ]; then
codefile="$(mktemp)"
echo "$LAUNCH_TERMINAL_SHELL $codefile" >>"$initfile"
fi
echo "$1" >>"$codefile"
chmod +x "$initfile"
cmd="\"$initfile\""
terminal=""
declare -A terminals=(["alacritty"]="alacritty -e $cmd || LIBGL_ALWAYS_SOFTWARE=1 alacritty -e $cmd" ["konsole"]="konsole -e $cmd" ["kgx"]="kgx -- $cmd" ["gnome-terminal"]="gnome-terminal --wait -- $cmd" ["xfce4-terminal"]="xfce4-terminal --disable-server --command '$cmd'" ["qterminal"]="qterminal -e $cmd" ["lxterminal"]="lxterminal -e $cmd" ["mate-terminal"]="mate-terminal --disable-factory -e $cmd" ["xterm"]="xterm -e $cmd" ["foot"]="foot -T launch-terminal -e $cmd")
declare -a term_order=("alacritty" "konsole" "kgx" "gnome-terminal" "mate-terminal" "xfce4-terminal" "qterminal" "lxterminal" "xterm" "foot")
case "$XDG_CURRENT_DESKTOP" in
KDE)
terminal=konsole
;;
GNOME)
if command -v "kgx" &>/dev/null; then
terminal=kgx
else
terminal=gnome-terminal
fi
;;
XFCE)
terminal=xfce4-terminal
;;
LXQt)
terminal=qterminal
;;
MATE)
terminal=mate-terminal
;;
esac
if [ -z "$terminal" ] || ! command -v "$terminal" &>/dev/null; then
for i in ${term_order[@]}; do
if command -v "$i" &>/dev/null; then
terminal="$i"
break
fi
done
fi
if [ -z "$terminal" ]; then
notify-send -t 15000 --app-name=Snigdha\ OS "No terminal installed" "No supported terminal emulator is installed. Please install a terminal emulator like Alacritty."
exit 1
fi
# Special kgx, thanks gnome
if [ "$terminal" == "kgx" ]; then
sed -i '2i sleep 0.1' $initfile
echo 'kill -SIGINT $PPID' >>$initfile
fi
eval "${terminals[${terminal}]}" || {
exitcode=$?
}
rm "$initfile"
if [ "$codefile" != "$initfile" ]; then
rm "$codefile"
fi
if [ ! -z "$exitcode" ] && [ "$exitcode" != 130 ]; then
exit 2
fi

View File

@@ -0,0 +1,7 @@
post_install() {
echo -e "\n** The files have been installed in /usr/lib/snigdhaos/launch-terminal **\n"
}
post_upgrade() {
post_install
}

42
snigdhaos-libs/PKGBUILD Normal file
View File

@@ -0,0 +1,42 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-libs
org=Snigdha-OS
pkgdesc="Libs for Snigdha OS"
pkgver=1
pkgrel=1
arch=('any')
license=('MIT')
depends=(
'libnotify'
'expect'
)
source=(
"exec-termianl"
"snigdhaos.shlib"
"check-snpashot-boot"
"install-package"
"org.snigdhaos.libs.pkexec.policy"
"pkexec-gui"
)
sha256sums=(
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
)
pkgver(){
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
install -Dm755 exec-terminal "$pkgdir"/usr/lib/snigdhaos/exec-terminal
install -Dm755 install-package "$pkgdir"/usr/lib/snigdhaos/install-package
install -Dm755 check-snpashot-boot "$pkgdir"/usr/lib/snigdhaos/check-snpashot-boot
install -Dm755 pkexec-gui "$pkgdir"/usr/lib/snigdhaos/pkexec-gui
install -Dm644 snigdhaos.shlib "$pkgdir"/usr/lib/snigdhaos/snigdhaos.shlib
install -d "$pkgdir"/var/lib/snigdhaos/tmp
install -Dm0644 org.snigdhaos.libs.pkexec.policy "$pkgdir/usr/share/polkit-1/actions/org.snigdhaos.libs.pkexec.policy"
}

View File

@@ -0,0 +1,6 @@
#!/bin/bash
if grep -qE 'subvol=@/.snapshots/[0-9]+/snapshot' /proc/cmdline; then
exit 0
fi
exit 1

View File

@@ -0,0 +1,99 @@
#!/bin/bash
set -e
LAUNCH_TERMINAL_SHELL=bash
usage(){
echo "Usage: ${0##*/} [cmd]"
echo ' -s [shell] Change shell to [shell]'
echo ' -h This help'
exit 1
}
opts='s:h'
while getopts "${opts}" arg; do
case "${arg}" in
s) LAUNCH_TERMINAL_SHELL="$OPTARGS" ;;
h | ?) usage 0 ;;
*)
echo "Invalid arguments '${arg}'"
usage 1 ;;
esac
done
shift $((OPTIND - 1))
initfile="$(mktemp)"
codefile="$initfile"
echo "#!/usr/bin/env bash" >"$initfile"
if [ "$LAUNCH_TERMINAL_SHELL" != "bash" ]; then
codefile="$(mktemp)"
echo "$LAUNCH_TERMINAL_SHELL $codefile" >>"$initfile"
fi
echo "$1" >>"$codefile"
chmod +x "$initfile"
cmd="\"$initfile\""
terminal=""
declare -A terminals=(["alacritty"]="alacritty -e $cmd || LIBGL_ALWAYS_SOFTWARE=1 alacritty -e $cmd" ["konsole"]="konsole -e $cmd" ["kgx"]="kgx -e $cmd" ["gnome-terminal"]="gnome-terminal --wait -- $cmd" ["xfce4-terminal"]="xfce4-terminal --disable-server --command '$cmd'" ["qterminal"]="qterminal -e $cmd" ["lxterminal"]="lxterminal -e $cmd" ["mate-terminal"]="mate-terminal --disable-factory -e $cmd" ["xterm"]="xterm -e $cmd" ["foot"]="foot -T exec-terminal -e $cmd")
declare -a term_order=("alacritty" "knosole" "kgx" "gnome-terminal" "mate-terminal" "xfce4-terminal" "qterminal" "lxterminal" "xterm" "foot")
case "$XDG_CURRENT_DESKTOP" in
KDE)
terminal="konsole"
;;
GNOME)
if command -v "kgx" &>/dev/null; then
terminal=kgx
else
terminal=gnome-terminal
fi
;;
XFCE)
terminal=xfce4-terminal
;;
LXQt)
terminal=qterminal
;;
MATE)
terminal=mate-terminal
;;
esac
if [ -z "$terminal" ] || ! command -v "$terminal" &>/dev/null; then
# shellcheck disable=SC2068
for i in ${term_order[@]}; do
if command -v "$i" &>/dev/null; then
terminal="$i"
break
fi
done
fi
if [ -z "$terminal" ]; then
notify-send -t 1500 --app-name=Snigdha\ OS "No Terminal Found!"
exit 1
fi
if [ "$terminal" == "kgx" ]; then
# shellcheck disable=SC2086
sed -i '2i sleep 0.1' $initfile
# shellcheck disable=SC2016
# shellcheck disable=SC2086
echo 'Kill -SIGNINT $PPID' >>$initfile
fi
eval "${terminals[${terminal}]}" || {
exitcode=$?
}
rm "$initfile"
if [ "$codefile" != "$initfile" ]; then
rm "$codefile"
fi
if [ ! -z "$exitcode" ] && [ "$exitcode" != 130 ]; then
exit 2
fi

View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -e
SNIGDHAOSLIB_GUI="${SNIGDHAOSLIB_GUI:-true}"
if [ -z "$DISPLAY" ]; then
SNIGDHAOSLIB_GUI=false
fi
if [[ $EUID -ne 0 ]] && [ "$SNIGDHAOSLIB_GUI" == "true" ]; then
exec pkexec /usr/lib/snigdhaos/install-package "$@"
exit 1
fi
sudo pacman -S --noconfirm "$@"

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD polkit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/software/polkit/policyconfig-1.dtd">
<policyconfig>
<vendor>Snigdha OS</vendor>
<vendor_url>https://snigdhaos.org</vendor_url>
<action id="org.snigdhaos.libs.install-package.pkexec.policy.run">
<description>Install software with pacman</description>
<message>Authentication is required to install software.</message>
<icon_name>snigdha-os</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/lib/snigdhaos/install-package</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
<action id="org.garuda.libs.pkexec-gui.pkexec.policy.run">
<description>Run GUI program as root</description>
<message>Authentication is required to run a GUI program as root.</message>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/lib/snigdhaos/pkexec-gui</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

15
snigdhaos-libs/pkexec-gui Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
if [ $EUID -ne 0 ]; then
exec pkexec /usr/lib/snigdhaos/pkexec-gui "$@"
exit 1
fi
# Need some previous vars
# shellcheck disable=SC2163
while IFS= read -rd '' var; do export "$var"; done < <(grep --null-data -ae "^\($XDG_CURRENT_DESKTOP\|WAYLAND_DISPLAY\|XDG_RUNTIME_DIR\|XDG_SESSION_TYPE\|XCURSOR_SIZE\|LC_*\|LANG\|LANGUAGE\|QT_WAYLAND_FORCE_DPI\|QT_QPA_PLATFORMTHEME\|QT_STYLE-OVERRIDE\|\)=.*\$" /proc/$PPID/environ)
if [[ -v WAYLAND_DISPLAY ]]; then
export WAYLAND_DISPLAY="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY"
fi
export XDG_RUNTIME_DIR="/run/user/0"
exec "$@"

View File

@@ -0,0 +1,5 @@
#!/bin/bash
snigdhaoslib_add_update_notice(){
mkdir -p /var/lib/snigdhaos/tmp
echo "$(date +%F) ${1// / }" >>/var/lib/snigdhaos/tmp/update_notices
}

View File

@@ -0,0 +1,21 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-mirrorlist
pkgver=r125.c1334295
pkgrel=1
pkgdesc="Snigdha OS mirrorlist."
arch=('any')
license=("MIT")
backup=('etc/pacman.d/snigdhaos-mirrorlist')
source=("snigdhaos-mirrorlist")
sha512sums=('SKIP')
pkgver() {
# cd "$srcdir/$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
mkdir -p "$pkgdir/etc/pacman.d"
install -Dm 644 -t "$pkgdir/etc/pacman.d/" $pkgname
}

View File

@@ -0,0 +1,2 @@
# Worldwide
Server = https://snosmirror.github.io/$repo/$arch

View File

@@ -0,0 +1,32 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-neofetch
org=Snigdha-OS
branch=master
_pkgname=snigdhaos-neofetch
_destname1="/etc/skel/.config/neofetch/"
_licensedir="/usr/share/snigdhaos/licenses/"
pkgver=1
pkgrel=1
pkgdesc="Snigdha OS Neofetch Config!"
arch=('any')
url="https://github.com/$org/$pkgname"
license=('MIT')
makedepends=('git')
depends=('neofetch' 'bash' 'python')
provides=("${pkgname}")
options=(!strip !emptydirs)
source=(${_pkgname}::"git+https://github.com/$org/${_pkgname}.git")
sha256sums=('SKIP')
install=$pkgname.install
pkgver() {
# cd "$srcdir/$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
install -dm755 ${pkgdir}${_licensedir}${_pkgname}
install -m644 ${srcdir}/${_pkgname}/LICENSE ${pkgdir}${_licensedir}${_pkgname}
install -dm755 ${pkgdir}${_destname1}
install -m644 ${srcdir}/${_pkgname}${_destname1}* ${pkgdir}${_destname1}
}

View File

@@ -0,0 +1,7 @@
post_install() {
echo -e "\n** The files have been installed in /etc/skel/.config/neofetch **\n"
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,33 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-powershell
org="Snigdha-OS"
branch="master"
pkgver=r75.ba4f5f5
pkgrel=1
pkgdesc="Snigdha OS PowerShell Config!"
arch=('any')
license=('MIT')
depends=(
'powershell-bin'
)
source=(
"$pkgname.tar.xz"
"${pkgname}.desktop"
)
sha256sums=(
'SKIP'
)
install=$pkgname.install
pkgver(){
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package(){
mkdir -p "${pkgdir}/etc/skel"
cp -rf "${srcdir}/etc/skel/.config" "${pkgdir}/etc/skel/"
# rm "${pkgdir}/usr/share/applications/snigdhaos-powershell.desktop"
# install -Dm644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
}

View File

@@ -0,0 +1,6 @@
$Host.UI.RawUI.WindowTitle = "SNIGDHA OS > PowerShell🔥"
function prompt()
{
$ESC=$([char]27)
"$ESC[0;36m┌──I'm $(whoami)$ESC[0;31m$($executionContext.SessionState.Path.CurrentLocation)$("`r`n$ESC[0;36m└──eshanized PowerShell🔥>$ESC[00m" * ($nestedPromptLevel + 1)) ";
}

View File

@@ -0,0 +1,7 @@
post_install() {
echo -e "\n** The files have been installed in /etc/skel/.config/powershell **\n"
}
post_upgrade() {
post_install
}

Binary file not shown.

View File

@@ -0,0 +1,38 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-system-config
org=Snigdha-OS
_pkgname=snigdhaos-system-config
_destname1="/etc"
_destname2="/usr"
_licensedir="/usr/share/snigdhaos/licenses/"
pkgver=1
pkgrel=1
pkgdesc="Snigdha OS System Config!"
arch=('any')
url="https://github.com/$org/$_pkgname"
license=('MIT')
makedepends=('git')
depends=()
conflicts=('snigdhaos-system-config-next')
backup=('etc/pacman.d/gnupg/gpg.conf' 'etc/X11/xorg.conf.d/30-touchpad.conf')
provides=("${pkgname}")
options=( !strip !emptydirs )
source=(${pkgname}::"git+https://github.com/${org}/${_pkgname}")
sha256sums=('SKIP')
install=$pkgname.install
pkgver(){
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
install -dm755 "$pkgdir/$_licensedir/$_pkgname"
install -m644 "$srcdir/$pkgname/LICENSE" "$pkgdir/$_licensedir/$_pkgname"
install -dm755 "$pkgdir/$_destname1"
cp -r ${srcdir}/${pkgname}/${_destname1} ${pkgdir}
install -dm755 "$pkgdir$_destname2"
cp -r ${srcdir}/${pkgname}/${_destname2} ${pkgdir}
}

View File

@@ -0,0 +1,161 @@
post_install(){
tput setaf 3;
echo
echo "[WARNING] WARNING!"
echo
echo "If you are on Grub, please install the following package..."
echo "sudo pacman -S snigdhaos-bootloader-grub"
echo
echo "If you are using systemd-boot then isntall the following package..."
echo "sudo pacman -S snigdhaos-bootloader-systemd"
echo
echo "[WARNING] WARNING!"
echo
tput setaf 2;
bootloader=$(bootctl status | grep "Product" | awk '{print $2}')
if [ "$bootloader" = "systemd-boot" ]; then
echo
echo "systemd-bootloader found!"
echo "Install the following package for your safety!"
echo
echo "sudo pacman -S snigdhaos-bootloader-systemd"
echo "It has all the pacman-hooks which are essentials."
echo
elif [ $bootloader = "GRUB" ]; then
echo
echo "GRUB bootloader found!"
echo "Install the following package for your safety!"
echo
echo "sudo pacman -S snigdhaos-bootloader-grub"
echo "It has all the pacman-hooks which are essentials."
echo
fi
tput sgr0
# Confirmation for package installation
package_installed(){
if pacman -Qi "$1" &> /dev/null; then
return 0
else
return 1
fi
}
tput setaf 6;
if package_installed snigdhaos-bootloader-grub; then
echo
echo "snigdhaos-bootloader-grub found!"
echo "Bootloader is safe!"
echo
fi
tput sgr0
tput setaf 6;
if package_installed snigdhaos-bootloader-systemd; then
echo
echo "snigdhaos-bootloader-systemd found!"
echo "Bootloader is safe!"
echo
fi
tput sgr0
tput setaf 1;
if ! package_installed snigdhaos-bootloader-systemd && ! package_installed snigdhaos-bootloader-grub; then
echo
echo "snigdhaos-bootloader-systemd or snigdhaos-bootloader-grub not found!"
echo "[WARNING] WARNING!"
echo "Install the package for systemd or grub!"
echo
fi
tput sgr0
if systemctl --all --type service | grep -q "virtual-machine-check"; then
systemctl disable virtual-machine-check.service
fi
sh /usr/local/bin/snigdhaos-lsb-release
sh /usr/local/bin/snigdhaos-os-release
}
post_upgrade(){
tput setaf 3;
echo
echo "[WARNING] WARNING!"
echo
echo "If you are on Grub, please install the following package..."
echo "sudo pacman -S snigdhaos-bootloader-grub"
echo
echo "If you are using systemd-boot then isntall the following package..."
echo "sudo pacman -S snigdhaos-bootloader-systemd"
echo
echo "[WARNING] WARNING!"
echo
tput setaf 2;
bootloader=$(bootctl status | grep "Product" | awk '{print $2}')
if [ "$bootloader" = "systemd-boot" ]; then
echo
echo "systemd-bootloader found!"
echo "Install the following package for your safety!"
echo
echo "sudo pacman -S snigdhaos-bootloader-systemd"
echo "It has all the pacman-hooks which are essentials."
echo
elif [ $bootloader = "GRUB" ]; then
echo
echo "GRUB bootloader found!"
echo "Install the following package for your safety!"
echo
echo "sudo pacman -S snigdhaos-bootloader-grub"
echo "It has all the pacman-hooks which are essentials."
echo
fi
tput sgr0
# Confirmation for package installation
package_installed(){
if pacman -Qi "$1" &> /dev/null; then
return 0
else
return 1
fi
}
tput setaf 6;
if package_installed snigdhaos-bootloader-grub; then
echo
echo "snigdhaos-bootloader-grub found!"
echo "Bootloader is safe!"
echo
fi
tput sgr0
tput setaf 6;
if package_installed snigdhaos-bootloader-systemd; then
echo
echo "snigdhaos-bootloader-systemd found!"
echo "Bootloader is safe!"
echo
fi
tput sgr0
tput setaf 1;
if ! package_installed snigdhaos-bootloader-systemd && ! package_installed snigdhaos-bootloader-grub; then
echo
echo "snigdhaos-bootloader-systemd or snigdhaos-bootloader-grub not found!"
echo "[WARNING] WARNING!"
echo "Install the package for systemd or grub!"
echo
fi
tput sgr0
if systemctl --all --type service | grep -q "virtual-machine-check"; then
systemctl disable virtual-machine-check.service
fi
sh /usr/local/bin/snigdhaos-lsb-release
sh /usr/local/bin/snigdhaos-os-release
}
pre_remove(){
if systemctl --all --type service | grep -q "virtual-machine-check"; then
systemctl disable virtual-machine-check.service
fi
}

View File

@@ -0,0 +1,41 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-system-installation
org=Snigdha-OS
_pkgname=snigdhaos-system-installation
_destname1="/etc/"
_destname2="/usr/local/bin/"
_destname3="/usr/lib/systemd/system/"
_licensedir="/usr/share/snigdhaos/licenses/"
pkgver=1
pkgrel=1
pkgdesc="Installation files for Snigdha OS"
arch=('any')
url="https://github.com/${org}/${pkgname}"
license=('MIT')
makedepends=('git')
depends=()
provides=("${pkgname}")
options=(!strip !emptydirs)
source=(${pkgname}::"git+https://github.com/${org}/${_pkgname}")
sha256sums=('SKIP')
install="${pkgname}.install"
pkgver() {
# cd "$srcdir/$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
install -dm755 "$pkgdir/$_licensedir/$_pkgname"
install -m644 "$srcdir/$pkgname/LICENSE" "$pkgdir/$_licensedir/$_pkgname"
install -dm755 "$pkgdir$_destname1"
cp -r "$srcdir/$pkgname/$_destname1/"* "$pkgdir/$_destname1"
install -dm755 "$pkgdir$_destname2"
cp -r "$srcdir/$pkgname/$_destname2/"* "$pkgdir/$_destname2"
install -dm755 "$pkgdir$_destname3"
cp -r "$srcdir/$pkgname/$_destname3/"* "$pkgdir/$_destname3"
}

View File

@@ -0,0 +1,14 @@
post_install() {
systemctl enable snigdhaos-graphical-target.service
systemctl start snigdhaos-graphical-target.service
}
post_upgrade() {
systemctl enable snigdhaos-graphical-target.service
systemctl start snigdhaos-graphical-target.service
}
pre_remove() {
systemctl disable snigdhaos-graphical-target.service
}

View File

@@ -0,0 +1,37 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-updater
pkgdesc="Updater for Snigdha OS"
pkgver=1
pkgrel=1
arch=('any')
license=('GPL')
depends=('coreutils' 'sed' 'gawk' 'pacman' 'wget')
backup=(etc/snigdhaos/snigdhaos-updater/config)
source=("auto-pacman"
"config"
"snigdhaos-updater"
"rotation"
"core-script"
"aux-script")
sha512sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP')
pkgver() {
# cd "$srcdir/$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
install -Dm755 snigdhaos-updater "$pkgdir"/usr/bin/snigdhaos-updater
ln -s /usr/bin/snigdhaos-updater "$pkgdir"/usr/bin/updater
install -Dm755 aux-script "$pkgdir"/usr/lib/snigdhaos/snigdhaos-updater/aux-script
install -Dm755 core-script "$pkgdir"/usr/lib/snigdhaos/snigdhaos-updater/core-script
install -Dm755 auto-pacman "$pkgdir"/usr/lib/snigdhaos/snigdhaos-updater/auto-pacman
install -Dm644 rotation "$pkgdir"/etc/logrotate.d/snigdhaos-updater
install -Dm644 config "$pkgdir"/etc/snigdhaos/snigdhaos-updater/config
}

View File

@@ -0,0 +1,115 @@
#!/usr/bin/expect -f
if {![exp_debug]} {trap {exit 1} {SIGINT SIGTERM}}
variable noconfirm [string equal $::env(AUTOPACMAN_PACMAN_NOCONFIRM) "1"]
variable noconfirm_downloading false
variable conflictsfile_set [expr [info exist ::env(AUTOPACMAN_CONFLICTSFILE)] && [file exist $::env(AUTOPACMAN_CONFLICTSFILE)] ? true : false]
# [package to be replaced]: [package to be replaced with]
array set auto_replace_conflicts {
python-xdg python-pyxdg
vimix-gtk-themes snigdhaos-vimix-dark
bibata-cursor-theme sweet-theme-full-git
kvantum-theme-sweet-git sweet-theme-full-git
sweet-gtk-theme-dark sweet-theme-full-git
plasma5-theme-sweet-git sweet-theme-full-git
xcursor-sweet sweet-theme-full-git
exe-thumbnailer icoextract
pipewire-media-session wireplumber
qemu-base qemu-desktop
libretro-mame-git libretro-meta
jack2 pipewire-jack
networkmanager-fortisslvpn networkmanager-support
ananicy-rules cachyos-ananicy-rules-git
sweet-theme-full-git plasma5-themes-sweet-full-git
sweet-kde-theme-git plasma5-themes-sweet-kde-git
jre-openjdk jdk-openjdk
jre-openjdk-headless {jdk-openjdk jre-openjdk}
}
if { $::conflictsfile_set } {
set conflictsfile [open $::env(AUTOPACMAN_CONFLICTSFILE) r]
array set auto_replace_conflicts [gets $conflictsfile]
close $conflictsfile
}
proc parseConflicts {first second} {
foreach {key value} [array get ::auto_replace_conflicts] {
if { [string equal $second $key] && [lsearch -exact $value $first] != -1 } {
send "y\r"
return
}
}
if { $::noconfirm } {
return
} elseif { $::conflictsfile_set } {
send "n\r"
} else {
expect_user -timeout -1 -re "(.*)\n"
if {[regexp {^[Yy]$} $expect_out(1,string)]} {
set ::auto_replace_conflicts($second) $first
send "y\r"
} else {
send "n\r"
}
}
}
proc doExit {} {
catch wait result
if {[info exist ::env(AUTOPACMAN_CONFLICTSFILE)] && ![file exist $::env(AUTOPACMAN_CONFLICTSFILE)] } {
set conflictsfile [open $::env(AUTOPACMAN_CONFLICTSFILE) [list WRONLY CREAT EXCL] 0600]
puts $conflictsfile [array get ::auto_replace_conflicts]
close $conflictsfile
}
exit [lindex $result 3]
}
spawn {*}$argv
log_user 1
set timeout -1
expect {
"Starting full system upgrade..." { }
eof doExit
}
set timeout 15
expect {
-re {Replace \S+ with \S+ \[Y\/n\]} { send "y\r"; exp_continue }
"resolving dependencies..." { }
timeout { }
eof doExit
}
expect {
"looking for conflicting packages" { exp_continue }
"Enter a number (default=1):" { if { $noconfirm } { send "1\r"; exp_continue; } { interact -o "\r" exp_continue; } }
-re {(\S+) and (\S+) are in conflict( \(\S+\))?\.} { parseConflicts $expect_out(1,string) $expect_out(2,string); exp_continue }
-re {Proceed with installation.*} { if { [info exist ::env(AUTOPACMAN_LOG)] } { log_file $::env(AUTOPACMAN_LOG) }; if { $::noconfirm || $::conflictsfile_set } { send "y\r"; set noconfirm_downloading true } }
timeout { }
eof doExit
}
if { $noconfirm } {
if { $noconfirm_downloading } {
set timeout -1
expect {
-re {Do you want to delete it.*} { send "y\r"; exp_continue }
-re {.*\[Y/n\]} { }
eof doExit
}
}
exp_send_error "\nUnexpected user input required. Try again without --noconfirm"
close
} else {
expect_background {
-re {Do you want to delete it.*} { send "y\r"; exp_continue }
}
catch interact
}
doExit

View File

@@ -0,0 +1,138 @@
#!/bin/bash
set -e
package-exists-fast(){
if compgen -G "/var/lib/pacman/local/$1-*" >/dev/null; then
return 0
else
return 1
fi
}
update_keyrings(){
local packages=("snigdhaos-keyring" "archlinux-keyring" "chaotic-keyring")
if $PACMAN -Qq blackarch-keyring &> /dev/null; then
packages+=("blackarch-keyring")
fi
if [ -n "$(PACMAN -Qu "${packages[@]}" 2>&1)" ]; then
echo -e "Updating Keyrings..."
# shellcheck disable=SC1007
SNAPA_PAC_SKIP=y SKIP_AUTOSNAP= $PACMAN -S --needed --noconfirm "${packages[@]}" || return 0
return 1
fi
return 0
}
install_expect(){
if [ -x /usr/bin/tclsh ] && [ ! -x /usr/bin/expect ]; then
SKIP_AUTOSNAP=1 SNAPA_PAC_SKIP=y $PACMAN -U https://mirror.osbeck.com/archlinux/extra/os/x86_64/expect-5.45.4-4-x86_64.pkg.tar.zst --noconfirm -asdeps
fi
}
pre-update-routines(){
local exit_code=0
update_keyrings || exit_code=2
install_expect
return $exit_code
}
migrate-snigdhaos-repo() {
gawk -i inplace 'BEGIN {
err=1
}
{
if (rm)
{
if ($0 ~ /^ *(Include|Server) *=/)
{
next
}
# Check for empty line
else if ($0 ~ /^ *$/)
{
next
}
else
{
rm=0
}
}
if ($0 == "[options]")
{
print
next
}
else if ($0 == "[snigdhaos-core]")
{
if (set) {
rm=1
next
}
set=1
}
else if ($0 == "[core-testing]")
{
print "[testing]"
err=0
next
}
else if ($0 == "[community-testing]")
{
print "[extra-testing]"
err=0
next
}
else if ($0 == "[community]")
{
rm=1
err=0
next
}
}
/^\[[^ \[\]]+\]/ {
if (!set) {
print "[snigdhaos-core]"
print "Server = https://snigdha-os.github.io/snigdhaos-core/x86_64"
print ""
set=1
err=0
}
}
END {exit err}
1' /etc/pacman.conf
}
verify-core(){
local invalid_nvidia=()
if [ -f "/usr/lib/modprobe.d/nvidia-utils.conf" ] && [ -f "/usr/share/licenses/nvidia-dkms/LICENSE" ]; then
for i in /usr/lib/modules/[0-9]*; do
if pacman -Qo "${i}" &>/dev/null; then
local nvidia
nvidia="$(grep -ohP '^.*/nvidia.ko[^/]*(?=:)' "${i}/modules.dep" 2>/dev/null || true)"
if [ -z "$nvidia" ] || [[ "$(modinfo "${i}/${nvidia}" -F vermagic 2>/dev/null | cut -d' ' -f1)" != "${i##*/}" ]]; then
invalid_nvidia+=("${i##*/}")
fi
fi
done
fi
# Oops, at least one is invalid!
if [ ${#invalid_nvidia[@]} -ne 0 ]; then
dkms_version="$(pacman -Rddp --print-format %v nvidia-dkms 2>/dev/null)"
if [ -n "${dkms_version}" ]; then
echo -e "\n\033[1;33m-->\033[1;34m A problem with the NVIDIA drivers has been detected\033[0m"
fi
for i in "${invalid_nvidia[@]}"; do
if [ -n "${dkms_version}" ]; then
echo -e "\n\033[1;33m--->\033[1;34m Building NVIDIA DKMS module for kernel $i\033[0m"
dkms remove -m nvidia -v "${dkms_version%-*}" -k "$i" || true
dkms install -m nvidia -v "${dkms_version%-*}" -k "$i" && depmod "$i" && echo -e "\033[1;33m--->\033[1;32m NVIDIA DKMS module for kernel $i built successfully\033[0m" || echo -e "\033[1;33m--->\033[1;31m Failed to build NVIDIA DKMS module for kernel $i\033[0m"
elif command -v dkms >/dev/null; then
dkms autoinstall -k "$i" && depmod "$i"
fi
done
fi
}
"$@" exit "$?"

11
snigdhaos-updater/config Normal file
View File

@@ -0,0 +1,11 @@
##
## Garuda Update config
##
# Environment variables can be set in this config to modify the behavior of the garuda-update script.
# For more information, see the wiki page: https://wiki.garudalinux.org/garuda-update
#
# Uncomment the variables you wish to set.
# SKIP_MIRRORLIST=1
# UPDATE_AUR=1
# PACMAN_NOCONFIRM=1

View File

@@ -0,0 +1,217 @@
#!/bin/bash
set -e
init_logging(){
if [ ! -d /var/log/snigdhaos/ ]; then
# shellcheck disable=SC2174
mkdir -p -m 755 /var/log/snigdhaos/
fi
echo -e "\n>-<->-< snigdhaos-updater at $(date +"%Y-%m-%d %R %Z(%:::z)")\n" >>/var/log/snigdhaos/snigdhaos-updater
exec &> >(stdbuf -i0 -o0 -e0 tee >(sed '/\x1b\[[0-9][EF]/d;/\r[^\n]$/d;s,\x1B\[[0-9;]*[a-zA-Z],,g' >>/var/log/snigdhais/snigdhaos-updater))
}
parse_pacman_log(){
sed -i -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g" "$AUTOPACMAN_LOG"
local reason
reason="$(tac "$AUTOPACMAN_LOG" | grep -oP -m 1 '(?<=error: failed to commit transaction \().*(?=\))')"
case "$reason" in
"invalid or corrupted package"*)
RETRY="Snigdha OS Updater Found Corrupted Packages😑. Retying..."
CUSTOM_PACMAN_CONFIG="$(mktemp)"
# shellcheck disable=SC2016
sed 's|Include = /etc/pacman.d/chaotic-mirrorlist|Server = https://cdn-mirror.chaotic.cx/$repo/$arch|g' /etc/pacman.conf > "$CUSTOM_PACMAN_CONFIG"
pacman_args+=("--config" "$CUSTOM_PACMAN_CONFIG")
;;
"download library error")
RETRY="Snigdha OS Updater Found Corrupted Packages😑. Retying..."
CUSTOM_PACMAN_CONFIG="$(mktemp)"
sed '/^ParallelDownloads.*/d' /etc/pacman.conf >"$CUSTOM_PACMAN_CONFIG"
pacman_args+=("--config" "$CUSTOM_PACMAN_CONFIG")
;;
"conflicting files")
tac "$AUTOPACMAN_LOG" | gawk 'BEGIN { exitcode=1 }
/error: failed to commit transaction \(conflicting files\)/ { exit exitcode }
/\S+: (.*) exists in filesystem/ { if ($0 ~ /\S+:\/usr\/lib\/python[^\/]+\/site-packages\/[^/]+\/__pycache__\/.+\.pyc exists in filesystem/) { exitcode=0 } else { exit 1 } }
ENDFILE {exit 1}' && pacman_args+=("--overwrite" "/usr/lib/python*/site-packages/*/__pycache__/*.pyc") && RETRY="Overwriting Pycache file conflicts..." || true
;;
esac
}
update_mirrorlist(){
if [[ -v SKIP_MIRRORLIST ]]; then
return
fi
local MIRRORLIST_TEMP MINLINES=0
MIRRORLIST_TEMP="$(mktemp)"
# Rate-Mirrors
if command -v rate-mirrors >/dev/null; then
MINLINES=10
echo -e "\n\033[0;96m=>\033[0;96m [Rate-Mirrors]Refreshing Mirrorlist...🛸\033[0m"
rate-mirrors --allow-root --save="$MIRRORLIST_TEMP" arch --max-delay=21600 >/dev/null || { rm "$MIRRORLIST_TEMP"; }
$INT
# Reflector
elif command -v reflector >/dev/null; then
MINLINES=5
echo -e "\n\033[0;96m=>\033[0;96m [Reflector]Refreshing Mirrorlist...🛸\033[0m"
reflector --latest 10 --age 2 --fastest 10 --protocol https --sort rate --save "$MIRRORLIST_TEMP" || { rm "$MIRRORLIST_TEMP"; }
$INT
else
return
fi
# What if we are not using rate-mirrors and reflector?
if [ ! -f "$MIRRORLIST_TEMP" ]; then
echo -e "\033[0;91mMirrorlist Update Failed!\033[0m"
return
fi
if COUNT="$(grep -Ec "^Server *=" "$MIRRORLIST_TEMP")" && [ "$COUNT" -ge "$MINLINES" ]; then
install -m644 "$MIRRORLIST_TEMP" /etc/pacman.d/mirrorlist
# shellcheck disable=SC2034
DATABASE_UPDATED="force"
else
echo -e "\033[0;31Mirror Count Not Satisfied!\033[0m"
fi
echo
rm "$MIRRORLIST_TEMP"
}
do_update(){
if [ -x /usr/bin/expect ]; then
local AUTOPACMAN_LOG EXIT=0 RETRY=false CUSTOM_PACMAN_CONFIG="" SUCCESS=false
if [ ! -v AUTOPACMAN_CONFLICTSFILE ]; then
local AUTOPACMAN_CONFLICTSFILE
AUTOPACMAN_CONFLICTSFILE="$(mktemp -u)"
fi
AUTOPACMAN_LOG="$(mktemp)"
LANG=C LANGUAGE=C LC_ALL=C AUTOPACMAN_LOG="$AUTOPACMAN_LOG" AUTOPACMAN_PACMAN_NOCONFIRM="$PACMAN_NOCONFIRM" AUTOPACMAN_CONFLICTSFILE="$AUTOPACMAN_CONFLICTSFILE" /usr/lib/snigdhaos/snigdhaos-updater/auto-pacman "$PACMAN" "${pacman_args[@]}" || { EXIT=$?; }
if [ -n "$CUSTOM_PACMAN_CONFIG" ]; then
rm "$CUSTOM_PACMAN_CONFIG"
fi
if [ "$EXIT" == "134" ] || [ "$EXIT" == "0" ]; then
SUCCESS=true
fi
if [ "$SUCCESS" != "true" ] && [ -z "$ALREADY_RETRIED" ]; then
parse_pacman_log
fi
rm "$AUTOPACMAN_LOG"
if [ "$RETRY" != "false" ]; then
echo -e "\n\033[0;96m=>\033[0;96m $RETRY \n\033[0m"
ALREADY_RETRIED=true do_update
return
fi
if [ -v AUTOPACMAN_CONFLICTSFILE ]; then
rm -f "$AUTOPACMAN_CONFLICTSFILE"
unset AUTOPACMAN_CONFLICTSFILE
fi
if [ "$SUCCESS" == "false" ]; then
false
fi
else
$PACMAN "${pacman_args[@]}"
fi
}
show_changelog(){
if [ -e "/var/log/snigdhaos/tmp/update_notices" ]; then
echo -e "\033[0;96mUpdate:\n\033[0;96m$(gawk -F '\t' '{print $2}' /var/lib/snigdhaos/tmp/update_notices)\n\033[0m"
rm /var/lib/snigdhaos/tmp/update_notices
fi
}
if [ -f /etc/snigdhaos/snigdhaos-updater/config ]; then
# shellcheck disable=SC1091
source /etc/snigdhaos/snigdhaos-updater/config
fi
PARAMETERS=("$@")
PARSED_OPTIONS=$(getopt --options="a" --longoptions="aur,skip-mirrorlist,noconfirm" --name "$0" -- "${PARAMETERS[@]}")
if [[ $? -ne 0 ]]; then
echo -e "\033[0;31m\nFailed to parse CLI options\n\033[0m"
fi
eval set -- "$PARSED_OPTIONS"
while true; do
case "$1" in
-a | --aur)
UPDATE_AUR=1
shift
;;
--skip-mirrorlist)
SKIP_MIRRORLIST=1
shift
;;
--noconfirm)
PACMAN_NOCONFIRM=1
shift
;;
--)
shift
if [ "$SNIGDHAOS_UPDATE_SELFUPDATE" == 1 ] && [ "$#" -eq 1 ] && [ -z "$1" ]; then
break
fi
PACMAN_EXTRA_OPTS+=("${@}")
break
;;
*)
echo "Programming error"
exit 3
;;
esac
done
if grep -qE 'subvol=@/.snapshots/[0-9]+/snapshot' /proc/cmdline && [[ ! -v GARUDA_SNAPSHOT_PACMAN ]]; then
echo -e "\033[0;31mError: You are currently booted into a snapshot. Please restore the snapshot via btrfs-assistant or snapper-tools before updating your system.\n\033[0;34mNote: You can ignore this error by setting SNIGDHAOS_SNAPSHOT_PACMAN: SNIGDHAOS_SNAPSHOT_PACMAN=1 snigdhaos-updater\n\033[1;31mAny modifications made to this snapshot will be lost next reboot. ❌\033[0m"
exit 1
fi
init_logging
/usr/lib/snigdhaos/snigdhaos-updater/aux-script migrate-snigdhaos-repo && DATABASE_UPDATED=false || true
update_mirrorlist
self_update "${PARAMETERS[@]}"
/usr/lib/snigdhaos/snigdhaos-updater/aux-scripts pre-update-routines || { if [ "$?" -eq 2 ]; then self_update "${PARAMETERS[@]}"; fi; }
pacman_args=("-Su")
if [ "$DATABASE_UPDATED" == false ]; then pacman_args+=("-y"); elif [ "$DATABASE_UPDATED" == "force" ]; then pacman_args+=("-yy"); fi
while IFS= read -r line; do
pacman_args+=("$line")
done < <(/usr/lib/snigdhaos/snigdhaos-updater/aux-scripts package-replaces)
if [ -v PACMAN_EXTRA_OPTS ]; then
pacman_args+=("${PACMAN_EXTRA_OPTS[@]}")
fi
do_update
if [[ -v UPDATE_AUR ]]; then
if [ -x /usr/bin/paru ] && [[ -n "$SUDO_UID" ]]; then
echo -e "\n\033[1;33m-->\033[0;34m Updating AUR packages with paru..\033[0m"
sudo -u "#$SUDO_UID" paru -Sua || { echo -e "\033[1;31m\nParu exited with error code $?\n\033[0m"; }
elif [ -x /usr/bin/yay ] && [[ -n "$SUDO_UID" ]]; then
echo -e "\n\033[0;33m-->\033[0;34m Updating AUR packages with yay..\033[0m"
sudo -u "#$SUDO_UID" yay -Sua || { echo -e "\033[1;31m\nYay exited with error code $?\n\033[0m"; }
else
echo -e "\n\033[0;33m--> UPDATE_AUR specified but no supported AUR helper found ❌\033[0m"
fi
$INT
fi
if [ -x /usr/bin/locate ]; then
systemctl start updatedb.service --no-block
fi
/usr/lib/snigdhaos/snigdhaos-updater/aux-scripts verify-core
echo -e "\n\033[1;32m[SUCCESS]System updated ! \n\033[0m"
show_changelog

118
snigdhaos-updater/remote Normal file
View File

@@ -0,0 +1,118 @@
#!/bin/bash
set -e
task=${1:-'fix'}
keyring=false
reset_pacman=false
internal_update=0
if [ "$task" == "setup" ]; then
update
exit 0
elif [ "$task" == "keyring" ]; then
keyring=true
elif [ "$task" == "fix" ]; then
if [ "$VERSION" != 1 ]; then
echo "[RESET] Pacman Config !"
echo "Are you sure? (y/n)"
read yusure
[ $yusure != "y" ] && exit 1
fi
keyring=true
reset_pacman=true
elif [ "$task" == "fullfix" ]; then
if [ "$VERSION" != 1 ]; then
echo "[RESET] Pacman Config !"
echo -e "\033[0;33m[WARNING] Fullfix mode! Reinstall All Packages !\033[0m"
echo "Are you sure? (y/n)"
read yusure
[ $yusure != "y" ] && exit 1
fi
keyring=true
reset_pacman=true
internal_update=2
elif [ "$task" == "reinstall" ]; then
echo -e "\033[0;33m[WARNING] Fullfix mode! Reinstall All Packages !\033[0m"
echo "Are you sure? (y/n)"
read yusure
[ $yusure != "y" ] && exit 1
internal_update=2
elif [ "$task" == "reset-snapper" ]; then
exec bash -c ". <(wget -qO- https://raw.githubusercontent.com/Snigdha-OS/snigdhaos-pkgbuilds/master/common/snigdhaos-updater/reset-snapper)"
elif [ "$task" == "reset-audio" ]; then
internal_update=0
else
echo -e "\033[1;31m\nUnknown subcommand!\n\033[0m";
exit 1
fi
blackarch=false
if [ "$keyring" = true ] || [ "$reset_pacman" = true ]; then
grep -Fxq "[blackarch]" /etc/pacman.conf && blackarch=true
fi
# Get a usable pacman version if possible
pacman=pacman
if [ "$reset_pacman" = true ]; then
temp_file=$(mktemp)
wget https://pkgbuild.com/~morganamilo/pacman-static/x86_64/bin/pacman-static -O $temp_file && chmod +x $temp_file && pacman="$temp_file" || { echo -e "\033[1;31m\nFailed to download pacman-static\n\033[0m"; }
$pacman --version
wget https://gitlab.com/garuda-linux/tools/garuda-tools/-/raw/master/data/pacman-default.conf -O /etc/pacman.conf || { echo -e "\033[1;31m\nFailed to restore pacman.conf\n\033[0m"; }
# Set global CDN mirrors
wget https://archlinux.org/mirrorlist/all/ -O /etc/pacman.d/mirrorlist || true
cat <<-"EOF" >> /etc/pacman.d/mirrorlist
Server = http://mirrors.kernel.org/archlinux/$repo/os/$arch
Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch
Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch
EOF
# Set chaotic mirrors
wget https://aur.chaotic.cx/mirrorlist.txt -O /etc/pacman.d/chaotic-mirrorlist || cat <<-"EOF" > /etc/pacman.d/chaotic-mirrorlist
Server = https://random-mirror.chaotic.cx/$repo/$arch
Server = https://cdn-mirror.chaotic.cx/$repo/$arch
Server = https://geo-mirror.chaotic.cx/$repo/$arch
EOF
fi
if [ "$keyring" = true ]; then
rm -rf /etc/pacman.d/gnupg
rm -rf /var/lib/pacman/sync
pacman-key --init
pacman-key --populate archlinux chaotic || { echo -e "\033[1;31m\nFailed to populate keyrings\n\033[0m"; }
pacman-key --recv-key FBA220DFC880C036 6D42BDD116E0068F --keyserver keyserver.ubuntu.com && pacman-key --lsign-key FBA220DFC880C036 6D42BDD116E0068F || { echo -e "\033[1;31m\nFailed to install some keys\n\033[0m"; }
rm /var/cache/pacman/pkg/* || true
fi
# Re-set-up blackarch
if [ "$blackarch" == "true" ]; then
bash <(wget -qO- https://blackarch.org/strap.sh) && SKIP_AUTOSNAP=1 SNAP_PAC_SKIP=y $pacman -S blackarch-keyring --noconfirm --needed || { echo -e "\033[1;31m\nFailed to fix blackarch\n\033[0m"; } # Too bad
fi
if [ "$keyring" = true ]; then
SKIP_AUTOSNAP=1 SNAP_PAC_SKIP=y $pacman -Sy archlinux-keyring chaotic-keyring --noconfirm
fi
if [ "$internal_update" = "1" ]; then
$pacman -Syu
elif [ "$internal_update" = "2" ]; then
$pacman -Qqn | $pacman -Sy -
else
SKIP_AUTOSNAP=1 SNAP_PAC_SKIP=y $pacman -Sy --noconfirm --overwrite='*' garuda-update
PACMAN_EXE="$pacman" update
fi
if [ "$task" == "reset-audio" ]; then
if [ ! -z "$SUDO_USER" ]; then
pacman -Qq pipewire pipewire-pulse pipewire-media-session jamesdsp wireplumber pluseaudio 2>/dev/null || true
SKIP_AUTOSNAP=1 SNAP_PAC_SKIP=y pacman -S --needed wireplumber pipewire-support
systemctl disable --now pulseaudio pulseaudio.socket pipewire-media-session.service jack --user --machine=$SUDO_USER@.host
systemctl enable -f --now pipewire.socket pipewire-pulse.socket pipewire.service pipewire-pulse.service wireplumber.service --user --machine=$SUDO_USER@.host
else
echo -e "\033[1;31m\nCould not detect sudo user.\n\033[0m";
fi
fi
if [ ! -z "$temp_file" ]; then
rm -f $temp_file
fi

View File

@@ -0,0 +1,43 @@
#!/bin/bash
set -e
get_children_recursive() {
local children="$(echo "$VOLUMES" | awk -v id=$1 '{if (id == $7) {print $2}}')"
if [ ! -z "$children" ]; then
while IFS= read -r line ; do get_children_recursive $line; done <<< "$children"
echo "$children"
fi
}
if [[ "$(findmnt / -o options)" != *"subvol=/@"* ]]; then
echo "You are still booted into a snapshot."
exit
fi
# First, we stop snapperd so we don't screw stuff up. It will auto start when needed anyway.
systemctl stop snapperd
VOLUMES="$(btrfs subvolume list /)"
TO_DELETE=""
OLD_ROOTS="$(echo "$VOLUMES" | awk '/@_backup_[0-9]+\S+$/ {print $2} /restore_backup_\S+_[0-9]+$/ {print $2} /timeshift-btrfs\/snapshots\/[^\/]+\/@$/ {print $2}')"
# Find all children of OLD_ROOTS recursively
OLD_ROOTS_CHILDREN="$(while IFS= read -r line ; do get_children_recursive $line; done <<< "$OLD_ROOTS")"
TO_DELETE="$OLD_ROOTS_CHILDREN $OLD_ROOTS"
SNAPSHOTS_VOL="$(echo "$VOLUMES" | awk '/ .snapshots$/ {print $2; exit}')"
if [ ! -z "$SNAPSHOTS_VOL" ]; then
TO_DELETE+=" $(get_children_recursive $SNAPSHOTS_VOL) $SNAPSHOTS_VOL"
fi
for i in $TO_DELETE
do
btrfs subvolume delete -i $i /
done
# Now we force recreate the snapper configs
rm -f /etc/snapper/configs/*
rm -r /.snapshots/ || true
sed -i /etc/conf.d/snapper -e 's,SNAPPER_CONFIGS=.*,SNAPPER_CONFIGS=\"\",'
snapper create-config --template garuda /

View File

@@ -0,0 +1,8 @@
/var/log/snigdhaos/snigdhaos-updater {
daily
rotate 7
missingok
notifempty
maxsize 2M
noolddir
}

View File

@@ -0,0 +1,67 @@
#!/bin/bash
# shellcheck disable=SC2015
# shellcheck disable=SC1091
set -e
def_pacman_config(){
local TEMP_CONF
TEMP_CONF=$(mktemp)
# Configuring Backup Repo
echo -e "[snigdhaos-core]\nServer = https://snigdhalinux.github.io/snigdhaos-core/x86_64" >"$TEMP_CONF"
echo "$TEMP_CONF"
}
# Credit : Garuda Linux
# URL : https://garudalinux.org/
# Script Source : https://gitlab.com/garuda-linux/pkgbuilds/-/blob/main/garuda-update/garuda-update
self_update(){
local EXTRA_PARAMS=()
if [ "$DATABASE_UPDATED" == "force" ]; then
$PACMAN -Syy && DATABASE_UPDATED=true || true
elif [ "$DATABASE_UPDATED" != "true" ]; then
$PACMAN -Syy && DATABASE_UPDATED=true || true
fi
[ "$DATABASE_UPDATED" != "true" ] && local MIN_PACMAN_CONF && MIN_PACMAN_CONF="$(def_pacman_config)" && $PACMAN --config "$MIN_PACMAN_CONF" -Syy && EXTRA_PARAMS=("--config" "$MIN_PACMAN_CONF") || true
$INT
if $PACMAN "${EXTRA_PARAMS[@]}" -Qu snigdhaos-updater &>/dev/null; then
local success=true
if ! SNAP_PAC_SKIP=y SKIP_AUTOSNAP='' $PACMAN "${EXTRA_PARAMS[@]}" -Sdd snigdhaos-updater --needed --noconfirm; then
$INT
unshare -m bash -c 'mount -t tmpfs tmpfs /usr/share/libalpm/hooks && { [ ! -d /var/cache/pacman/pkg ] mount -t tmpfs tmpfs /var/cache/pacman/pkg; } && eval "$@"' -- SNAP_PAC_SKIP=y SKIP_AUTOSNAP='' "$PACMAN" "${EXTRA_PARAMS[@]}" --hookdir "/usr/share/libalpm/hooks" -Sdd snigdhaos-updater --needed --noconfirm || success=false
fi
$INT
if [ "$success" == "true" ]; then
SNIGDHAOS_UPDATER_SELFUPDATE=2 exec /usr/bin/snigdhaos-updater "$@"
fi
fi
$INT
}
INT=true
trap "INT=false" INT
if [[ $EUID -ne 0 ]]; then
exec sudo --preserve-env="SKIP_MIRRORLIST"
exit 1
fi
if [ "$1" == "remote" ]; then
exec bash -c "VERSION=6 . <(wget -qO- https://raw.githubusercontent.com/Snigdha-OS/snigdhaos-pkgbuilds/master/common/snigdhaos-updater/remote) \"\$@\"" remote "${@:2}"
fi
if [ -n "$PACMAN_EXE" ]; then
PACMAN="$PACMAN_EXE"
else
PACMAN="pacman"
fi
export PACMAN
DATABASE_UPDATED=false
if [ -n "$SNIGDHAOS_UPDATER_SELFUPDATE" ]; then
DATABASE_UPDATED=true
fi
self_update "$@"
source /usr/lib/snigdhaos/snigdhaos-updater/core-script

View File

@@ -0,0 +1,23 @@
#Maintainer: Eshan Roy <src.eshan@gmail.com>
pkgname=snigdhaos-virtualbox
pkgver=1
pkgrel=1
pkgdesc="Snigdha OS Virtual Box Dependency"
arch=('any')
depends=(
'hyperv'
'xf86-video-fbdev'
'open-vm-tools'
'xf86-video-vmware'
'qemu-guest-agent'
'spice-vdagent'
'virtualbox-guest-utils'
)
conflicts=()
replaces=()
pkgver() {
# cd "$srcdir/$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

View File

@@ -0,0 +1,23 @@
pkgname=snigdhaos-vscode-config
pkgver=1
pkgrel=1
pkgdesc="Snigdha OS VS Code Config."
arch=('any')
license=("MIT")
depends=('visual-studio-code-bin')
source=("$pkgname.tar.gz")
install="${pkgname}.install"
pkgver() {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
mkdir -p "${pkgdir}/etc/skel/.vscode"
mkdir -p "${pkgdir}/etc/skel/.config/Code/User"
cp -rf "${srcdir}/etc/skel/.config/Code/User/settings.json" "${pkgdir}/etc/skel/.config/Code/User/"
cp -rf "${srcdir}/etc/skel/.vscode/extensions" "${pkgdir}/etc/skel/.vscode/"
}
sha512sums=('SKIP')

View File

@@ -0,0 +1,11 @@
{
"workbench.iconTheme": "a-file-icon-vscode",
"workbench.colorTheme": "Material Theme Ocean",
"workbench.productIconTheme": "a-file-icon-vscode-product-icon-theme",
"workbench.startupEditor": "none",
"git.autofetch": true,
"explorer.confirmDelete": false,
"security.workspace.trust.untrustedFiles": "open",
"editor.fontFamily": "'Overpass Mono', 'monospace', monospace",
"editor.fontSize": 16
}

View File

@@ -0,0 +1,73 @@
{
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "Unthrottled",
"name": "Alex Simons",
"avatar_url": "https://avatars.githubusercontent.com/u/15972415?v=4",
"profile": "https://unthrottled.io",
"contributions": [
"infra",
"code",
"plugin"
]
},
{
"login": "Joristdh",
"name": "Joris te Dorsthorst",
"avatar_url": "https://avatars.githubusercontent.com/u/6518350?v=4",
"profile": "https://Joristdh.web.app",
"contributions": [
"ideas"
]
},
{
"login": "godfather1103",
"name": "Jack Chu",
"avatar_url": "https://avatars.githubusercontent.com/u/11797964?v=4",
"profile": "https://github.com/godfather1103",
"contributions": [
"bug"
]
},
{
"login": "donniean",
"name": "Donnie An",
"avatar_url": "https://avatars.githubusercontent.com/u/12584040?v=4",
"profile": "https://github.com/donniean",
"contributions": [
"code"
]
},
{
"login": "amstiel",
"name": "Alexey Kunitsky",
"avatar_url": "https://avatars.githubusercontent.com/u/9428948?v=4",
"profile": "https://github.com/amstiel",
"contributions": [
"code",
"ideas"
]
},
{
"login": "aparajita",
"name": "Aparajita Fishman",
"avatar_url": "https://avatars.githubusercontent.com/u/22218?v=4",
"profile": "https://github.com/aparajita",
"contributions": [
"ideas",
"code"
]
}
],
"contributorsPerLine": 7,
"projectName": "a-file-icon-idea",
"projectOwner": "mallowigi",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true
}

View File

@@ -0,0 +1,3 @@
[submodule "iconGenerator"]
path = iconGenerator
url = git@github.com:mallowigi/iconGenerator.git

View File

@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

Some files were not shown because too many files have changed in this diff Show More