Commit Graph

331 Commits

Author SHA1 Message Date
Ettore Di Giacinto
2f3eabc3ca
Annotate git hash and time in displayed version 2020-04-12 14:37:49 +02:00
Ettore Di Giacinto
f987ee9fa0
Handle errors from os/user
We use it to generate defaults, if error is found, we imply preserve
permissions
2020-04-11 20:05:56 +02:00
Ettore Di Giacinto
0fe2a8c950
Add development version 2020-04-11 18:30:11 +02:00
Ettore Di Giacinto
9704992c43
Tag 0.7.3 2020-04-11 18:29:46 +02:00
Ettore Di Giacinto
d8919f7250
Check if dependencies are selectors in validate 2020-04-10 20:00:37 +02:00
Daniele Rondina
42c380029c cmd/tree/validate: Fix order analysis 2020-04-10 17:41:27 +02:00
Daniele Rondina
c2e9176ab2 solver.Order now return error 2020-04-09 17:07:57 +02:00
Daniele Rondina
726a749b4b cmd/tree/validate: Integrate order of the solution 2020-04-09 15:58:05 +02:00
Ettore Di Giacinto
6540dcc99d
Merge pull request #82 from mudler/packages_type
Add Packages type and Versioner interface
2020-04-04 17:28:49 +02:00
Ettore Di Giacinto
5e31d940f0
Introduce Packages for []Package 2020-04-04 14:29:08 +02:00
Daniele Rondina
42d1ec5585 cmd/tree/bump: Add --to-stdout option 2020-04-04 13:42:25 +02:00
Ettore Di Giacinto
1779382811
Extend tree validate checks 2020-03-29 14:52:13 +02:00
Daniele Rondina
9b61ed9e1d Fix panic if luet is executed without args 2020-03-29 08:48:51 +02:00
Ettore Di Giacinto
aeb10338f6
Add development version 2020-03-28 17:32:06 +01:00
Ettore Di Giacinto
02653e03d8
Tag 0.7.2 2020-03-28 17:31:35 +01:00
Ettore Di Giacinto
92d335d5d1
Add exec command to cli
It is the entrypoint for box, to run commands with unshare
2020-03-28 16:58:59 +01:00
Daniele Rondina
98c7d5c450 cmd/create-repo: Fix default value of tree-compression 2020-03-27 08:59:52 +01:00
Daniele Rondina
454e9d934e Use filename instead of name on repo specs 2020-03-24 19:40:11 +01:00
Daniele Rondina
202ed2651a 💥 Refactor and split repository.yaml file 2020-03-24 00:05:16 +01:00
Daniele Rondina
4e461fd6be cmd/repo/update: Update only enabled repo 2020-03-23 23:40:27 +01:00
Ettore Di Giacinto
d5166c55ab
Lock only on commands that aren't meant to run in parallel 2020-03-22 15:19:08 +01:00
Ettore Di Giacinto
b2ba17f7f7
Add development version 2020-03-21 21:43:21 +01:00
Ettore Di Giacinto
3c5e144b8d
Tag 0.7 2020-03-21 21:39:12 +01:00
Daniele Rondina
c7652c8a70 Added labels to package definition
* cmd/search: Add support for search of the packages
  with a specific label.

* review Search method of Repositories for permit
  different search modes.

* labels are k/v attributes and could be matched
  through label key (with HasLabel method) or through
  regex that use "$key" + "=" + "$value"
2020-03-21 19:24:27 +01:00
Daniele Rondina
fc40c770ab Add 'tree bump' command 2020-03-16 22:18:48 +01:00
Daniele Rondina
853a1995b4 cmd/tree/validate: Now support multiple tree paths 2020-03-15 19:16:22 +01:00
Daniele Rondina
039b77fdfd cmd/tree/validate: Add counter of broken deps 2020-03-15 17:40:20 +01:00
Daniele Rondina
f02c54a274 cmd/tree/validate: Improve scripting integration 2020-03-14 17:38:57 +01:00
Daniele Rondina
d6182cba3b Add cli command 'tree validate' 2020-03-14 11:14:14 +01:00
Daniele Rondina
bc5c0fa0cf cmd/tree/pkglist: Cleanup code 2020-03-14 11:14:14 +01:00
Daniele Rondina
a94e430a3b cmd/tree/pkglist: Add --matches/-m flag 2020-03-13 18:08:49 +01:00
Daniele Rondina
82a17a1a22 Drop cfgFile print to improve bash integration 2020-03-08 00:13:45 +01:00
Daniele Rondina
ad011e937f cmd/tree/pkglist: Fix init of regExcludes 2020-03-06 17:54:26 +01:00
Daniele Rondina
25c796c430 Add 'tree pkglist' command cli 2020-03-06 17:51:04 +01:00
Daniele Rondina
df5499393f --verbose/-v is now --debug/-d 2020-03-06 16:53:36 +01:00
Ettore Di Giacinto
026ddf6fc9
Add dev version tag 2020-03-05 18:37:16 +01:00
Ettore Di Giacinto
ec0b83a811
Prepare for 0.6.4 tag 2020-03-05 18:36:51 +01:00
Ettore Di Giacinto
de23e0d5b1
Download dependencies before installing
This enables smoother upgrades, and uses cache to pre-download
packages before uninstall/install

