New README and devtools created
This commit is contained in:
parent
43219e7ed0
commit
216969eebc
78
README
Normal file
78
README
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
+--------------------------------------+
|
||||||
|
| Welcome to the Glacier package index |
|
||||||
|
+--------------------------------------+
|
||||||
|
|
||||||
|
This is the official package repository for Glacier.
|
||||||
|
|
||||||
|
+---------------------+
|
||||||
|
| Submitting Packages |
|
||||||
|
+---------------------+
|
||||||
|
|
||||||
|
Submitting packages is limited to trusted users only.
|
||||||
|
Additionally, these steps assume you have access to gpc.
|
||||||
|
A copy is available in glacier-pkgs/devtools
|
||||||
|
|
||||||
|
1) Clone this repository. This will take a while.
|
||||||
|
|
||||||
|
2) Ensure your trusted user key is valid.
|
||||||
|
|
||||||
|
3) Create a package archive. This needs to include the following:
|
||||||
|
- The package's source tree
|
||||||
|
- INSTALL.sh
|
||||||
|
- UPDATE.sh
|
||||||
|
- REMOVE.sh
|
||||||
|
- package_name-pkginfo.json, containing the following:
|
||||||
|
{
|
||||||
|
"package_name": "",
|
||||||
|
"package_version": "",
|
||||||
|
"package_description": "",
|
||||||
|
"src_tree_size": "",
|
||||||
|
"exec_size": "",
|
||||||
|
"license": ""
|
||||||
|
}
|
||||||
|
- package_name.ts.sh, containing the following:
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
touch /var/log/glacier/package_name.timestamp
|
||||||
|
date >> /var/log/glacier/package_name.timestamp
|
||||||
|
|
||||||
|
As well as submitting the package itself, a separate file, package_name.checksum
|
||||||
|
needs to be submitted as well.
|
||||||
|
|
||||||
|
Licenses need to follow this naming scheme:
|
||||||
|
- GPL V3, GPL V2
|
||||||
|
- MIT, BSD, Apache
|
||||||
|
For all other licenses, use the license name.
|
||||||
|
|
||||||
|
Once all of these files are in a directory, run:
|
||||||
|
(user)$ gpc check package_dir
|
||||||
|
# If any errors are detected by gpc, recheck everything
|
||||||
|
(user)$ gpc mkpkg package_dir
|
||||||
|
(user)$ mv package_dir/package_name.tar.gz package_dir/package_name.checksum .
|
||||||
|
|
||||||
|
4) Create a new branch from main. Name it the following:
|
||||||
|
maintainer_name-date
|
||||||
|
|
||||||
|
5) Submit the package, ensuring it is in the correct directory within this repository:
|
||||||
|
- world-testing, for system software
|
||||||
|
- galaxy-testing, for GPL software ONLY
|
||||||
|
- universe-testing, for other open source licensed software
|
||||||
|
- multiverse-testing, for proprietary, EULA, and binary-redistributable software
|
||||||
|
|
||||||
|
6) Merge your branch with main.
|
||||||
|
|
||||||
|
7) Test your package. 1 other trusted user must test the package
|
||||||
|
and ensure it works correctly.
|
||||||
|
|
||||||
|
After the package has been verified, repeat step 4, and move your package out
|
||||||
|
of testing and into stable.
|
||||||
|
|
||||||
|
+------------------------------+
|
||||||
|
| Reporting License Violations |
|
||||||
|
+------------------------------+
|
||||||
|
|
||||||
|
If your software is included in Glacier's package index, and we
|
||||||
|
are violating your license, reach out to any developer and we
|
||||||
|
will be happy to resolve the issue with you.
|
||||||
|
|
||||||
|
|
31
README.md
31
README.md
@ -1,31 +0,0 @@
|
|||||||
# glacier-pkgs
|
|
||||||
|
|
||||||
Collection of packages used by the Glacier package manager.
|
|
||||||
|
|
||||||
There are 2 different packaging methods.
|
|
||||||
|
|
||||||
The first, which is used if your program is relatively simple (only one or 2 executables installed), is relatively simple.
|
|
||||||
|
|
||||||
The second, which is used for more complex programs (a lot of executables installed and a lot of programs made), compiles said programs from source.
|
|
||||||
|
|
||||||
Regardless of which method you choose, all archives must have the following files:
|
|
||||||
|
|
||||||
- An information file named "{package_name}-pkginfo.json", which must contain the package's name, version, description, source tree size, executable size, and any dependencies that Glacier will install, and the name of the license (if it utilizes a license that is not GPL 3.0)
|
|
||||||
- A script named INSTALL.sh describing what steps must be taken to install the package
|
|
||||||
- A script named UPDATE.sh describing what steps must be taken to update the package
|
|
||||||
- A script named REMOVE.sh describing what steps must be taken to remove the package
|
|
||||||
- The executable (or the source tree if the program will be compiled from source)
|
|
||||||
- (optional) a copy of the license (if it utilizes a license that is not GPL 3.0)
|
|
||||||
- A separate file in the repositories named (package_name).signature (this can be done by running `shasum (package).tar.gz`)
|
|
||||||
|
|
||||||
In the world repository, there should only be system software
|
|
||||||
|
|
||||||
In the galaxy repository, there should be GPL only software
|
|
||||||
|
|
||||||
In the universe repository, there can only be open source software (any license)
|
|
||||||
|
|
||||||
In the multiverse repository, there should only be proprietary software
|
|
||||||
|
|
||||||
**NOTICES**
|
|
||||||
|
|
||||||
Soon we will begin migrating packages to their correct repositories.
|
|
98
devtools/gpc
Executable file
98
devtools/gpc
Executable file
@ -0,0 +1,98 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Glacier package checker
|
||||||
|
|
||||||
|
INSCRIPT=INSTALL.sh
|
||||||
|
UPSCRIPT=UPDATE.sh
|
||||||
|
RMSCRIPT=REMOVE.sh
|
||||||
|
|
||||||
|
PKGINFO=*-pkginfo.json
|
||||||
|
|
||||||
|
TIMESTAMP=*.ts.sh
|
||||||
|
|
||||||
|
check_dir() {
|
||||||
|
printf "Searching for package directory...\n"
|
||||||
|
if [ -d "$2" ]; then
|
||||||
|
printf "${green}$2 exists.${reset}\n"
|
||||||
|
else
|
||||||
|
printf "${red}$2 does not exist.${reset}\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $2
|
||||||
|
printf "Searching for instruction scripts...\n"
|
||||||
|
if [ -f $INSCRIPT -a -f $UPSCRIPT -a -f $RMSCRIPT ]; then
|
||||||
|
printf "${green}Instruction scripts exist.${reset}\n"
|
||||||
|
else
|
||||||
|
printf "${red}Instruction scripts do not exist.${reset}\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "Searching for miscellaneous files...\n"
|
||||||
|
if [ -f $PKGINFO -a -f $TIMESTAMP ]; then
|
||||||
|
printf "${green}$2-pkginfo.json and $2.ts.sh exist.${reset}\n"
|
||||||
|
else
|
||||||
|
printf "${red}$2-pkginfo.json and $2.ts.sh do not exist.${reset}\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
mkpkg() {
|
||||||
|
printf "${blue} Making package...${reset}\n"
|
||||||
|
cd $2
|
||||||
|
tar -czvf $2.tar.gz *
|
||||||
|
printf "${blue}Generating package checksum...${reset}\n"
|
||||||
|
cd ..
|
||||||
|
sha256sum $2/$2.tar.gz >> $2.checksum
|
||||||
|
printf "${green}Finished making package${reset}\n"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
helpmsg() {
|
||||||
|
printf "gpc - test and create Glacier compatible packages\n"
|
||||||
|
printf "usage: gpc [check] [mkpkg] [-h/--help] [-v/--version] pkg-dir\n"
|
||||||
|
printf "\n"
|
||||||
|
printf "gpc {-h|--help} show this message and exit\n"
|
||||||
|
printf "gpc {-v|--version} show the version and exit\n"
|
||||||
|
printf "gpc {check} check a package directory for compliance\n"
|
||||||
|
printf "gpc {mkpkg} create a package from a directory\n"
|
||||||
|
printf "\n"
|
||||||
|
printf "This program is free software.\n"
|
||||||
|
printf "See the GNU GPL version 3 for details.\n"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
helpmsg_small() {
|
||||||
|
printf "usage: gpc [check] [mkpkg] [-h/--help] [-v/--version] pkg-dir\n"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
printver() {
|
||||||
|
printf "gpc v2.0.0\n"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
preload() {
|
||||||
|
. $(pwd)/gpc.conf
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
printf "error while parsing gpc config file\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
-h|--help)
|
||||||
|
helpmsg "$@"
|
||||||
|
;;
|
||||||
|
-v|--version)
|
||||||
|
printver "$@"
|
||||||
|
;;
|
||||||
|
check)
|
||||||
|
check_dir "$@"
|
||||||
|
;;
|
||||||
|
mkpkg)
|
||||||
|
mkpkg "$@"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
helpmsg_small "$@"
|
||||||
|
;;
|
||||||
|
esac
|
7
devtools/gpc.conf
Executable file
7
devtools/gpc.conf
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
# $(pwd)/gpc.conf
|
||||||
|
|
||||||
|
# Colors and unicode symbols to be used
|
||||||
|
export red="\033[1;31m"
|
||||||
|
export green="\033[1;32m"
|
||||||
|
export blue="\033[1;34m"
|
||||||
|
export reset="\033[m"
|
Loading…
Reference in New Issue
Block a user