galaaz 2.1.1 → 2.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 671c2fe1fb15dbd12a7f491e52c318d01ebe9625e78d9acdaaa3dffbe3efbd3d
4
- data.tar.gz: 2d4d63f915f0b8a09cff53df98802f7bcaff0298f9247ef38b583b2a0e902730
3
+ metadata.gz: fe7e81157b29ea65c61ca9bb97ab5a7f458b90b601cd1c76d8e1740e95e1f69f
4
+ data.tar.gz: bfd7e6b8f867ef903cb5119837d0e045b11c57e3aa2b5c9a717447abd0922478
5
5
  SHA512:
6
- metadata.gz: 1dc8f434731a05f495909d5f8bc70949f7ec7ae8034fbe8dd6a026f6b9592d426d573dffc0f13326ddfb7c830112bd6922fcdb8ca717e091d8722e219ea43de6
7
- data.tar.gz: d594128365977ac52a3a2d15f6e3dd5f1b97ee312c0c6232883f6fb8838fb7c1440f2272c3302e53853026befd7e625f6e4124a8d3ddd32959f7bf665cb8cda7
6
+ metadata.gz: 5599509abe5d487fb7e19d8ae3fb1a80a558dcc6928e4a526753253ff816820d41509d2f179d6968ca985bbb19084c60ab0f0fc82e34276d840a49a627ad171d
7
+ data.tar.gz: 3560c286e71ce88fe5486d71f62c4fb2cba342bf8af03f93e87a2c34ded854fce98eed90b57fb094acd39d333d0d0ea9bb49c35f651a0b33367b2bbc96c09b62
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.1.2
4
+
5
+ ### Fixed
6
+
7
+ - CRAN installs (`galaaz setup` / `galaaz add`) use a writable user library
8
+ (`R_LIBS_USER`, default `~/.local/lib/R/library`) so Omarchy/Arch no longer fail
9
+ with `lib = "/usr/lib/R/library" is not writable`.
10
+ - Gatekeeper `ext/new_bridge` Makefile uses `R CMD config --ldflags` instead of
11
+ hardcoded `-L$(R_HOME)/lib -lR` (breaks when `RHOME` is `/usr/lib64/R`).
12
+ - `galaaz setup` marks profile `core` on success.
13
+
14
+ ### Notes
15
+
16
+ - Omarchy dogfood: pin `script/omarchy/install-galaaz.sh` to this version; re-copy
17
+ the installer into `~/.local/bin/omarchy-install-galaaz` after updating.
18
+
3
19
  ## 2.1.1
4
20
 
5
21
  ### Added
@@ -1,21 +1,21 @@
1
1
  # Makefile for Galaaz Gatekeeper shared library
2
2
  # Usage: make clean all
3
3
 
4
- # R configuration
4
+ # Prefer `R` / `Rscript` on PATH (Omarchy/Arch: RHOME may be /usr/lib64/R).
5
5
  R_HOME := $(shell R RHOME)
6
- R_CPPFLAGS := $(shell $(R_HOME)/bin/R CMD config --cppflags)
7
- R_LIBS := $(shell $(R_HOME)/bin/R CMD config --ldflags)
6
+ R_CPPFLAGS := $(shell R CMD config --cppflags)
7
+ # Full linker flags from R (do NOT hardcode -L$(R_HOME)/lib wrong on some Arch layouts).
8
+ R_LDFLAGS := $(shell R CMD config --ldflags)
8
9
 
9
- # Rcpp configuration
10
- RCPP_INCLUDE := $(shell $(R_HOME)/bin/Rscript -e "cat(system.file('include', package='Rcpp'))")
10
+ # Rcpp configuration (needs R_LIBS_USER for user-library installs)
11
+ RCPP_INCLUDE := $(shell Rscript -e "cat(system.file('include', package='Rcpp'))")
11
12
  RCPP_CPPFLAGS := -I$(RCPP_INCLUDE)
12
13
 
13
14
  # Compiler settings
14
- CXX := $(shell $(R_HOME)/bin/R CMD config CXX)
15
- CXXFLAGS := $(shell $(R_HOME)/bin/R CMD config CXXFLAGS)
15
+ CXX := $(shell R CMD config CXX)
16
+ CXXFLAGS := $(shell R CMD config CXXFLAGS)
16
17
  CPPFLAGS := $(R_CPPFLAGS) $(RCPP_CPPFLAGS) -I.
17
- # Core R library only (avoid system libs that may not be present)
18
- LDFLAGS := -L$(R_HOME)/lib -lR -Wl,-rpath,$(R_HOME)/lib
18
+ LDFLAGS := $(R_LDFLAGS) -Wl,-rpath,$(R_HOME)/lib
19
19
 
20
20
  # Target library
21
21
  TARGET := galaaz_gatekeeper.so
@@ -34,7 +34,7 @@ $(TARGET): $(OBJ)
34
34
 
35
35
  check: $(TARGET)
36
36
  @echo "Checking library..."
37
- @$(R_HOME)/bin/Rscript -e "dyn.load('$(TARGET)'); cat('Library loads successfully\n')"
37
+ @Rscript -e "dyn.load('$(TARGET)'); cat('Library loads successfully\n')"
38
38
 
39
39
  clean:
40
40
  rm -f $(OBJ) $(TARGET)
data/lib/galaaz/cli.rb CHANGED
@@ -87,8 +87,10 @@ module Galaaz
87
87
  abort_unless(ok, 'make failed building ext/new_bridge')
