upm 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +75 -13
- data/VERSION +1 -1
- data/design/Favorite Packages.md +7 -0
- data/design/Fuzzy Installer.md +28 -0
- data/design/Updates Grouped Together for Readability.md +18 -0
- data/lib/upm/tools/pacman.rb +1 -1
- data/lib/upm/tools/pkg.rb +31 -2
- data/lib/upm/tools/pkgin.rb +49 -0
- data/lib/upm/tools/yum.rb +5 -5
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36e927dff0f1b722f702c94b7d6cfcaf05c75e89fa42d491175f9972d08d2e92
|
4
|
+
data.tar.gz: cbde740ccc8cbd0aedb16393b579c2d38f2a614747762edfe777fe5fd9574a8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f47b0ba2f51bb57a3dc52dab2df1e3ca8f85f96cf0e5bb32882a7514b999dc7885c3041d438e7ac1a1a2c34128c100b62b65006b5c0346147816816efd4eb751
|
7
|
+
data.tar.gz: '00483805c6f1a67d352c2e83e1266a5546b3934649d01472f00e85731a8e9eb7d6b434ddddef75814f6dccf10a8355aa7fbbf81ae328df983efba02044db46e0'
|
data/README.md
CHANGED
@@ -2,11 +2,25 @@
|
|
2
2
|
|
3
3
|
## Concept:
|
4
4
|
|
5
|
-
Wraps all known package managers to provide a consistent and pretty interface, along with advanced features not supported by all tools, such as
|
5
|
+
Wraps all known package managers to provide a consistent and pretty interface, along with advanced features not supported by all tools, such as:
|
6
|
+
- install log
|
7
|
+
- rollback
|
8
|
+
- pinning
|
9
|
+
- fuzzy search
|
10
|
+
- containerization/sandboxing
|
11
|
+
- learning (community statistics and user choices)
|
6
12
|
|
7
13
|
All tools will give you modern, pretty, colourful, piped-to-less output, and you'll only have to remember one consistent set of commands. It'll also prompt you with a text UI whenever faced with ambiguity.
|
8
14
|
|
9
|
-
|
15
|
+
You can maintain lists of your favorite packages (and sync them to some remote server), so that you can automatically install them whenever you setup a new machine. (This can include git repos full of dotfiles/scripts, to give you a comfortable home environment, regardless of which OS you're using.)
|
16
|
+
|
17
|
+
## Installation:
|
18
|
+
|
19
|
+
First, install Ruby. Then:
|
20
|
+
|
21
|
+
```
|
22
|
+
gem install upm
|
23
|
+
```
|
10
24
|
|
11
25
|
## Usage:
|
12
26
|
|
@@ -18,19 +32,19 @@ u <command> <pkg>
|
|
18
32
|
|
19
33
|
## Commands:
|
20
34
|
|
21
|
-
* `install`
|
22
|
-
* `remove`
|
35
|
+
* `install`/`add` - download and install a package
|
36
|
+
* `remove`/`uninstall` - remove a previously installed package
|
23
37
|
* `build` - compile a package from source and install it
|
24
38
|
* `search` - using the fastest known API or service
|
25
39
|
* `list` - show all packages, or the contents of a specific package
|
26
40
|
* `info` - show metadata about a package
|
27
41
|
* `sync`/`update` - retrieve the latest package list or manifest
|
28
42
|
* `upgrade` - install new versions of all packages
|
29
|
-
* `
|
43
|
+
* `verify` - verify the integrity of installed files
|
30
44
|
* `audit` - show known vulnerabilities for installed packages
|
31
45
|
* `pin` - pinning a package means it won't be automatically upgraded
|
32
46
|
* `rollback` - revert to an earlier version of a package (including its dependencies)
|
33
|
-
* `log` - show history of package installs
|
47
|
+
* `log` - show history of package installs
|
34
48
|
* `packagers` - detect installed package managers, and pick which ones upm should wrap
|
35
49
|
* `sources`/`mirrors` - select remote repositories and mirrors
|
36
50
|
* `clean` - clear out the local package cache
|
@@ -70,21 +84,23 @@ go:<pkg>,<pkg>,<pkg>
|
|
70
84
|
* NetBSD: `pkgin`/`ports`
|
71
85
|
* SmartOS/Illumos: `pkgin`
|
72
86
|
* Windows: `apt-cyg`/`mingw-get`/`nuget`/`Windows Update`/(as-yet-not-created package manager, "winget")
|
73
|
-
* Wine: `winetricks`
|
87
|
+
* Wine/Proton/Steam: `winetricks`/`steam`
|
74
88
|
* Ruby: `rubygems`
|
75
89
|
* Python: `pip`/`easy_install`
|
76
|
-
* Javascript: `npm`
|
77
|
-
* Clojure: `leiningen`
|
78
|
-
* Java: `gradle`
|
79
|
-
* Erlang: `rebar`
|
80
|
-
* Scala: `sbt`
|
90
|
+
* Javascript/NodeJS: `npm`
|
81
91
|
* Rust: `cargo`
|
92
|
+
* Dart: `pub`
|
93
|
+
* go: `go-get`
|
82
94
|
* R: `cran`
|
95
|
+
* Qt: `qpm`
|
83
96
|
* Lua: `rocks`
|
84
97
|
* Julia: `Pkg`
|
85
98
|
* Haskell: `cabal`
|
99
|
+
* Clojure: `leiningen`
|
100
|
+
* Java: `gradle`
|
101
|
+
* Erlang: `rebar`
|
102
|
+
* Scala: `sbt`
|
86
103
|
* Perl: `cpan`
|
87
|
-
* go: `go-get`
|
88
104
|
|
89
105
|
...[and many more!](https://en.wikipedia.org/wiki/List_of_software_package_management_systems)
|
90
106
|
|
@@ -103,8 +119,54 @@ Rollback:
|
|
103
119
|
|
104
120
|

|
105
121
|
|
122
|
+
# Future Directions
|
123
|
+
|
106
124
|
## TODOs:
|
107
125
|
|
108
126
|
* Use the pretty text-mode UI that passenger-install uses
|
109
127
|
* Context-dependent operation
|
110
128
|
* eg: if you're in a ruby project's directory, set the 'ruby' namespace to highest priority
|
129
|
+
|
130
|
+
## Containers, VMs, and Virtual Environments:
|
131
|
+
|
132
|
+
Containers, VMs, and Virtual Environments are another pile of tools which do roughly the same thing: they gather together the dependencies for a specific program, or small set of programs, into a bundle, and create an isolated environment in which it can run.
|
133
|
+
|
134
|
+
In the future, these could be wrapped by `ucm` (Universal Container Manager), if I get around to it.
|
135
|
+
|
136
|
+
### Container tools to wrap:
|
137
|
+
|
138
|
+
* Virtual Environments:
|
139
|
+
* Python: `virtualenv`
|
140
|
+
* Ruby: `bundler`
|
141
|
+
* Java: `gradle`
|
142
|
+
* NodeJS: `npm`
|
143
|
+
* Containerized Applications/Systems:
|
144
|
+
* AppImage
|
145
|
+
* docker
|
146
|
+
* rkt
|
147
|
+
* snapd
|
148
|
+
* systemd
|
149
|
+
* podman
|
150
|
+
* nanobox
|
151
|
+
* SmartOS zones
|
152
|
+
* BSD jails
|
153
|
+
* Wine environments:
|
154
|
+
* wine prefixes
|
155
|
+
* playonlinuxs
|
156
|
+
* proton
|
157
|
+
* Virtual Machines:
|
158
|
+
* qemu
|
159
|
+
* virtualbox
|
160
|
+
* VMware
|
161
|
+
* firecracker
|
162
|
+
* Hypervisors:
|
163
|
+
* ESXi
|
164
|
+
* Xen
|
165
|
+
* Nova
|
166
|
+
|
167
|
+
|
168
|
+
## Similar Projects
|
169
|
+
|
170
|
+
* [PackageKit](https://en.wikipedia.org/wiki/PackageKit)
|
171
|
+
* [libraries.io](https://libraries.io)
|
172
|
+
* [Repology](https://repology.org)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.16
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Fuzzy Installer
|
2
|
+
|
3
|
+
## Concept
|
4
|
+
|
5
|
+
'upm install <pkg query>' performs a search
|
6
|
+
|
7
|
+
If there's one match, install it; if there are multiple matches, show ranked results and let the user pick one (fzf-like picker, but with a hotkey that can expand descriptions).
|
8
|
+
|
9
|
+
Ranking of packages by source use statistics and heuristics
|
10
|
+
- Which version is newest?
|
11
|
+
- Which version is more stable?
|
12
|
+
- What has the user picked in the past? (eg: a distro's global ruby-<gem> package vs a globally installed gem vs a locally installed gem)
|
13
|
+
- What tools are installed? (docker? gem?)
|
14
|
+
- Which package is less likely to break stuff? (some package managers are better than others (*cough*pip))
|
15
|
+
- Is it a service that should be instaled in a container?
|
16
|
+
|
17
|
+
## Depends on
|
18
|
+
|
19
|
+
- A database of package aliases
|
20
|
+
- A ranking algorithm
|
21
|
+
- Package type prioritization (manually specified or machine learned, per-package rules based on all users who installed it)
|
22
|
+
-
|
23
|
+
- Distributed statistics
|
24
|
+
- Users can anonymously donate their stats
|
25
|
+
- Stats are all public
|
26
|
+
- Ranking algorithm can run locally or on a distributed system
|
27
|
+
|
28
|
+
#
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Updates Grouped Together for Readability
|
2
|
+
|
3
|
+
## Concept
|
4
|
+
|
5
|
+
The design of package update screens is pretty abysmal -- usually just a big blob of package names and versions. This can be improved.
|
6
|
+
|
7
|
+
## Groups
|
8
|
+
|
9
|
+
Packages can be grouped by any of the following:
|
10
|
+
|
11
|
+
- semantic version (MAJOR.MINOR.PATCH):
|
12
|
+
- MAJOR: incompatible API changes
|
13
|
+
- MINOR: backwards-compatible features added
|
14
|
+
- PATCH: bugfixes
|
15
|
+
- package's category/tags
|
16
|
+
- which repository the package came from
|
17
|
+
- who packaged it
|
18
|
+
- a tree-view of package dependencies (useful for seeing dependency relationships during package updates)
|
data/lib/upm/tools/pacman.rb
CHANGED
@@ -6,7 +6,7 @@ UPM::Tool.new "pacman" do
|
|
6
6
|
|
7
7
|
command "install", [*bin, "-S"], root: true
|
8
8
|
command "update", [*bin, "-Sy"], root: true
|
9
|
-
command "upgrade", [*bin, "-Syu"], root: true
|
9
|
+
command "upgrade", [*bin, "-Syu", "--noconfirm"], root: true
|
10
10
|
command "remove", [*bin, "-R"], root: true
|
11
11
|
|
12
12
|
command "verify", root: true do |args|
|
data/lib/upm/tools/pkg.rb
CHANGED
@@ -7,18 +7,47 @@ UPM::Tool.new "pkg" do
|
|
7
7
|
command "install", "pkg install", root: true
|
8
8
|
command "update", "pkg update", root: true
|
9
9
|
command "upgrade", "pkg upgrade", root: true
|
10
|
+
command "remove", "pkg remove", root: true
|
10
11
|
command "info", "pkg clean", root: true
|
11
12
|
command "audit", "pkg audit", root: true
|
12
13
|
command "verify", "pkg check --checksums", root: true
|
14
|
+
command "which", "pkg which"
|
15
|
+
|
16
|
+
# command "files", "pkg list", paged: true
|
17
|
+
command "files" do |args|
|
18
|
+
if args.empty?
|
19
|
+
run "pkg", "info", "--list-files", "--all", paged: true
|
20
|
+
else
|
21
|
+
run "pkg", "list", *args, paged: true
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# the "pkg-provides" plugin is similar to arch's "pkgfile" (requires updates), and needs to be added to the plugins section of pkg's config ("pkg plugins" shows loaded plugins)
|
26
|
+
command "provides" do |args|
|
27
|
+
run "pkg", "info", "--list-files", "--all", grep: /#{args.join(".+")}/, highlight: true
|
28
|
+
end
|
13
29
|
|
14
|
-
command "files", "pkg list", paged: true
|
15
30
|
command "search", "pkg search", paged: true, highlight: true
|
16
31
|
command "search-sources" do |*args|
|
17
32
|
query = args.join(" ")
|
18
33
|
FreshportsSearch.new.search!(query)
|
19
34
|
end
|
20
35
|
|
21
|
-
command "log", "grep pkg
|
36
|
+
# command "log", "grep -E 'pkg.+installed' /var/log/messages", paged: true
|
37
|
+
command "log" do
|
38
|
+
lesspipe do |less|
|
39
|
+
open("/var/log/messages").each_line do |line|
|
40
|
+
# Jan 19 18:25:21 freebsd pkg[815]: pcre-8.43_2 installed
|
41
|
+
if line =~ /^(\S+ \S+ \S+) (\S+) pkg(?:\[\d+\])?: (\S+)-(\S+) installed/
|
42
|
+
timestamp = DateTime.parse($1)
|
43
|
+
host = $2
|
44
|
+
pkgname = $3
|
45
|
+
pkgver = $4
|
46
|
+
less.puts "#{timestamp} | #{pkgname} #{pkgver}"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
22
51
|
|
23
52
|
command "build" do |*args|
|
24
53
|
# svn checkout --depth empty svn://svn.freebsd.org/ports/head /usr/ports
|
@@ -0,0 +1,49 @@
|
|
1
|
+
UPM::Tool.new "pkgin" do
|
2
|
+
|
3
|
+
os "MINIX", "NetBSD"
|
4
|
+
|
5
|
+
command "install", "pkgin install", root: true
|
6
|
+
command "update", "pkgin update", root: true
|
7
|
+
command "upgrade", "pkgin upgrade", root: true
|
8
|
+
command "info", "pkgin clean", root: true
|
9
|
+
command "audit", "pkgin audit", root: true
|
10
|
+
command "verify", "pkgin check --checksums", root: true
|
11
|
+
|
12
|
+
command "files", "pkgin list", paged: true
|
13
|
+
command "search", "pkgin search", paged: true, highlight: true
|
14
|
+
command "search-sources" do |*args|
|
15
|
+
query = args.join(" ")
|
16
|
+
FreshportsSearch.new.search!(query)
|
17
|
+
end
|
18
|
+
|
19
|
+
command "log", "grep pkg: /var/log/messages", paged: true
|
20
|
+
|
21
|
+
command "build" do |*args|
|
22
|
+
# svn checkout --depth empty svn://svn.freebsd.org/ports/head /usr/ports
|
23
|
+
# cd /usr/ports
|
24
|
+
# svn update --set-depth files
|
25
|
+
# svn update Mk
|
26
|
+
# svn update Templates
|
27
|
+
# svn update Tools
|
28
|
+
# svn update --set-depth files $category
|
29
|
+
# cd $category
|
30
|
+
# svn update $port
|
31
|
+
puts "Not implemented"
|
32
|
+
end
|
33
|
+
|
34
|
+
command "info", "pkg info", paged: true
|
35
|
+
|
36
|
+
command "list" do |args|
|
37
|
+
if args.any?
|
38
|
+
query = args.join
|
39
|
+
run "pkg", "info", grep: query, highlight: query, paged: true
|
40
|
+
else
|
41
|
+
run "pkg", "info", paged: true
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
command "mirrors" do
|
46
|
+
print_files("/etc/pkg/FreeBSD.conf", exclude: /^(#|$)/)
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
data/lib/upm/tools/yum.rb
CHANGED
@@ -2,11 +2,11 @@ UPM::Tool.new "yum" do
|
|
2
2
|
|
3
3
|
os "centos", "fedora", "rhel"
|
4
4
|
|
5
|
-
command "install", "yum install",
|
6
|
-
command "remove", "yum remove",
|
7
|
-
command "update", "yum
|
8
|
-
command "upgrade", "yum
|
9
|
-
command "clean", "yum clean",
|
5
|
+
command "install", "yum install", root: true
|
6
|
+
command "remove", "yum remove", root: true
|
7
|
+
command "update", "yum updateinfo", root: true
|
8
|
+
command "upgrade", "yum update", root: true
|
9
|
+
command "clean", "yum clean", root: true
|
10
10
|
|
11
11
|
command "files", "rpm -ql", paged: true
|
12
12
|
command "search" do |args|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: upm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- epitron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Wrap all known command-line package tools with a consistent and pretty
|
14
14
|
interface.
|
@@ -28,6 +28,9 @@ files:
|
|
28
28
|
- TODO.md
|
29
29
|
- VERSION
|
30
30
|
- bin/upm
|
31
|
+
- design/Favorite Packages.md
|
32
|
+
- design/Fuzzy Installer.md
|
33
|
+
- design/Updates Grouped Together for Readability.md
|
31
34
|
- lib/upm.rb
|
32
35
|
- lib/upm/colored.rb
|
33
36
|
- lib/upm/core_ext.rb
|
@@ -43,6 +46,7 @@ files:
|
|
43
46
|
- lib/upm/tools/opkg.rb
|
44
47
|
- lib/upm/tools/pacman.rb
|
45
48
|
- lib/upm/tools/pkg.rb
|
49
|
+
- lib/upm/tools/pkgin.rb
|
46
50
|
- lib/upm/tools/xbps.rb
|
47
51
|
- lib/upm/tools/yum.rb
|
48
52
|
- spec/core_ext_spec.rb
|
@@ -66,8 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
70
|
- !ruby/object:Gem::Version
|
67
71
|
version: '0'
|
68
72
|
requirements: []
|
69
|
-
|
70
|
-
rubygems_version: 2.7.7
|
73
|
+
rubygems_version: 3.1.2
|
71
74
|
signing_key:
|
72
75
|
specification_version: 4
|
73
76
|
summary: Universal Package Manager
|