Allows also from cli to download deps only
2020-02-27 23:15:31 +01:00
Ettore Di Giacinto
8572aa5222
Preserve cache data from deletion during uninstall 2020-02-27 23:14:36 +01:00
Ettore Di Giacinto
0e0c2f21a6
Add dev version tag 2020-02-27 18:57:41 +01:00
Ettore Di Giacinto
575079bb77
Prepare for 0.6.3 tag 2020-02-27 18:57:13 +01:00
Ettore Di Giacinto
48df98bcae
Add dev version tag 2020-02-23 22:42:02 +01:00
Ettore Di Giacinto
0ce1baa448
Prepare for 0.6.2 tag 2020-02-23 22:41:33 +01:00
Ettore Di Giacinto
07610bc216
Add build option to remove backend artifacts
Add keep-exported-images to build to instruct to remove backend artifacts (docker images)
2020-02-21 22:33:18 +01:00
Daniele Rondina
a04dadf100 Add support for parsing version with build 2020-02-21 21:56:32 +01:00
Ettore Di Giacinto
647ea35983
Add a way to extend the CLI with external binaries
This lets luet to be extended like git does (just by having luet-subcommand binaries under $PATH)
following the UNIX filosophy. It has the downside that we silence the errors from cobra and we handle
them by ourselves.

Also the Exec syscall is not portable, and it should have implementation for each platform (hence why in helpers)
2020-02-18 23:08:14 +01:00
Ettore Di Giacinto
4648dedb55
Add --nodeps, --onlydeps and --force to Installer
This allows also to use it on upgrade and uninstall as it exposes the Installer options to the CLI.

See #48, #49
2020-02-18 18:37:56 +01:00
Ettore Di Giacinto
2ce427d601
Add Nodeps, Onlydeps and Force options to Compiler
See #41
2020-02-18 18:36:44 +01:00
Ettore Di Giacinto
189c042fea
Add dev version tag 2020-02-17 18:04:36 +01:00
Ettore Di Giacinto
4e675723e8
Prepare for 0.6.1 tag 2020-02-17 18:04:05 +01:00
Ettore Di Giacinto
01e635bd78
Add dev version tag 2020-02-15 16:52:30 +01:00
Ettore Di Giacinto
68a5604d8c
Prepare for 0.6 tag 2020-02-15 16:51:51 +01:00
Ettore Di Giacinto
fcec6c5699
Add Push to hub feature
Add to the backends the Push capabilities to push images that were correctly built.
Also expose them to the CLI, along with KeepImg which was hidden.
2020-02-15 14:45:05 +01:00
Ettore Di Giacinto
d527eaed60
Allow to override default image repository 2020-02-15 14:31:23 +01:00
Ettore Di Giacinto
20bc250470
Add dev version tag 2020-02-12 15:45:01 +01:00
Ettore Di Giacinto
05b13c6c1e
Prepare for 0.5.1 tag 2020-02-12 15:44:34 +01:00
Ettore Di Giacinto
a756c802f9
Hook config when generating the SolverOptions, display debug message about solver type 2020-02-12 12:24:07 +01:00
Ettore Di Giacinto
3cd87abafe
Consume SolverOptions in cli 2020-02-12 11:23:38 +01:00
Ettore Di Giacinto
dfb6dab9dc
Move repository helpers under config
They are generated after the system config, let the structure provide such information
2020-02-12 10:20:07 +01:00
Ettore Di Giacinto
50ec17e738
Bump version for upcoming release 2020-02-08 12:08:31 +01:00
Ettore Di Giacinto
4c80d70512
Prepare for 0.5 tag 2020-02-08 12:07:18 +01:00
Daniele Rondina
1653a60428 cmd/create-repo: Permit to use repository from config 2020-02-02 11:29:05 +01:00
Daniele Rondina
2528fe0fb4 Add cleanup command 2020-02-01 19:35:46 +01:00
Daniele Rondina
524bbf990e Add support for same-owner config option 2020-02-01 19:01:15 +01:00
Ettore Di Giacinto
96f4a6c0e3
Add serve-repo for a minimal embedded micro http server 2020-01-31 21:22:15 +01:00
Ettore Di Giacinto
c6fe34b059
Support compression and checksum for trees
Fixes #33 #34 #35
2020-01-28 17:46:32 +01:00
Daniele Rondina
7ad767a81b cmd/repo: Add update command 2020-01-12 23:36:08 +01:00
Daniele Rondina
4c5f6f9f8d cmd/repo/list: View revision on cached repositories 2020-01-12 23:36:08 +01:00
Ettore Di Giacinto
22bc53ba13
Merge branch 'master' into develop 2020-01-06 19:14:17 +01:00
Ettore Di Giacinto
b6dba27a4a
Add 0.5 dev tag 2020-01-06 19:12:54 +01:00
Ettore Di Giacinto
12c97c7a2a
Prepare for 0.4 tag 2020-01-06 19:11:44 +01:00
Ettore Di Giacinto
d5fd14bceb
Merge branch 'build_clean' into develop 2020-01-05 16:27:31 +01:00
Ettore Di Giacinto
d2abaa9cc1
Add message asserting skip. Also return pointer to allow to edit Options 2020-01-05 16:26:42 +01:00
Ettore Di Giacinto
6d745ef915
Add build --clean to CLI 2020-01-05 16:08:39 +01:00
Ettore Di Giacinto
bcc6ce19ea
Move compiler options to its own struct
Also add Clean attribute, to handle a future build clean method
2020-01-05 14:32:26 +01:00
Daniele Rondina
e013412832 Add repo list command 2020-01-04 17:56:19 +01:00
Daniele Rondina
60ed9e0a04 cmd/root: Move message about config file used to debug 2020-01-04 17:53:15 +01:00
Daniele Rondina
6012e0081e Add support of incremental revision for repos
* on repository creation now if the repository.yaml
  is already present, the current revision is used.