88
88
  so = File.join(bridge, 'galaaz_gatekeeper.so')
89
89
  abort_unless(File.file?(so), "gatekeeper missing after build: #{so}")
90
+ mark_profile!('core')
90
91
  puts 'galaaz setup: OK'
91
92
  puts "You can now run: galaaz doctor"
93
+ puts 'Omarchy menu: Install → Development → Galaaz (add-ons appear after core)'
92
94
  0
93
95
  end
94
96
 
@@ -435,10 +437,27 @@ module Galaaz
435
437
  install_cran!(['Rcpp'])
436
438
  end
437
439
 
440
+ # Omarchy/Arch: /usr/lib/R/library is not writable for normal users.
441
+ def r_lib_bootstrap
442
+ <<~R
443
+ lib <- Sys.getenv("R_LIBS_USER", unset = "")
444
+ if (!nzchar(lib)) {
445
+ lib <- file.path(Sys.getenv("HOME"), ".local", "lib", "R", "library")
446
+ Sys.setenv(R_LIBS_USER = lib)
447
+ }
448
+ dir.create(lib, recursive = TRUE, showWarnings = FALSE)
449
+ .libPaths(c(lib, .libPaths()))
450
+ renviron <- file.path(Sys.getenv("HOME"), ".Renviron")
451
+ line <- paste0("R_LIBS_USER=", lib)
452
+ if (!file.exists(renviron) || !any(grepl("^R_LIBS_USER=", readLines(renviron, warn = FALSE)))) {
453
+ cat(line, "\\n", file = renviron, append = TRUE)
454
+ }
455
+ R
456
+ end
457
+
438
458
  def r_namespace?(pkg)
439
- out, status = Open3.capture2e(
440
- 'Rscript', '-e', "quit(status=if (requireNamespace('#{pkg}', quietly=TRUE)) 0 else 1)"
441
- )
459
+ script = "#{r_lib_bootstrap}\nquit(status=if (requireNamespace('#{pkg}', quietly=TRUE)) 0 else 1)"
460
+ _out, status = Open3.capture2e('Rscript', '-e', script)
442
461
  status.success?
443
462
  rescue Errno::ENOENT
444
463
  false
@@ -447,13 +466,14 @@ module Galaaz
447
466
  def install_cran!(pkgs)
448
467
  list = pkgs.map { |p| "'#{p}'" }.join(', ')
449
468
  script = <<~R
469
+ #{r_lib_bootstrap}
450
470
  repos <- '#{CRAN}'
451
471
  pkgs <- c(#{list})
452
472
  inst <- rownames(installed.packages())
453
473
  need <- pkgs[!pkgs %in% inst]
454
474
  if (length(need)) {
455
- message('Installing: ', paste(need, collapse=', '))
456
- install.packages(need, repos = repos)
475
+ message('Installing into ', lib, ': ', paste(need, collapse=', '))
476
+ install.packages(need, lib = lib, repos = repos)
457
477
  }
458
478
  missing <- pkgs[!pkgs %in% rownames(installed.packages())]
459
479
  if (length(missing)) {
@@ -470,14 +490,15 @@ module Galaaz
470
490
 
471
491
  list = pkgs.map { |p| "'#{p}'" }.join(', ')
472
492
  script = <<~R
493
+ #{r_lib_bootstrap}
473
494
  repos <- '#{CRAN}'
474
495
  pkgs <- c(#{list})
475
496
  inst <- rownames(installed.packages())
476
497
  need <- pkgs[!pkgs %in% inst]
477
498
  if (length(need)) {
478
- message('Installing (optional): ', paste(need, collapse=', '))
499
+ message('Installing (optional) into ', lib, ': ', paste(need, collapse=', '))
479
500
  tryCatch(
480
- install.packages(need, repos = repos),
501
+ install.packages(need, lib = lib, repos = repos),
481
502
  error = function(e) message(e)
482
503
  )
483
504
  }
data/version.rb CHANGED
@@ -1,2 +1,2 @@
1
1
  $gem_name = "galaaz"
2
- $version="2.1.1"
2
+ $version="2.1.2"
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: galaaz
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Botafogo
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
10
  date: 2026-09-04 00:00:00.000000000 Z
@@ -87,11 +86,11 @@ description: |
87
86
  email: rodrigo.a.botafogo@gmail.com
88
87
  executables:
89
88
  - galaaz
90
- - gstudio
91
- - gknit
92
89
  - gbookdown
93
- - grun
90
+ - gknit
94
91
  - gknit-draft
92
+ - grun
93
+ - gstudio
95
94
  extensions: []
96
95
  extra_rdoc_files: []
97
96
  files:
@@ -485,7 +484,6 @@ metadata:
485
484
  documentation_uri: https://rbotafogo.github.io/galaaz/
486
485
  changelog_uri: https://github.com/rbotafogo/galaaz/blob/galaaz2_0/CHANGELOG.md
487
486
  yard.run: yri
488
- post_install_message:
489
487
  rdoc_options: []
490
488
  require_paths:
491
489
  - lib
@@ -500,8 +498,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
500
498
  - !ruby/object:Gem::Version
501
499
  version: '0'
502
500
  requirements: []
503
- rubygems_version: 3.5.22
504
- signing_key:
501
+ rubygems_version: 4.0.3
505
502
  specification_version: 4
506
503
  summary: 'R-on-Rails: tightly couple Ruby and GNU R for data science on the web'
507
504
  test_files: []