Skip to content

Commit

Permalink
Merge v1.1.0 with master
Browse files Browse the repository at this point in the history
Merge v1.1.0 with master
  • Loading branch information
knuxify authored Sep 3, 2019
2 parents a7b1658 + 2127ab4 commit c81bffd
Show file tree
Hide file tree
Showing 12 changed files with 706 additions and 75 deletions.
69 changes: 62 additions & 7 deletions .run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,71 @@ ls ~/.config/shoppe/*
./shoppe remove boredbutton +nc
! [[ -e "/usr/bin/bored" ]]

./shoppe install ~/boredbutton.tar.gz +nc
[[ -e "/usr/bin/bored" ]]

ls ~/.config/shoppe
ls ~/.config/shoppe/*

./shoppe remove boredbutton +nc
! [[ -e "/usr/bin/bored" ]]

./shoppe update +nc
./shoppe upgrade +nc
./shoppe info boredbutton
! ./shoppe info pkgthatdoesnotexist
./shoppe listall
./shoppe fetch boredbutton

#
# shoppe-utils testing
#

echo "$(echo '#!/bin/bash -x' && grep -v '^\#\!\/' shoppe-utils)" > shoppe-utils-testing
mv shoppe-utils-testing shoppe-utils
chmod +x shoppe-utils

! ./shoppe-utils
./shoppe-utils --version
./shoppe-utils --help
! ./shoppe-utils pkg
! ./shoppe-utils subsetthatdoesnotexist

wget https://raw.githubusercontent.com/shoppepm/shoppe-repos/master/boredbutton/shoppepkg
./shoppe-utils pkg validate shoppepkg
echo "broken package" > brokenpkg
! ./shoppe-utils pkg validate brokenpkg
! ./shoppe-utils pkg validate shoppepkg brokenpkg

./shoppe-utils tools clearconfig
[[ ! -e ~/.config/shoppe/ ]]

#
# shoppe upgrade testing
#

mkdir ~/testrepo
./shoppe-utils repo addpkg ~/boredbutton.tar.gz ~/testrepo
sed "/pkgrel/d" "$HOME/testrepo/boredbutton/shoppepkg" > "$HOME/testrepo/boredbutton/shoppepkg.tmp"
mv "$HOME/testrepo/boredbutton/shoppepkg.tmp" "$HOME/testrepo/boredbutton/shoppepkg"
echo "pkgrel='999'" >> "$HOME/testrepo/boredbutton/shoppepkg"
./shoppe-utils repo restock ~/testrepo +nc
ls ~/testrepo/*

./shoppe addrepo ~/testrepo
./shoppe upgrade +nc

#if [[ "$(git branch | grep \* | cut -d ' ' -f2)" == "develop" ]]; then
# git checkout master-candidate
# git merge develop
# echo "$(echo '# shoppe [![Build Status](https://travis-ci.org/shoppepm/shoppe.svg?branch=master-candidate)](https://travis-ci.org/shoppepm/shoppe)' && grep -v '^\#\ shoppe/' README.md)" > README.md.tmp
# mv README.md.tmp README.md
# git push --set-upstream origin master-candidate
#fi
if [[ "$TRAVIS_BRANCH" == "develop" ]]; then
git clone https://github.com/shoppepm/shoppe "$HOME/shoppetopush" -b develop
cd "$HOME/shoppetopush"
git reset --hard "$TRAVIS_COMMIT"
openssl aes-256-cbc -k "$travis_key_password" -d -md sha256 -a -in travis_key.enc -out travis_key
echo "Host github.com" > ~/.ssh/config
echo " IdentityFile $(pwd)/travis_key" >> ~/.ssh/config
chmod 400 travis_key
git remote set-url origin git@github.com:shoppepm/shoppe.git
#echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCzLrHyNpg2pyChu3ZhTVkoRF4TvvUmzlWO9KXGK9rXDMz/167X7/z4XvyXqwQWP18iMLVdFuzrhKlZ7lXWf91O43fuWUjgNGrXXlsB008HLTYAiJmZK0Vymy24BBkv/o5tkAEOTSpr/rUqwh5VmObexF9xOLeNpR05r6SuHKJ24sVMETt85BTQi7lr9L6vk7MqrZgBjklfeP/atWWu0GnH8um0DS3GO7/F7+gVXvmEo9YCSHBEOkvGWE2UQRLlIQlaJDabUC7DtUP3hWnb3TNLuHpk3zhqwel8Rvb1UWJYvZ2bCYDbVM3pRQXToR5LZy7nd59yXoc7Zx7HL80zIDuugS8vuD4JNf8LVNeVPGQh3VJXpER5ofQHuJD0RrlUoSSlLU7YdGyEiBUR71e6PvbU/bmI0aNs/taod2uqesVIZdg83JD8LxTKSCbVUKVLypmSMISg/xFbGLrtYSDRUvMO1in2WGPhmKONDTVq2mZ99JlV7tQIZ4sUJfkcn4iUnKRAh1of+c+7zmR8V62/ZwqvFdbHOsr86IJFppn7Qn+bcnKxFZQSDcco6L9oacGxt4YJg0PtKd+KsZ8rS4qkAoPhTOZG29jG4haRwqPc79MdOCuntm80XOvLIgrgfBmQDd08rXr+urljch4KJankhzYcxsJb1hPXJidDeZxr4K1w+Q==" > ~/.ssh/known_hosts
git checkout master-candidate
git merge develop
git push --set-upstream origin master-candidate
fi
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
language: minimal
script: ./.run-tests.sh
env:
matrix:
secure: R9MaZYFL8b59fQdIyiqubx2IbhM3f4vvOTH9PozrE+s693sKofcqITw+KS9aachjGjyGZe8ko3MsOx6rbRMkD4s9b7HtKPP05p8AJP+Rnzw5zcOK4Xz54kXsF6lLwaJ5nxw8OFyGHyXagCaPdu/ezy2vuu+Ll5/ay2uOmYx0Bfu/ul/f9mAjZ5PbQpKJiMMGFaIGU4bdF+J9qV8bLQuLtxF5IL8Do8ModhfhTYne0LFmFBCs2QesbXkAIbb9buZi9SPuf2QSi5Iedqz+oosfuMWlAdy6HMTovCc0h3iw7Je661NFi2zOYt5q9oKhTo6AHtHVhoQafULjj885ZB2MieDow4vg+vIXn8auftbBO557tFfmO0IrJw18/KBETQQb0fM/3BRNlmH1b9pM9I0wFjd9kgdWIyC9Jd6+7HUK59u0iaOSs9bzgQHmWskq0GY1FZ9QDDYo0zYX7s6LiQmSyzeoIMQznSGMDYr1Vc/YVBm9xHjjg9GXBHHXXJLVPNjXYBjW2tyk7HJ+ORa/DfZk1PW7BJUGHvER9uBbq2IfuzmODtgH6M19lWhbrkQOgcKxdzI4hdPN8hQj16pt4M1xwoz6yQ5PgsCtLYnuglchnwuU4Azwqbyjwgl8ZyuN4iEjcuiPsDVNwe8WAuue38mB4hU8ZaO00BYPJCCfAxe1k7Y=
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A portable package manager that integrates with the distro's package manager.
## Getting started

```bash
wget https://raw.githubusercontent.com/shoppepm/shoppe/rewrite/shoppe
wget https://raw.githubusercontent.com/shoppepm/shoppe/master/shoppe
chmod +x shoppe
./shoppe install shoppe
```
Expand Down
16 changes: 16 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# TODO

## shoppe

- Implement optional dependencies
- Move all "echo <Error> && exit 1" queries to a single function [1.2.0]
- Make --skip-errors skip all errors [1.2.0]
- Handle '-' switches properly (get every letter) [1.2.0]

## shoppe-utils

- Add package conversion

## Meta

- Clean up documentation
16 changes: 0 additions & 16 deletions docs/developement/variables.md

This file was deleted.

23 changes: 23 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# shoppe [![Build Status](https://travis-ci.org/shoppepm/shoppe.svg?branch=master)](https://travis-ci.org/shoppepm/shoppe)

A portable package manager that integrates with the distro's package manager.

## Getting started

```bash
wget https://raw.githubusercontent.com/shoppepm/shoppe/master/shoppe
chmod +x shoppe
./shoppe install shoppe
```

Use ``shoppe help`` to display all available commands and switches.

You can find more documentation in the ``/usr/share/doc/shoppe`` folder, or browse the docs folder in this repository.

## Documentation

- [Packages](packages.md)
- [Repositories](repositories.md)
- [Frontend](frontend.md)
- [Frontend support](frontend-support.md)
- [Configuration](configuration.md)
25 changes: 22 additions & 3 deletions docs/packages.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
# Package

Each shoppe package has two core files: shoppepkg, which contains the information about the package, and content.tar.gz, which contains the files for the package. If content.tar.gz is not present, the package will be built manually.
Each shoppe package has two core files: shoppepkg, which contains the information about the package, and content-<architecture>.tar.gz, which contains the files for the package. If shoppe cannot find a content tarball for the current architecture, the package will be built manually.

## Creating a package

To create a package, you have to make a shoppepkg for it. To do that, you can use the shoppe utilities:

```bash
$ shoppe-utils pkg create
```

This will ask you multiple questions about the package, such as the package name, description, etc. Afterwards, you can open the resulting shoppepkg file and add the following:

- a source variable
- a source type variable
- build steps

See the example shoppe package below for more information.

## Building a package

Simply add it to a repository (see: [Repositories](repositories.md)), add the repository and install with the +pm switch, or use ``shoppe install /path/to/shoppepkg +pm``.

## Example shoppe package

Expand All @@ -10,14 +30,13 @@ pkgname="shoppe" # Name of the package. This should be lowercase unless it's upp
pkgdesc="A package manager frontend/replacement" # Short description of the package. Make sure it doesn't end with a dot (stylistic choice).
pkgarch="all" # The architecture this package is meant for. If it runs on all architectures, use 'all', otherwise use the architecture name that 'uname -s' returns.
pkgver="v0.1" # Package version. For packages being built from the newest source, this should be set to "rolling".
pkgrel="1" # Package revision. Bump this every time you change the package (eg. update to next version, fix some commands). For packages being built from newest source, this should be set to "rolling".
pkgrel="1" # Package revision. This is automatically bumped every time you rebuild the package. For packages being built from newest source, this should be set to "rolling".
license="GPL 3-Clause" # License. This is optional.
url="https://github.com/knuxify/shoppe" # Project website. Optional. If this is an open-source project, link the source page.
depends="bash git curl wget" # Dependencies, separated by spaces.
# optdepends="" # Optional dependencies, separated by spaces.
makedepends="make" # Build dependencies, separated by spaces.
conflicts="shoppe-git" # Packages this package conflicts with, separated by spaces. Most of the time this will contain the rolling version of a package.
archdependent="false" # Does the package require separate builds for each architecture? Most of the time, this will be true, but if you're providing an architecture independent app like a bash/python script this will be set to false.

# Building/installation instructions
source="https://github.com/shoppepm/shoppe" # Source link.
Expand Down
20 changes: 17 additions & 3 deletions docs/repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,25 @@

## Repository structure

A repository contains the list of packages present in the repository and the packages themselves. Each package has its own folder, which contains the compiled package (content.tar.gz) and the shoppepkg file *(See also: [shoppe package file](packages.md))*.
A repository contains the list of packages present in the repository and the packages themselves. Each package has its own folder, which contains the compiled package (content.tar.gz) and the shoppepkg file *(See also: [shoppe package file](packages.md))*. Shoppe supports local repositories and repositories served over http/https.

The repository metadata contains information about every package present in the repository.
## Adding a repository

## Configuration file ($configdir/repositories)
You can use ``shoppe addrepo <repositories>`` to add a repository automatically, or add one manually (see ``Repository list file`` later in this doc).

## Creating and managing repositories

Creating and managing a repository is fairly simple, since they are just folders.

### Creating a repository

Create an empty folder, and make an empty "pkglist" file in it.

### Adding packages to a repository

Create a folder with the package's name and put its shoppepkg in it (see [Packages](packages.md)). After building the package, extract the resulting full package into the folder.

## Repository list file ($configdir/repositories)

*See also: [Configuration](configuration.md)*

Expand Down
Loading

0 comments on commit c81bffd

Please sign in to comment.