* add --reset-revision option for force reset revision
  of a specific repository
2020-01-04 00:31:11 +01:00
Daniele Rondina
7ec36da059 Add --fatal option
Close #8
2020-01-03 15:41:45 +01:00
Daniele Rondina
c284d3e4bf Add support for logging to file 2020-01-03 15:22:55 +01:00
Daniele Rondina
cd0e588fa9 cmd/config: Align print to new tags 2020-01-02 18:38:07 +01:00
Daniele Rondina
716d404307 Align logic of cache repositories in all commands 2020-01-02 18:31:25 +01:00
Daniele Rondina
db7301f7bf Align selector logic for explicit version with PkgSelectorConditionFromInt 2020-01-01 22:58:19 +01:00
Ettore Di Giacinto
bbd811a6f2
If version is explict, do not add the selector in it 2020-01-01 14:20:45 +01:00
Daniele Rondina
ce888a2f40
Fix marshal of repository and use of cache repos 2020-01-01 13:44:39 +01:00
Daniele Rondina
01e66ee0b4
Review install phase 2020-01-01 13:44:39 +01:00
Daniele Rondina
a71e1a6f1d
Integrate config.LuetRepository with installer
* installer.LuetRepository is now installer.LuetSystemRepository,
  a struct that extend config.LuetRepository

* config: system_repositories option is now "repositories".
  This resolve viper issue.

* config: cache_repositories option is now "repetitors"
  This resolve viper issue.

