progress as of 8/13/23

This commit is contained in:
Liam Waldron 2023-08-13 16:38:36 +00:00
parent 61fed8d6fd
commit 61daa251a7
2 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,39 @@
.\" Glacier tutorial manpage.
.TH man 1 "13 August 2023" "4.0" "Glacier Manual"
Glacier \- Package management system for Everest Linux
.SH INTRODUCTION
Glacier is the package management system designed for Everest Linux. Its main inspiration was Portage from Gentoo, taking further inspiration from Arch Linux's makepkg.
A list of all installed programs, called the index, is stored on the system. Glacier can then interact with this index.
.SH INCLUDED PROGRAMS
.TP
.BR gpkg(8)
Make changes to the local index
.TP
.BR syspkg(8)
Make changes to the system-wide index
.TP
.BR gquery(1)
Query information on a specific package
.TP
.BR glist(1)
List packages from an index
.TP
.BR gpc(1)
Check a package for syntax errors
.TP
.BR glacier-mkprofile(8)
Create a system-wide profile
.TP
.BR glacier-update-pkgdb(8)
Sync the local package database with the global server
.TP
.BR glacierg(8)
TUI able to merge, update, and remove packages
.SH TERMINOLOGY
This section covers basic terminology pertaining to Glacier.
The package index is a directory containing the package files for all packages installed by a user. The index is split into the user index, and the system index. The user index is located under /usr/glacier/index, and is intended for use by unprivileged users. On the other hand, the system index, located under /glacier/index, is managed by Git. It should not be modified under normal circumstances.
The system profile describes your base system, including the C library the system image was shipped with, which architecture it was compiled for, and whether SELinux and/or multilib support were enabled. Although Glacier includes a system for managing this, it should not be under normal circumstances.
.SH

32
src/services/update-pkgdb.hook Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
# SERVICE NAME: update-pkgdb
# SERVICE DESCRIPTION: Update the local package database
if [ "${GLACIER_ALLOW_SERVICES}" != "true" ]; then
printf "${red}[${error}]${reset} Glacier services are disabled.\n"
printf "${red}[${error}]${reset} Enable services by setting 'GLACIER_ALLOW_SERVICES' in /etc/glacier.conf to 'true'.\n"
printf "${red}[${error}]${reset} Services may pose a security risk to your system. Only use services from trusted users.\n"
exit 1
fi
ROOT_URL="https://git.everestlinux.org/EverestLinux"
MV_TO_DB="cd /usr/glacier/epkgs"
printf "${blue}[*]${reset} Updating system profile...\n"
source /etc/glacier/profile.conf
printf "${blue}[i]${reset} Using profile ${GLACIER_SYSTEM_PROFILE}.\n"
${MV_TO_DB}-${GLACIER_SYSTEM_PROFILE}
if [ "$?" != 0 ]; then
printf "${red}[${error}]${reset} Local package database does not exist.\n"
printf "${red}[${error}]${reset} Correct this by running:\n"
printf "${red}[${error}]${reset} 'mkdir /usr/glacier/epkgs-${GLACIER_SYSTEM_PROFILE} && glacier-update-pkgdb\n"
exit 1
fi
git pull
if [ "$?" != 0 ]; then
printf "${red}[${error}]${reset} Error while updating database.\n"
exit 1
fi
printf "${green}[${check}]${reset} Package database updated successfully.\n"
exit 0