Author SHA1 Message Date
wt 1fb1d40acc up date added recursive deps and added upgrade with popitka 2025-09-30 19:27:20 +07:00
wt 755df2c2c1 some fix 2025-09-30 18:02:31 +07:00
wt a8c4a287eb Update pm 2025-09-30 16:42:00 +07:00
wt 29d7ea9d66 updated fore functions 2025-09-30 16:34:18 +07:00
wt ef47824b17 up 2025-09-29 19:57:36 +07:00
wt e05c7bba21 Merge pull request 'up' (#14) from up into version-support
Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/pm/pulls/14
2025-09-29 19:52:36 +07:00
wt 950f6bc0b3 added upgrade up and c clean clear 2025-09-29 19:51:38 +07:00
wt 0c7652fe09 fix unpack error 2025-09-29 19:15:02 +07:00
wt 291761f074 added parse_opts parse_command and updated all funcs 2025-09-29 19:08:54 +07:00
wt 42da0fb84f updated buildpkg for suport CROSS_COMPILE 2025-09-29 15:56:36 +07:00
wt 73750d289b update README and added LICENSE 2025-07-16 17:45:49 +07:00
wt 96d820ece0 added check package versions in deps func #11 2025-05-19 17:29:49 +07:00
wt fa04c30d6c added check package versions #11 2025-05-19 17:17:35 +07:00
wt d1164975e3 Merge pull request 'updated build' (#13) from hot-fixes into main
Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/pm/pulls/13
2025-04-15 10:19:35 +07:00
wt dcdd2ea51a updated build 2025-04-11 15:57:19 +07:00
wt b93e6153af Merge pull request 'up' (#12) from up into main
Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/pm/pulls/12
2025-04-08 16:22:22 +07:00
wt 0d15808a6f up 2025-04-08 16:25:59 +07:00
wt 2dfdf91528 Merge pull request 'pmbuild' (#10) from pmbuild into main
Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/pm/pulls/10
2025-01-23 08:13:42 +03:00
wt 20ca8e49ee updated buildpkg function and hide all in Makefile and buildpkg functions 2025-01-23 15:12:28 +07:00
wt 26b9d8118e updated colors in pm query 2025-01-20 20:13:05 +07:00
wt f14d5866f3 added comments 2025-01-20 15:58:34 +07:00
wt fc2d7e7915 added pmbuild 2025-01-20 18:45:13 +07:00
wt feded5e14e Merge pull request 'updated help' (#9) from update-help into main
Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/pm/pulls/9
2025-01-20 10:01:32 +03:00
wt fb463d418d updated help 2025-01-20 17:00:40 +07:00
wt 9f0f903c5e Merge pull request 'updated README.md' (#8) from readme into main
Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/pm/pulls/8
2025-01-17 16:27:11 +03:00
wt 106ae39803 updated README.md 2025-01-17 23:26:14 +07:00
wt 758b247438 Merge pull request 'Update Makefile' (#7) from tolamironcenko-patch-1 into main
Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/pm/pulls/7
2025-01-15 12:12:12 +03:00
wt 55623e13db Update Makefile 2025-01-15 12:11:53 +03:00
wt f9c7e6b8d6 Merge pull request 'added print deps' (#6) from print-deps into main
Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/pm/pulls/6
2025-01-15 12:09:01 +03:00
wt a05836abfd added print deps 2025-01-15 19:08:16 +07:00
wt 256dd28e05 Merge pull request 'added deps and fix delete and add and read query file' (#5) from deps into main
Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/pm/pulls/5
2025-01-15 12:03:06 +03:00
wt b75fc8a68a added deps and fix delete and add and read query file 2025-01-15 19:01:58 +07:00
wt db0e243794 Merge pull request 'updated and hot fixes' (#4) from update-and-fixes into main
Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/pm/pulls/4
2025-01-14 16:35:22 +03:00
wt 6e8bdba73f updated and hot fixes 2025-01-14 23:33:13 +07:00
6 changed files with 1592 additions and 221 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
pm.pkg
pm.pkg.gz
rootfs
rootfs
package
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Tola Mironcenko
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.
+32 -33
View File
@@ -2,52 +2,51 @@ DESTDIR=/
install:
if [ ! -d ${DESTDIR}/etc/pm ]; then \
mkdir -pv ${DESTDIR}/etc/pm; \
touch ${DESTDIR}/etc/pm/repo; \
@if [ ! -d ${DESTDIR}/etc/pm ]; then \
mkdir -p ${DESTDIR}/etc/pm; \
fi
if [ ! -d ${DESTDIR}/tmp ]; then \
mkdir -pv ${DESTDIR}/tmp; \
@if [ ! -d ${DESTDIR}/tmp ]; then \
mkdir -p ${DESTDIR}/tmp; \
fi
if [ ! -d ${DESTDIR}/usr/bin ]; then \
mkdir -pv ${DESTDIR}/usr/bin; \
@if [ ! -d ${DESTDIR}/usr/bin ]; then \
mkdir -p ${DESTDIR}/usr/bin; \
fi
if [ ! -d ${DESTDIR}/usr/share/pm ]; then \
mkdir -pv ${DESTDIR}/usr/share/pm/{packages,repos}; \
touch ${DESTDIR}/usr/share/pm/query; \
@if [ ! -d ${DESTDIR}/usr/share/pm ]; then \
mkdir -p ${DESTDIR}/usr/share/pm/{packages,repos}; \
fi
if [ ! -d ${DESTDIR}/var/cache/pm/pkg ]; then \
mkdir -pv ${DESTDIR}/var/cache/pm/pkg; \
@if [ ! -d ${DESTDIR}/var/cache/pm/pkg ]; then \
mkdir -p ${DESTDIR}/var/cache/pm/pkg; \
fi
cp -v src/pm ${DESTDIR}/usr/bin/pm;
@cp src/pm ${DESTDIR}/usr/bin/pm;
uninstall:
if [ -d ${DESTDIR}/etc/pm ]; then \
rm -rv ${DESTDIR}/etc/pm; \
@if [ -d ${DESTDIR}/etc/pm ]; then \
rm -r ${DESTDIR}/etc/pm; \
fi
if [ -d ${DESTDIR}/usr/share/pm ]; then \
rm -rv ${DESTDIR}/usr/share/pm; \
@if [ -d ${DESTDIR}/usr/share/pm ]; then \
rm -r ${DESTDIR}/usr/share/pm; \
fi
if [ -d ${DESTDIR}/var/cache/pm ]; then \
rm -rv ${DESTDIR}/var/cache/pm; \
@if [ -d ${DESTDIR}/var/cache/pm ]; then \
rm -r ${DESTDIR}/var/cache/pm; \
fi
if [ -f ${DESTDIR}/usr/bin/pm ]; then \
rm -v ${DESTDIR}/usr/bin/pm; \
@if [ -f ${DESTDIR}/usr/bin/pm ]; then \
rm ${DESTDIR}/usr/bin/pm; \
fi
package:
mkdir -pv pm.pkg/usr/bin
mkdir -pv pm.pkg/etc/pm
mkdir -pv pm.pkg/var/cache/pm/pkg
mkdir -pv pm.pkg/usr/share/pm/{repos,packages}
echo usr/bin/pm > pm.pkg/list
cp -v src/pm pm.pkg/usr/bin/pm
tar -czvf pm.pkg.gz pm.pkg
@mkdir -p pm.pkg/usr/bin
@mkdir -p pm.pkg/etc/pm
@mkdir -p pm.pkg/var/cache/pm/pkg
@mkdir -p pm.pkg/usr/share/pm/{repos,packages}
@echo usr/bin/pm > pm.pkg/list
@echo busybox > pm.pkg/deps
@cp src/pm pm.pkg/usr/bin/pm
@tar -czf pm.pkg.gz pm.pkg
clean:
if [ -d pm.pkg ]; then \
rm -rv pm.pkg; \
@if [ -d pm.pkg ]; then \
rm -r pm.pkg; \
fi
@if [ -f pm.pkg.gz ]; then \
rm pm.pkg.gz; \
fi
if [ -f pm.pkg.gz ]; then \
rm -v pm.pkg.gz; \
fi
+11
View File
@@ -0,0 +1,11 @@
pkgname=pm
pkgver=1.1
pkgrel=1
# srcdir=/home/tola/Documents/linux/pm
gitsource="https://gitea.home.com:3000/TolaMironcenko/pm.git"
deps="busybox"
package() {
cd $srcdir
make install DESTDIR=$pkgdir
}
+186 -14
View File
@@ -1,41 +1,213 @@
# PM - package manager for simple linux
# PM - Package Manager for Simple Linux
## Filetree
A lightweight, shell-based package manager designed for simple Linux systems. PM provides essential package management functionality with minimal dependencies and a straightforward command-line interface.
## Features
- **Lightweight**: Written in pure shell script with minimal dependencies
- **Simple**: Easy-to-use command-line interface
- **Flexible**: Supports local and remote package installation
- **Portable**: Works on any POSIX-compliant system
- **Efficient**: Fast package operations with local caching
## Installation
### From Source
1. Clone or download the repository
2. Run the installation command:
```bash
sudo make install
```
### Manual Installation
Copy the `src/pm` script to `/usr/bin/pm` and ensure it's executable:
```bash
sudo cp src/pm /usr/bin/pm
sudo chmod +x /usr/bin/pm
```
## Usage
### Basic Commands
```bash
# Install a package
pm add package-name
# Download package without installing
pm down package-name
# Install from local package file
pm unpack /path/to/package.pkg.gz
# Remove a package
pm del package-name
# List files in a package
pm list package-name
# Search for packages
pm search package-name
# Show installed packages
pm query
# Show help
pm help
```
### Examples
```bash
# Install pfetch package
pm add pfetch
# Download busybox without installing
pm down busybox
# Install from local package
pm unpack ./custom-package.pkg.gz
# Remove pfetch
pm del pfetch
# List all files in busybox package
pm list busybox
# Search for packages containing "fetch"
pm search fetch
```
## Directory Structure
PM uses the following directory structure:
```
/
├── etc
│ └── pm
│ └── repo
├── tmp
│ └── repo # Repository configuration
├── tmp # Temporary files
├── usr
│ ├── bin
│ │ └── pm
│ │ └── pm # Main PM executable
│ └── share
│ └── pm
│ ├── packages
│ ├── query
│ └── repos
│ ├── packages # Package metadata
│ ├── query # Query cache
│ └── repos # Repository data
│ └── localhost
│ └── query
└── var
└── cache
└── pm
└── pkg
└── pkg # Cached package files
```
## Package structure (pfetch for example)
## Package Format
PM packages use a simple archive format with the following structure:
```
pfetch.pkg
package-name.pkg.gz
├── list # List of files in package
├── deps # Package dependencies
├── post_install # Post-installation script (optional)
└── usr/ # Package files
└── bin/
└── executable
```
### Package Files
- **list**: Contains a list of all files included in the package
- **deps**: Lists package dependencies (one per line)
- **post_install**: Optional script executed after installation
- **Package files**: The actual files to be installed
### Example Package Structure (pfetch)
```
pfetch.pkg.gz
├── list
├── deps
├── post_install
└── usr
└── bin
└── pfetch
```
## Example list file (pfetch for example)
**list file:**
```
usr/bin/pfetch
```
```
**deps file:**
```
busybox
```
## Creating Packages
To create a package for PM:
1. Create a directory with your package name
2. Add your files in the appropriate directory structure
3. Create a `list` file with all file paths
4. Create a `deps` file with dependencies
5. Optionally add a `post_install` script
6. Archive with gzip: `tar -czf package.pkg.gz package-dir/`
## Building
### Build Package
```bash
make package
```
### Clean Build Files
```bash
make clean
```
### Uninstall
```bash
sudo make uninstall
```
## Requirements
- POSIX-compliant shell (bash, dash, etc.)
- Basic Unix utilities (tar, gzip, etc.)
- Root privileges for installation/removal
## Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Test thoroughly
5. Submit a pull request
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Author
**Tola Mironcenko**
## Version
Current version: 1.0.0
---
PM is designed to be simple, efficient, and reliable. For bug reports or feature requests, please open an issue in the project repository.
+1340 -173
View File
File diff suppressed because it is too large Load Diff