* cmd/*: Now use new config.LuetRepository

* cmd/search: now create local luet repository if database_engine
  is equal to "boltdb"
2020-01-01 13:43:23 +01:00
Daniele Rondina
7f160a7a89
config: Add system section 2020-01-01 13:43:23 +01:00
Daniele Rondina
8b66127016
cmd/install: Now use _gentoo.ParsePackageStr and support pkgs without version 2020-01-01 13:43:22 +01:00
Daniele Rondina
16453bd09f
Concurrency option is now global
* concurrency could be configured now from cmdline,
  configuration file or LUET_GENERAL__CONCURRENCY env variable

* verbose option is now related to debug option
2020-01-01 13:43:22 +01:00
Daniele Rondina
0cb49a40c0
Support logging level and spinner customization 2020-01-01 13:43:22 +01:00
Daniele Rondina
bbc9574745
Review luet configuration file 2020-01-01 13:43:22 +01:00
Daniele Rondina
6f837c8c26
cmd/uninstall: Support uninstall of multiple pkgs 2020-01-01 13:43:21 +01:00
Daniele Rondina
a7e262cc48
cmd/build: Now support package without version/selector 2020-01-01 13:43:21 +01:00
Daniele Rondina
bbeb800611
cmd/build: selector is defined inside version 2020-01-01 13:43:21 +01:00
Daniele Rondina
4c62f714c4
cmd/build: Now use _gentoo.ParsePackageStr 2020-01-01 13:43:17 +01:00
Ettore Di Giacinto
f71c9937c4
Add compression to build CLI
Also handle how concurrency is set now.

Adds also an accessor to compiler to set the desired compression type

Refers to #33
2019-12-30 16:35:21 +01:00
Ettore Di Giacinto
8fffae31c7 Add dev version tag 2019-12-23 12:08:14 +01:00
Ettore Di Giacinto
adbd5fc19b Prepare for tagging release 2019-12-23 12:07:36 +01:00
Ettore Di Giacinto
0ccaf47f45
Cli: Take constraints in versions
Closes #19
2019-12-15 00:19:48 +01:00
Ettore Di Giacinto
247cef290f Bump for next version 2019-12-07 12:24:49 +01:00
Ettore Di Giacinto
228e4a17cd Prepare for tagging release 2019-12-07 12:23:12 +01:00
Ettore Di Giacinto
848b270e81
Add upgrade command 2019-11-29 19:01:58 +01:00
Ettore Di Giacinto
5d2d92e684
Adapt cmd and drop query 2019-11-29 19:01:53 +01:00
Ettore Di Giacinto
a54040dcd3
Add http client for installer #3 2019-11-26 18:05:48 +01:00
Ettore Di Giacinto
9c5a349d5d
Make possible to disable app locking 2019-11-26 18:05:13 +01:00
Ettore Di Giacinto
08897b5105
Allow one instance of the application to run 2019-11-25 20:28:08 +01:00
Ettore Di Giacinto
5c0971de2e
Add search to cli 2019-11-25 19:58:21 +01:00
Ettore Di Giacinto
b751b02830
Do not register viper bindings in init
Otherwise they get overlapped. Use PreRun instead
2019-11-25 19:55:30 +01:00
Ettore Di Giacinto
914ac68eea
Add create-repo, install and uninstall to cli 2019-11-24 18:28:39 +01:00
Ettore Di Giacinto
6cf6c2104d
Set cli tag for next version 2019-11-17 19:47:53 +01:00
Ettore Di Giacinto
f107f47242
Prepare for 0.1 tag 2019-11-17 19:45:20 +01:00
Ettore Di Giacinto
a806937941
Add version to CLI and write commit sha to release build 2019-11-17 16:12:12 +01:00
Ettore Di Giacinto
602f5c68d5
Use emojis for icons 2019-11-16 14:16:59 +01:00
Ettore Di Giacinto
08950d66d9
Make database backend switchable from the cli
Closes #5

Signed-off-by: Ettore Di Giacinto <mudler@gentoo.org>
2019-11-16 13:26:34 +01:00
Ettore Di Giacinto
b2060c82e3
Make DB Switchable
Fixes races conditions and make the DB Switchable. Also prepare inside
the CompilationSpec the tree of the deps to be built, and parallelize
only the building jobs.

Closes #7

Signed-off-by: Ettore Di Giacinto <mudler@gentoo.org>
2019-11-16 13:26:33 +01:00
Ettore Di Giacinto
6dada5622d
Initialize spec with constructor 2019-11-15 19:31:56 +01:00
Ettore Di Giacinto
821020be47
Extend build command
Allow to build all packages and revdeps
2019-11-15 18:15:23 +01:00
Ettore Di Giacinto
ccdca66420
Small fixes and enhance output
Fixes a small issue with the Spinner which prevented to update the
spinner style. Also respect the temp folders of the output when
extracting the rootfs.
2019-11-14 20:22:49 +01:00
Ettore Di Giacinto
f8f319941a
Parse packages in build cmd 2019-11-12 22:17:23 +01:00
Ettore Di Giacinto
49a77280ae
Add build cmd in the cli 2019-11-10 22:40:31 +01:00
Ettore Di Giacinto
24a6de3f29
Use Fatal() in cmd/ 2019-11-04 10:16:20 +01:00
Ettore Di Giacinto
a5e125de4b
Query needs a category as well to find out the package 2019-11-03 17:24:47 +01:00
Ettore Di Giacinto
f3623cbb38
Allow to switch between database types in Gentoo Parser
Define types and allows to switch between boltdb and inmemory
2019-11-03 13:37:45 +01:00
Ettore Di Giacinto
87406e05d3
Use available num of CPU as default 2019-11-03 10:50:07 +01:00
Ettore Di Giacinto
b72a09ab1c
Make logging concurrent-aware 2019-11-02 18:00:06 +01:00
Ettore Di Giacinto
c04e6496fb
Enhance output with consistent usage of logger 2019-11-02 10:26:28 +01:00
Ettore Di Giacinto
624e991688
Parametrize concurrency 2019-11-01 12:41:31 +01:00
Ettore Di Giacinto
71100688f2
Enhance cmd output 2019-10-31 12:41:12 +01:00
Ettore Di Giacinto
a5ceafca26
Add Tree parser with bolt
Also add Tree builder (Recipe) which can recompose trees.
2019-10-31 12:38:59 +01:00
Ettore Di Giacinto
8ca6051a04
Add cmd/ and main.go 2019-10-31 12:38:58 +01:00