Compare commits
1 Commits
testing
...
everest-li
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a94ed2f723 |
58
README.md
58
README.md
@@ -1,58 +1,6 @@
|
||||

|
||||
|
||||
# Glacier
|
||||
Glacier is the package manager developed for Everest Linux. It fetches packages from https://github.com/everest-linux/glacier-pkgs
|
||||
Glacier is the package manager developed for Everest Linux. It automatically fetches a tarball, unzips it, and compiles it.
|
||||
|
||||
Install Glacier by pasting the following command into your terminal:
|
||||
```
|
||||
rm -rf /tmp/glacier && cd /tmp && git clone https://github.com/everest-linux/glacier &&
|
||||
cd glacier/install && chmod +x INSTALL-GLACIER.sh && sudo ./INSTALL-GLACIER.sh || doas ./INSTALL-GLACIER.sh
|
||||
```
|
||||
For Glacier to work properly, you need to have both wget and tar installed.
|
||||
For Glacier to work properly, it needs the following directories to be made:
|
||||
|
||||
Glacier depends on wget and tar for its backends. It also requires a working C compiler for source packages to work correctly. Some packages may have their own sets of dependencies. All of these are configured by default in the Everest rootfs tarball, but you may need some extra configuration to get these programs on other distros, most notably, Arch and its derivatives.
|
||||
|
||||
Glacier is intended to be a universal package manager, and should work on all distros, providing you have wget and tar installed. For the sake of compatibility, all scripts submitted should contain **NON DISTRO SPECIFIC COMMANDS**.
|
||||
|
||||
# Submitting Packages
|
||||
|
||||
Packages should be submitted by sending a pull request to https://github.com/everest-linux/glacier-pkgs, with your package in the proper testing repository (if its system software, world-testing, if its gpl software, galaxy-testing, etc). A maintainer will test the package to make sure it downloads correctly.
|
||||
|
||||
# Latest News
|
||||
|
||||
5/27/22 > Happy Memorial Day to everyone in the US. I've added a new file, `/etc/glacier/hooks.sh` that will define startup hooks when any Glacier script is run. It is highly recommended to keep both default hooks, and to create `/etc/make.conf`. 1.3
|
||||
|
||||
5/17/22 > Considering adding command line parsing
|
||||
|
||||
5/3/22 > Multi repository support is back! 1.2
|
||||
|
||||
5/3/22 > Multi-repository support might return, as I've discovered "||". 1.1 (only minor changes, such as line printing)
|
||||
|
||||
4/20/22 > Colored output, and proper unicode symbols. First stable Glacier release, 1.0
|
||||
|
||||
4/13/22 > Multi-repository support has been temporarily removed, due to incorrect error handling. 0.7.5rc
|
||||
|
||||
4/12/22 > Added support for multiple repositories (world, galaxy, universe, multiverse, and their testing counterparts).
|
||||
|
||||
4/5/22 > Added package timestamps. New package uploads will be halted until all current packages have timestamp capabilities added. To do this, add a script called (package_name).ts.sh, which should contain 2 commands:
|
||||
```
|
||||
touch /var/log/glacier/(package_name).timestamp
|
||||
date >> /var/log/glacier/(package_name).timestamp
|
||||
```
|
||||
0.6rc.
|
||||
|
||||
3/28/22 (again) > Added package caching. This is useful if the user wishes to customize package instruction scripts before installing. 0.5rc
|
||||
|
||||
3/28/22 > Recovered from sickness, released 0.4rc. This update provides proper cleanup after an operation is complete. This is done by making a temporary directory that the tarball will be unpacked into. Also added the logo to README.md
|
||||
|
||||
3/22/22 > Sorry for a lack of updates recently, I've been sick
|
||||
|
||||
3/16/22 > Vim has been added to Glacier's package collection as a source package. Additionally, a couple of bugs have been ironed out. To install vim, you must be on the latest version of Glacier. This can be done by cloning this repository, marking UPDATE-GLACIER.sh as executable, and running it as root. I plan on porting more vital system software to the repositories before I release another Everest tarball. Current version: (0.3rc)
|
||||
|
||||
3/10/22 > Proper error handling has finally been added! If an operation fails, the package manager will quit, instead of continuing with the operation. Current version: (0.2rc)
|
||||
|
||||
# Roadmap
|
||||
|
||||
Future: musl libc and musl compiler compatability (change gcc to $CC)
|
||||
|
||||
Sometime within the next few months: command line parsing and multi-repository support, all neccessary packages ported
|
||||
`/usr/local/lib/glacier/packages`
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Glacier Installation Script
|
||||
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo "[ X ] Please run Glacier installation script as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
mv ../scripts/glacier.conf /etc
|
||||
mkdir /etc/glacier && echo "[ i ] Creating Glacier directory..."
|
||||
mkdir /etc/glacier/pkginfo && echo "[ i ] Creating Glacier package list directory..."
|
||||
mkdir /var/cache/glacier && echo "[ i ] Creating Glacier package cache..."
|
||||
mkdir /var/log/glacier && echo "[ i ] Creating Glacier timestamp log..."
|
||||
mv ../scripts/hooks.sh /etc/glacier
|
||||
chmod +x ../scripts/glacier
|
||||
echo "[ i ] Installing glacier..."
|
||||
cd ../scripts
|
||||
mv glacier /bin
|
||||
echo "[ i ] Glacier has finished installing successfully."
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo "[ X ] Please run Glacier uninstallation as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "[ ! ] It is recommended to uninstall all Glacier packages before uninstalling Glacier."
|
||||
echo "[ ! ] This will prevent untracked packages from remaining on your system and possibly creating a security risk."
|
||||
echo "[ ! ] To see which packages are installed on your system, run the following command:"
|
||||
echo "[ ! ] ls /etc/glacier/pkginfo"
|
||||
while true; do
|
||||
read -p "[ ? ] Would you like to uninstall Glacier?" yn
|
||||
case $yn in
|
||||
[Yy]* ) rm -rf /etc/glacier && rm -rf /var/cache/glacier && rm -rf /var/log/glacier && rm /bin/glacier; break;;
|
||||
[Nn]* ) exit;;
|
||||
* ) echo "[ ! ] You must answer either yes or no.";;
|
||||
esac
|
||||
done
|
||||
206
scripts/glacier
206
scripts/glacier
@@ -1,206 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Glacier - A source based package manager written in POSIX sh
|
||||
# (C) 2022 Everest Developers
|
||||
# This program is free software: see the GNU GPL v3.0 for details.
|
||||
|
||||
# Preloading
|
||||
|
||||
source /etc/glacier/hooks.sh
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
-h|--help)
|
||||
printf "$blue Glacier - A source based package manager written in POSIX sh $reset\n"
|
||||
printf "glacier {-h --help} show this message and exit\n"
|
||||
printf "glacier {--version} display the current Glacier version and exit\n"
|
||||
printf "glacier {install -f} install a package\n"
|
||||
printf "glacier {update -u} update a package\n"
|
||||
printf "glacier {remove -x} remove a package\n"
|
||||
printf "glacier {query -q} query a package\n"
|
||||
printf "glacier {cache -c} cache a package\n"
|
||||
printf "glacier {cache-install -ci} install a cached package\n"
|
||||
printf "glacier {cache-clear -cc} clear the package cache\n"
|
||||
printf "\n"
|
||||
printf "This program is free software: see the GNU GPL v3.0 for details.\n"
|
||||
exit 0
|
||||
;;
|
||||
--version)
|
||||
printf "$blue Glacier v2.0 $reset\n"
|
||||
exit 0
|
||||
;;
|
||||
install|-f)
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Please run Glacier as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input
|
||||
printf "\033[1;34m [ i ] \033[m Installing $input.tar.gz...\n"
|
||||
printf "\033[1;34m [ i ] \033[m Checking databases... " && wget $GREPO1/$input.tar.gz -q --show-progress || wget $GREPO2/$input.tar.gz -q --show-progress || wget $GREPO3/$input.tar.gz -q --show-progress || wget $GREPO4/$input.tar.gz -q --show-progress || wget $GREPO5/$input.tar.gz -q --show-progress || wget $GREPO6/$input.tar.gz -q --show-progress || wget $GREPO7/$input.tar.gz -q --show-progress || wget $GREPO8/$input.tar.gz -q --show-progress
|
||||
if [ "$?" != "0" ]; then
|
||||
printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Package not found. " 1>&2
|
||||
exit 1
|
||||
fi
|
||||
printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz...\n"
|
||||
mkdir $input && mv $input.tar.gz $input && cd $input
|
||||
tar -xf $input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Could not unpack $input.tar.gz. " 1>&2
|
||||
exit 1
|
||||
fi
|
||||
chmod +x INSTALL.sh
|
||||
chmod +x $input.ts.sh
|
||||
printf "\033[1;34m [ i ] \033[m Executing installation instructions...\n"
|
||||
./INSTALL.sh # Actually executes installation script
|
||||
./$input.ts.sh
|
||||
printf "\033[1;34m [ i ] \033[m Cleaning up...\n" # Status message
|
||||
mv $input-pkginfo.json /etc/glacier/pkginfo
|
||||
cd ..
|
||||
rm -rf $input
|
||||
printf "\033[1;32m [ \xE2\x9C\x93 ] \033[m Operation completed.\n"
|
||||
exit 0
|
||||
;;
|
||||
update|-u)
|
||||
# Require Glacier to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
printf "\033[1;31m [ $error ] \033[m Please run Glacier as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input
|
||||
printf "\033[1;34m [ i ] \033[m Installing $input.tar.gz...\n"
|
||||
printf "\033[1;34m [ i ] \033[m Checking databases... " && wget $GREPO1/$input.tar.gz -q --show-progress || wget $GREPO2/$input.tar.gz -q --show-progress || wget $GREPO3/$input.tar.gz -q --show-progress || wget $GREPO4/$input.tar.gz -q --show-progress || wget $GREPO5/$input.tar.gz -q --show-progress || wget $GREPO6/$input.tar.gz -q --show-progress || wget $GREPO7/$input.tar.gz -q --show-progress || wget $GREPO8/$input.tar.gz -q --show-progress
|
||||
if [ "$?" != "0" ]; then
|
||||
printf "\033[1;31m [ $error ] \033[m Package not found. " 1>&2
|
||||
exit 1
|
||||
fi
|
||||
printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz...\n"
|
||||
mkdir $input && mv $input.tar.gz $input && cd $input
|
||||
tar -xf $input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz. " 1>&2
|
||||
exit 1
|
||||
fi
|
||||
rm /var/log/glacier/$input.timestamp
|
||||
chmod +x UPDATE.sh
|
||||
chmod +x $input.ts.sh
|
||||
./UPDATE.sh
|
||||
./$input.ts.sh
|
||||
printf "\033[1;34m [ i ] \033[m Cleaning up...\n"
|
||||
mv $input-pkginfo.json /etc/glacier/pkginfo
|
||||
mv $input.timestamp /var/log/glacier
|
||||
cd ..
|
||||
rm -rf $input
|
||||
printf "\033[1;32m [ $check ] \033[m Operation completed.\n"
|
||||
exit 0
|
||||
;;
|
||||
remove|-x)
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
printf "\033[1;31m [ $error ] \033[m Please run Glacier as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input
|
||||
printf "\033[1;34m [ i ] \033[m Removing $input.tar.gz...\n"
|
||||
printf "\033[1;34m [ i ] \033[m Checking databases... " && wget $GREPO1/$input.tar.gz -q --show-progress || wget $GREPO2/$input.tar.gz -q --show-progress || wget $GREPO3/$input.tar.gz -q --show-progress || wget $GREPO4/$input.tar.gz -q --show-progress || wget $GREPO5/$input.tar.gz -q --show-progress || wget $GREPO6/$input.tar.gz -q --show-progress || wget $GREPO7/$input.tar.gz -q --show-progress || wget $GREPO8/$input.tar.gz -q --show-progress
|
||||
if [ "$?" != "0" ]; then
|
||||
printf "\033[1;31m [ $error ] \033[m Package not found. " 1>&2
|
||||
exit 1
|
||||
fi
|
||||
printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz...\n"
|
||||
mkdir $input && mv $input.tar.gz $input && cd $input
|
||||
tar -xf $input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz. " 1>&2
|
||||
exit 1
|
||||
fi
|
||||
chmod +x REMOVE.sh
|
||||
./REMOVE.sh
|
||||
rm /var/log/glacier/$input.timestamp
|
||||
printf "\033[1;34m [ i ] \033[m Cleaning up... \n" # Status message
|
||||
cd ..
|
||||
rm -rf $input
|
||||
rm /etc/glacier/pkginfo/$input-pkginfo.json
|
||||
printf "\033[1;32m [ $check ] \033[m Operation completed.\n"
|
||||
exit 0
|
||||
;;
|
||||
query|-q)
|
||||
printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input
|
||||
cat /etc/glacier/pkginfo/$input-pkginfo.json
|
||||
cat /var/log/glacier/$input.timestamp
|
||||
if [ "$?" != "0" ]; then
|
||||
printf "\033[1;31m [ $error ] \033[m Package not found. " 1>&2
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
cache|-c)
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
printf "\033[1;31m [ $error ] \033[m Please run Glacier as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input
|
||||
printf "\033[1;34m [ i ] \033[m Caching $input.tar.gz...\n"
|
||||
printf "\033[1;34m [ i ] \033[m Checking databases... " && wget $GREPO1/$input.tar.gz -q --show-progress || wget $GREPO2/$input.tar.gz -q --show-progress || wget $GREPO3/$input.tar.gz -q --show-progress || wget $GREPO4/$input.tar.gz -q --show-progress || wget $GREPO5/$input.tar.gz -q --show-progress || wget $GREPO6/$input.tar.gz -q --show-progress || wget $GREPO7/$input.tar.gz -q --show-progress || wget $GREPO8/$input.tar.gz -q --show-progress
|
||||
if [ "$?" != "0" ]; then
|
||||
printf "\033[1;31m [ $error ] \033[m Package not found. " 1>&2
|
||||
exit 1
|
||||
fi
|
||||
mv $input.tar.gz /var/cache/glacier
|
||||
printf "\033[1;32m [ $check ] \033[m Operation completed."
|
||||
exit 0
|
||||
;;
|
||||
cache-install|-ci)
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo "$red[ $error ]$reset Please run Glacier as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input
|
||||
printf "\033[1;34m [ i ] \033[m Checking cache for $input.tar.gz... "
|
||||
cd /var/cache/glacier && cp $input.tar.gz /tmp && cd /tmp
|
||||
if [ "$?" != "0" ]; then
|
||||
printf "\033[1;31m [ $error ] \033[m Could not fetch package from cache. " 1>&2
|
||||
exit 1
|
||||
fi
|
||||
printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz... "
|
||||
mkdir $input && mv $input.tar.gz $input && cd $input
|
||||
tar -xf $input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz. " 1>&2
|
||||
exit 1
|
||||
fi
|
||||
chmod +x INSTALL.sh
|
||||
chmod +x $input.ts.sh
|
||||
./INSTALL.sh # Actually executes installation script
|
||||
./$input.ts.sh
|
||||
printf "\033[1;34m [ i ] \033[m Cleaning up... " # Status message
|
||||
mv -v $input-pkginfo.json /etc/glacier/pkginfo
|
||||
cd ..
|
||||
rm -rvf $input
|
||||
printf "\033[1;32m [ $check ] \033[m Operation completed."
|
||||
exit 0
|
||||
;;
|
||||
cache-clear|-cc)
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
printf "\033[1;31m [ $error ] \033[m Please run Glacier as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
printf "\033[1;34m [ i ] \033[m Clearing cache... "
|
||||
cd /var/cache/glacier && rm *
|
||||
printf "\033[1;32m [ $check ] \033[m Cache cleared."
|
||||
exit 0
|
||||
;;
|
||||
-*|--*)
|
||||
printf "$red[ $error ]$reset Unknown option, use 'glacier -h' to see usage. $reset"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -1,22 +0,0 @@
|
||||
# Glacier configuration file
|
||||
|
||||
# Repositories Glacier will use
|
||||
GREPO1=https://github.com/everest-linux/glacier-pkgs/raw/main/world # System Software
|
||||
GREPO2=https://github.com/everest-linux/glacier-pkgs/raw/main/galaxy # GPL Only Software
|
||||
GREPO3=https://github.com/everest-linux/glacier-pkgs/raw/main/universe # All Open Source Software
|
||||
#GREPO4=https://github.com/everest-linux/glacier-pkgs/raw/main/multiverse # Proprietary Software
|
||||
#GREPO5=https://github.com/everest-linux/glacier-pkgs/raw/main/world-testing
|
||||
#GREPO6=https://github.com/everest-linux/glacier-pkgs/raw/main/galaxy-testing
|
||||
#GREPO7=https://github.com/everest-linux/glacier-pkgs/raw/main/universe-testing
|
||||
#GREPO8=https://github.com/everest-linux/glacier-pkgs/raw/main/multiverse-testing
|
||||
|
||||
# Define colors and unicode symbols to be used
|
||||
export red="\033[1;31m"
|
||||
export green="\033[1;32m"
|
||||
export yellow="\033[1;33m"
|
||||
export blue="\033[1;34m"
|
||||
export reset="\033[m"
|
||||
export check="\xE2\x9C\x93"
|
||||
export error="\xE2\x9C\x95"
|
||||
export warning="\x21"
|
||||
export question="\x3F"
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
# /etc/glacier/hooks.sh
|
||||
# Hooks that will be run while calling Glacier
|
||||
|
||||
source /etc/glacier.conf
|
||||
source /etc/make.conf
|
||||
Reference in New Issue
Block a user