diff --git a/.golangci.yml b/.golangci.yml
new file mode 100644
index 0000000..74d6725
--- /dev/null
+++ b/.golangci.yml
@@ -0,0 +1,46 @@
+# ALR - Any Linux Repository
+# Copyright (C) 2025 Евгений Храмов
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+run:
+ timeout: 5m
+
+linters-settings:
+ goimports:
+ local-prefixes: "plemya-x.ru/alr"
+ gofmt:
+ simplify: true
+ gofumpt:
+ extra-rules: true
+
+linters:
+ enable:
+ - gofmt
+ - gofumpt
+ - goimports
+ - gocritic
+ - govet
+ - staticcheck
+ - unused
+ - errcheck
+ - typecheck
+# - forbidigo
+
+issues:
+ fix: true
+ exclude-rules:
+ - path: _test\.go
+ linters:
+ - errcheck
\ No newline at end of file
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 9f53648..4d2763e 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -1,3 +1,22 @@
+# This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+# It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+#
+# ALR - Any Linux Repository
+# Copyright (C) 2025 Евгений Храмов
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
before:
hooks:
- go mod tidy
diff --git a/.woodpecker.yml b/.woodpecker.yml
index dee2b41..556b330 100644
--- a/.woodpecker.yml
+++ b/.woodpecker.yml
@@ -1,3 +1,22 @@
+# This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+# It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+#
+# ALR - Any Linux Repository
+# Copyright (C) 2025 Евгений Храмов
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
platform: linux/amd64
pipeline:
release:
diff --git a/Makefile b/Makefile
index 91dc4d2..1f2bb5f 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,9 @@ ZSH_COMPLETION := $(COMPLETIONS_DIR)/zsh
INSTALLED_BASH_COMPLETION := $(DESTDIR)$(PREFIX)/share/bash-completion/completions/$(NAME)
INSTALLED_ZSH_COMPLETION := $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_$(NAME)
+ADD_LICENSE_BIN := go run github.com/google/addlicense@4caba19b7ed7818bb86bc4cd20411a246aa4a524
+GOLANGCI_LINT_BIN := go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2
+
.PHONY: build install clean clear uninstall check-no-root
build: check-no-root $(BIN)
@@ -48,3 +51,12 @@ uninstall:
clean clear:
rm -f $(BIN)
+
+OLD_FILES=$$(< old-files)
+IGNORE_OLD_FILES := $(foreach file,$(shell cat old-files),-ignore $(file))
+update-license:
+ $(ADD_LICENSE_BIN) -v -f license-header-old-files.tmpl $(OLD_FILES)
+ $(ADD_LICENSE_BIN) -v -f license-header.tmpl $(IGNORE_OLD_FILES) .
+
+fmt:
+ $(GOLANGCI_LINT_BIN) run --fix
diff --git a/build.go b/build.go
index 08014f7..7cb0a4b 100644
--- a/build.go
+++ b/build.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package main
@@ -23,6 +24,7 @@ import (
"path/filepath"
"github.com/urfave/cli/v2"
+
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/internal/osutils"
"plemya-x.ru/alr/internal/types"
diff --git a/fix.go b/fix.go
index 2c6c3d1..d5035f1 100644
--- a/fix.go
+++ b/fix.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package main
@@ -22,6 +23,7 @@ import (
"os"
"github.com/urfave/cli/v2"
+
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/internal/db"
"plemya-x.ru/alr/pkg/loggerctx"
diff --git a/gen.go b/gen.go
index b634d69..0ead62a 100644
--- a/gen.go
+++ b/gen.go
@@ -1,9 +1,29 @@
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package main
import (
"os"
"github.com/urfave/cli/v2"
+
"plemya-x.ru/alr/pkg/gen"
)
diff --git a/helper.go b/helper.go
index 4dc7dfe..d3134ee 100644
--- a/helper.go
+++ b/helper.go
@@ -1,3 +1,22 @@
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package main
import (
@@ -6,12 +25,13 @@ import (
"strings"
"github.com/urfave/cli/v2"
+ "mvdan.cc/sh/v3/expand"
+ "mvdan.cc/sh/v3/interp"
+
"plemya-x.ru/alr/internal/cpu"
"plemya-x.ru/alr/internal/shutils/helpers"
"plemya-x.ru/alr/pkg/distro"
"plemya-x.ru/alr/pkg/loggerctx"
- "mvdan.cc/sh/v3/expand"
- "mvdan.cc/sh/v3/interp"
)
var helperCmd = &cli.Command{
diff --git a/info.go b/info.go
index 78dc9f9..7a4d6dc 100644
--- a/info.go
+++ b/info.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package main
@@ -23,13 +24,14 @@ import (
"os"
"github.com/urfave/cli/v2"
+ "gopkg.in/yaml.v3"
+
"plemya-x.ru/alr/internal/cliutils"
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/internal/overrides"
"plemya-x.ru/alr/pkg/distro"
"plemya-x.ru/alr/pkg/loggerctx"
"plemya-x.ru/alr/pkg/repos"
- "gopkg.in/yaml.v3"
)
var infoCmd = &cli.Command{
diff --git a/install.go b/install.go
index 77c08bb..f7875fe 100644
--- a/install.go
+++ b/install.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package main
@@ -22,6 +23,7 @@ import (
"fmt"
"github.com/urfave/cli/v2"
+
"plemya-x.ru/alr/internal/cliutils"
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/internal/db"
diff --git a/internal/cliutils/prompt.go b/internal/cliutils/prompt.go
index f46fd1e..30d63a3 100644
--- a/internal/cliutils/prompt.go
+++ b/internal/cliutils/prompt.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package cliutils
@@ -24,6 +25,7 @@ import (
"strings"
"github.com/AlecAivazis/survey/v2"
+
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/internal/db"
"plemya-x.ru/alr/internal/pager"
diff --git a/internal/config/config.go b/internal/config/config.go
index 9c27b93..7e8b131 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package config
@@ -25,6 +26,7 @@ import (
"sync"
"github.com/pelletier/go-toml/v2"
+
"plemya-x.ru/alr/internal/types"
"plemya-x.ru/alr/pkg/loggerctx"
)
diff --git a/internal/config/config_legacy.go b/internal/config/config_legacy.go
index 46fe18c..f3faabb 100644
--- a/internal/config/config_legacy.go
+++ b/internal/config/config_legacy.go
@@ -1,20 +1,18 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package config
diff --git a/internal/config/lang.go b/internal/config/lang.go
index 55d8948..bced477 100644
--- a/internal/config/lang.go
+++ b/internal/config/lang.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package config
@@ -24,8 +25,9 @@ import (
"strings"
"sync"
- "plemya-x.ru/alr/pkg/loggerctx"
"golang.org/x/text/language"
+
+ "plemya-x.ru/alr/pkg/loggerctx"
)
var (
diff --git a/internal/config/paths.go b/internal/config/paths.go
index ebdea31..b3968c5 100644
--- a/internal/config/paths.go
+++ b/internal/config/paths.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package config
diff --git a/internal/config/version.go b/internal/config/version.go
index f23abf7..2491a3d 100644
--- a/internal/config/version.go
+++ b/internal/config/version.go
@@ -1,3 +1,22 @@
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package config
// Version contains the version of ALR. If the version
diff --git a/internal/cpu/cpu.go b/internal/cpu/cpu.go
index fdae16b..f70d49b 100644
--- a/internal/cpu/cpu.go
+++ b/internal/cpu/cpu.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package cpu
diff --git a/internal/db/db.go b/internal/db/db.go
index a4bd4a5..11b78c8 100644
--- a/internal/db/db.go
+++ b/internal/db/db.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package db
@@ -22,6 +23,7 @@ import (
"context"
"github.com/jmoiron/sqlx"
+
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/pkg/loggerctx"
)
diff --git a/internal/db/db_legacy.go b/internal/db/db_legacy.go
index 22e6fb8..b5b0685 100644
--- a/internal/db/db_legacy.go
+++ b/internal/db/db_legacy.go
@@ -1,20 +1,18 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package db
@@ -23,6 +21,7 @@ import (
"sync"
"github.com/jmoiron/sqlx"
+
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/pkg/loggerctx"
)
diff --git a/internal/db/db_test.go b/internal/db/db_test.go
index 4412181..737420a 100644
--- a/internal/db/db_test.go
+++ b/internal/db/db_test.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package db_test
@@ -25,6 +26,7 @@ import (
"testing"
"github.com/jmoiron/sqlx"
+
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/internal/db"
)
diff --git a/internal/db/json.go b/internal/db/json.go
index 2b05693..58c7645 100644
--- a/internal/db/json.go
+++ b/internal/db/json.go
@@ -1,3 +1,19 @@
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package db
import (
diff --git a/internal/db/utils.go b/internal/db/utils.go
index 3cbce79..2b3ebc0 100644
--- a/internal/db/utils.go
+++ b/internal/db/utils.go
@@ -1,3 +1,19 @@
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package db
import (
diff --git a/internal/dl/dl.go b/internal/dl/dl.go
index 6a82bca..43743ab 100644
--- a/internal/dl/dl.go
+++ b/internal/dl/dl.go
@@ -1,20 +1,21 @@
-/*
-* ALR - Any Linux Repository
-* Copyright (C) 2024 Евгений Храмов
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
// Пакет dl содержит абстракции для загрузки файлов и каталогов
// из различных источников.
@@ -39,6 +40,7 @@ import (
"golang.org/x/crypto/blake2b"
"golang.org/x/crypto/blake2s"
"golang.org/x/exp/slices"
+
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/internal/dlcache"
"plemya-x.ru/alr/pkg/loggerctx"
diff --git a/internal/dl/file.go b/internal/dl/file.go
index a98d07a..aa46f69 100644
--- a/internal/dl/file.go
+++ b/internal/dl/file.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package dl
@@ -33,6 +34,7 @@ import (
"github.com/mholt/archiver/v4"
"github.com/schollz/progressbar/v3"
+
"plemya-x.ru/alr/internal/shutils/handlers"
)
diff --git a/internal/dl/git.go b/internal/dl/git.go
index b70debd..dca4c6c 100644
--- a/internal/dl/git.go
+++ b/internal/dl/git.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package dl
diff --git a/internal/dl/torrent.go b/internal/dl/torrent.go
index c09931c..425d104 100644
--- a/internal/dl/torrent.go
+++ b/internal/dl/torrent.go
@@ -1,3 +1,22 @@
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package dl
import (
diff --git a/internal/dlcache/dlcache.go b/internal/dlcache/dlcache.go
index 77eb5f4..ffba344 100644
--- a/internal/dlcache/dlcache.go
+++ b/internal/dlcache/dlcache.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package dlcache
diff --git a/internal/dlcache/dlcache_test.go b/internal/dlcache/dlcache_test.go
index 7cd78cc..27847ec 100644
--- a/internal/dlcache/dlcache_test.go
+++ b/internal/dlcache/dlcache_test.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package dlcache_test
diff --git a/internal/dlcache/utils.go b/internal/dlcache/utils.go
index 4b7a913..12a6206 100644
--- a/internal/dlcache/utils.go
+++ b/internal/dlcache/utils.go
@@ -1,3 +1,19 @@
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package dlcache
import (
diff --git a/internal/osutils/move.go b/internal/osutils/move.go
index b8bc253..8e5c7e8 100644
--- a/internal/osutils/move.go
+++ b/internal/osutils/move.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package osutils
diff --git a/internal/overrides/overrides.go b/internal/overrides/overrides.go
index 728711a..8ffee19 100644
--- a/internal/overrides/overrides.go
+++ b/internal/overrides/overrides.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package overrides
@@ -22,11 +23,12 @@ import (
"reflect"
"strings"
+ "golang.org/x/exp/slices"
+ "golang.org/x/text/language"
+
"plemya-x.ru/alr/internal/cpu"
"plemya-x.ru/alr/internal/db"
"plemya-x.ru/alr/pkg/distro"
- "golang.org/x/exp/slices"
- "golang.org/x/text/language"
)
type Opts struct {
diff --git a/internal/overrides/overrides_test.go b/internal/overrides/overrides_test.go
index 30fa083..69fad91 100644
--- a/internal/overrides/overrides_test.go
+++ b/internal/overrides/overrides_test.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package overrides_test
@@ -23,9 +24,10 @@ import (
"reflect"
"testing"
+ "golang.org/x/text/language"
+
"plemya-x.ru/alr/internal/overrides"
"plemya-x.ru/alr/pkg/distro"
- "golang.org/x/text/language"
)
var info = &distro.OSRelease{
diff --git a/internal/pager/highlighting.go b/internal/pager/highlighting.go
index 3e4011b..588b996 100644
--- a/internal/pager/highlighting.go
+++ b/internal/pager/highlighting.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package pager
diff --git a/internal/pager/pager.go b/internal/pager/pager.go
index 7a245cf..f3aef28 100644
--- a/internal/pager/pager.go
+++ b/internal/pager/pager.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package pager
diff --git a/internal/shutils/decoder/decoder.go b/internal/shutils/decoder/decoder.go
index 14cbc6d..419049d 100644
--- a/internal/shutils/decoder/decoder.go
+++ b/internal/shutils/decoder/decoder.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package decoder
@@ -29,6 +30,7 @@ import (
"mvdan.cc/sh/v3/expand"
"mvdan.cc/sh/v3/interp"
"mvdan.cc/sh/v3/syntax"
+
"plemya-x.ru/alr/internal/overrides"
"plemya-x.ru/alr/pkg/distro"
)
diff --git a/internal/shutils/decoder/decoder_test.go b/internal/shutils/decoder/decoder_test.go
index f703764..a5b8357 100644
--- a/internal/shutils/decoder/decoder_test.go
+++ b/internal/shutils/decoder/decoder_test.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package decoder_test
@@ -29,6 +30,7 @@ import (
"mvdan.cc/sh/v3/interp"
"mvdan.cc/sh/v3/syntax"
+
"plemya-x.ru/alr/internal/shutils/decoder"
"plemya-x.ru/alr/pkg/distro"
)
diff --git a/internal/shutils/handlers/exec.go b/internal/shutils/handlers/exec.go
index 84878d9..74c1d2a 100644
--- a/internal/shutils/handlers/exec.go
+++ b/internal/shutils/handlers/exec.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package handlers
diff --git a/internal/shutils/handlers/exec_test.go b/internal/shutils/handlers/exec_test.go
index de86030..2a7eef6 100644
--- a/internal/shutils/handlers/exec_test.go
+++ b/internal/shutils/handlers/exec_test.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package handlers_test
@@ -25,6 +26,7 @@ import (
"mvdan.cc/sh/v3/interp"
"mvdan.cc/sh/v3/syntax"
+
"plemya-x.ru/alr/internal/shutils/decoder"
"plemya-x.ru/alr/internal/shutils/handlers"
"plemya-x.ru/alr/pkg/distro"
diff --git a/internal/shutils/handlers/fakeroot.go b/internal/shutils/handlers/fakeroot.go
index 254c5d2..f39b159 100644
--- a/internal/shutils/handlers/fakeroot.go
+++ b/internal/shutils/handlers/fakeroot.go
@@ -1,3 +1,22 @@
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package handlers
import (
@@ -10,9 +29,9 @@ import (
"syscall"
"time"
- "plemya-x.ru/fakeroot"
"mvdan.cc/sh/v3/expand"
"mvdan.cc/sh/v3/interp"
+ "plemya-x.ru/fakeroot"
)
// FakerootExecHandler was extracted from github.com/mvdan/sh/interp/handler.go
diff --git a/internal/shutils/handlers/nop.go b/internal/shutils/handlers/nop.go
index 8bd791e..f8013d0 100644
--- a/internal/shutils/handlers/nop.go
+++ b/internal/shutils/handlers/nop.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package handlers
diff --git a/internal/shutils/handlers/nop_test.go b/internal/shutils/handlers/nop_test.go
index eb4a40b..9de27bd 100644
--- a/internal/shutils/handlers/nop_test.go
+++ b/internal/shutils/handlers/nop_test.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package handlers_test
@@ -25,9 +26,10 @@ import (
"strings"
"testing"
- "plemya-x.ru/alr/internal/shutils/handlers"
"mvdan.cc/sh/v3/interp"
"mvdan.cc/sh/v3/syntax"
+
+ "plemya-x.ru/alr/internal/shutils/handlers"
)
func TestNopExec(t *testing.T) {
diff --git a/internal/shutils/handlers/restricted.go b/internal/shutils/handlers/restricted.go
index d750d3d..760df98 100644
--- a/internal/shutils/handlers/restricted.go
+++ b/internal/shutils/handlers/restricted.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package handlers
diff --git a/internal/shutils/helpers/helpers.go b/internal/shutils/helpers/helpers.go
index 3036a38..1ae9201 100644
--- a/internal/shutils/helpers/helpers.go
+++ b/internal/shutils/helpers/helpers.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package helpers
@@ -31,8 +32,9 @@ import (
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing/object"
"golang.org/x/exp/slices"
- "plemya-x.ru/alr/internal/shutils/handlers"
"mvdan.cc/sh/v3/interp"
+
+ "plemya-x.ru/alr/internal/shutils/handlers"
)
var (
diff --git a/internal/translations/files/lure.en.toml b/internal/translations/files/lure.en.toml
index c9165cd..73bb01f 100644
--- a/internal/translations/files/lure.en.toml
+++ b/internal/translations/files/lure.en.toml
@@ -1,3 +1,22 @@
+# This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+# It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+#
+# ALR - Any Linux Repository
+# Copyright (C) 2025 Евгений Храмов
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
[[translation]]
id = 1228660974
value = 'Pulling repository'
diff --git a/internal/translations/files/lure.ru.toml b/internal/translations/files/lure.ru.toml
index 5f76709..39d6d41 100644
--- a/internal/translations/files/lure.ru.toml
+++ b/internal/translations/files/lure.ru.toml
@@ -1,3 +1,22 @@
+# This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+# It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+#
+# ALR - Any Linux Repository
+# Copyright (C) 2025 Евгений Храмов
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
[[translation]]
id = 1228660974
value = 'Скачивание репозитория'
diff --git a/internal/translations/translations.go b/internal/translations/translations.go
index 1c545da..bd138cf 100644
--- a/internal/translations/translations.go
+++ b/internal/translations/translations.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package translations
@@ -24,9 +25,10 @@ import (
"sync"
"go.elara.ws/logger"
- "plemya-x.ru/alr/pkg/loggerctx"
"go.elara.ws/translate"
"golang.org/x/text/language"
+
+ "plemya-x.ru/alr/pkg/loggerctx"
)
//go:embed files
diff --git a/internal/types/build.go b/internal/types/build.go
index 18c2e43..507fab1 100644
--- a/internal/types/build.go
+++ b/internal/types/build.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package types
diff --git a/internal/types/config.go b/internal/types/config.go
index 3a67d86..241cfbe 100644
--- a/internal/types/config.go
+++ b/internal/types/config.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package types
diff --git a/internal/types/repo.go b/internal/types/repo.go
index 39ba681..7986419 100644
--- a/internal/types/repo.go
+++ b/internal/types/repo.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package types
diff --git a/license-header-old-files.tmpl b/license-header-old-files.tmpl
new file mode 100644
index 0000000..5c734a5
--- /dev/null
+++ b/license-header-old-files.tmpl
@@ -0,0 +1,18 @@
+This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+
+ALR - Any Linux Repository
+Copyright (C) {{ .Year }} Евгений Храмов
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
\ No newline at end of file
diff --git a/license-header.tmpl b/license-header.tmpl
new file mode 100644
index 0000000..367a718
--- /dev/null
+++ b/license-header.tmpl
@@ -0,0 +1,15 @@
+ALR - Any Linux Repository
+Copyright (C) {{ .Year }} Евгений Храмов
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
\ No newline at end of file
diff --git a/list.go b/list.go
index d89081b..82bf858 100644
--- a/list.go
+++ b/list.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package main
@@ -23,6 +24,7 @@ import (
"github.com/urfave/cli/v2"
"golang.org/x/exp/slices"
+
"plemya-x.ru/alr/internal/config"
database "plemya-x.ru/alr/internal/db"
"plemya-x.ru/alr/pkg/loggerctx"
diff --git a/main.go b/main.go
index 03325a1..8095fa3 100644
--- a/main.go
+++ b/main.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package main
@@ -28,6 +29,7 @@ import (
"github.com/mattn/go-isatty"
"github.com/urfave/cli/v2"
"go.elara.ws/logger"
+
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/internal/db"
"plemya-x.ru/alr/internal/translations"
diff --git a/old-files b/old-files
new file mode 100644
index 0000000..5be5cf9
--- /dev/null
+++ b/old-files
@@ -0,0 +1,83 @@
+./.github/FUNDING.yml
+./.gitignore
+./.goreleaser.yaml
+./.woodpecker.yml
+./LICENSE
+./Makefile
+./README.md
+./assets/logo.png
+./build.go
+./docs/README.md
+./docs/configuration.md
+./docs/packages/README.md
+./docs/packages/adding-packages.md
+./docs/packages/build-scripts.md
+./docs/packages/conventions.md
+./docs/usage.md
+./fix.go
+./gen.go
+./go.mod
+./go.sum
+./helper.go
+./info.go
+./install.go
+./internal/cliutils/prompt.go
+./internal/config/config.go
+./internal/config/lang.go
+./internal/config/paths.go
+./internal/config/version.go
+./internal/cpu/cpu.go
+./internal/db/db.go
+./internal/db/db_test.go
+./internal/dl/dl.go
+./internal/dl/file.go
+./internal/dl/git.go
+./internal/dl/torrent.go
+./internal/dlcache/dlcache.go
+./internal/dlcache/dlcache_test.go
+./internal/osutils/move.go
+./internal/overrides/overrides.go
+./internal/overrides/overrides_test.go
+./internal/pager/highlighting.go
+./internal/pager/pager.go
+./internal/shutils/decoder/decoder.go
+./internal/shutils/decoder/decoder_test.go
+./internal/shutils/handlers/exec.go
+./internal/shutils/handlers/exec_test.go
+./internal/shutils/handlers/fakeroot.go
+./internal/shutils/handlers/nop.go
+./internal/shutils/handlers/nop_test.go
+./internal/shutils/handlers/restricted.go
+./internal/shutils/helpers/helpers.go
+./internal/translations/files/lure.en.toml
+./internal/translations/files/lure.ru.toml
+./internal/translations/translations.go
+./internal/types/build.go
+./internal/types/config.go
+./internal/types/repo.go
+./list.go
+./main.go
+./pkg/build/build.go
+./pkg/build/install.go
+./pkg/distro/osrelease.go
+./pkg/gen/funcs.go
+./pkg/gen/pip.go
+./pkg/gen/tmpls/pip.tmpl.sh
+./pkg/loggerctx/log.go
+./pkg/manager/apk.go
+./pkg/manager/apt.go
+./pkg/manager/dnf.go
+./pkg/manager/managers.go
+./pkg/manager/pacman.go
+./pkg/manager/yum.go
+./pkg/manager/zypper.go
+./pkg/repos/find.go
+./pkg/repos/find_test.go
+./pkg/repos/pull.go
+./pkg/repos/pull_test.go
+./pkg/search/search.go
+./repo.go
+./scripts/completion/bash
+./scripts/completion/zsh
+./scripts/install.sh
+./upgrade.go
\ No newline at end of file
diff --git a/pkg/build/build.go b/pkg/build/build.go
index 7f7bb72..73a0c1e 100644
--- a/pkg/build/build.go
+++ b/pkg/build/build.go
@@ -1,29 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * Это программное обеспечение свободно: вы можете распространять его и/или изменять
- * на условиях GNU General Public License, опубликованной Free Software Foundation,
- * либо версии 3 лицензии, либо (на ваш выбор) любой более поздней версии.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * Это программное обеспечение распространяется в надежде, что оно будет полезным,
- * но БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ; даже без подразумеваемой гарантии
- * КОММЕРЧЕСКОЙ ПРИГОДНОСТИ или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННОЙ ЦЕЛИ. См.
- * GNU General Public License для более подробной информации.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- * Вы должны были получить копию GNU General Public License
- * вместе с этой программой. Если нет, см. .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package build
@@ -53,6 +45,7 @@ import (
"github.com/goreleaser/nfpm/v2"
"github.com/goreleaser/nfpm/v2/files"
+
"plemya-x.ru/alr/internal/cliutils"
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/internal/cpu"
diff --git a/pkg/build/findDeps.go b/pkg/build/findDeps.go
index eda5884..5453d1c 100644
--- a/pkg/build/findDeps.go
+++ b/pkg/build/findDeps.go
@@ -1,3 +1,19 @@
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package build
import (
@@ -8,6 +24,7 @@ import (
"strings"
"github.com/goreleaser/nfpm/v2"
+
"plemya-x.ru/alr/internal/types"
"plemya-x.ru/alr/pkg/loggerctx"
)
diff --git a/pkg/build/install.go b/pkg/build/install.go
index 19ee98f..c3e547e 100644
--- a/pkg/build/install.go
+++ b/pkg/build/install.go
@@ -1,31 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * ALR - Любой Linux Репозиторий
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * Это программное обеспечение является свободным: вы можете распространять его и/или изменять
- * it under the terms of the GNU General Public License as published by
- * на условиях GNU General Public License, опубликованной
- * the Free Software Foundation, either version 3 of the License, or
- * Free Software Foundation, либо версии 3 лицензии, либо
- * (at your option) any later version.
- * (по вашему усмотрению) любой более поздней версии.
- *
- * This program is distributed in the hope that it will be useful,
- * Это программное обеспечение распространяется в надежде, что оно будет полезным,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * но БЕЗ КАКОЙ-ЛИБО ГАРАНТИИ; даже без подразумеваемой гарантии
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * КОММЕРЧЕСКОЙ ПРИГОДНОСТИ или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННОЙ ЦЕЛИ.
- * GNU General Public License for more details.
- * Подробности смотрите в GNU General Public License.
- *
- * You should have received a copy of the GNU General Public License
- * Вы должны были получить копию GNU General Public License
- * along with this program. If not, see .
- * вместе с этой программой. Если нет, посмотрите .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package build
@@ -46,15 +36,15 @@ func InstallPkgs(ctx context.Context, alrPkgs []db.Package, nativePkgs []string,
if len(nativePkgs) > 0 {
err := opts.Manager.Install(nil, nativePkgs...)
- // Если есть нативные пакеты, выполняем их установку
+ // Если есть нативные пакеты, выполняем их установку
if err != nil {
log.Fatal("Error installing native packages").Err(err).Send()
- // Логируем и завершаем выполнение при ошибке
+ // Логируем и завершаем выполнение при ошибке
}
}
InstallScripts(ctx, GetScriptPaths(ctx, alrPkgs), opts)
- // Устанавливаем скрипты сборки через функцию InstallScripts
+ // Устанавливаем скрипты сборки через функцию InstallScripts
}
// GetScriptPaths возвращает срез путей к скриптам, соответствующий
@@ -62,7 +52,7 @@ func InstallPkgs(ctx context.Context, alrPkgs []db.Package, nativePkgs []string,
func GetScriptPaths(ctx context.Context, pkgs []db.Package) []string {
var scripts []string
for _, pkg := range pkgs {
- // Для каждого пакета создаем путь к скрипту сборки
+ // Для каждого пакета создаем путь к скрипту сборки
scriptPath := filepath.Join(config.GetPaths(ctx).RepoDir, pkg.Repository, pkg.Name, "alr.sh")
scripts = append(scripts, scriptPath)
}
@@ -75,17 +65,17 @@ func InstallScripts(ctx context.Context, scripts []string, opts types.BuildOpts)
for _, script := range scripts {
opts.Script = script // Устанавливаем текущий скрипт в опции
builtPkgs, _, err := BuildPackage(ctx, opts)
- // Выполняем сборку пакета
+ // Выполняем сборку пакета
if err != nil {
log.Fatal("Error building package").Err(err).Send()
- // Логируем и завершаем выполнение при ошибке сборки
+ // Логируем и завершаем выполнение при ошибке сборки
}
err = opts.Manager.InstallLocal(nil, builtPkgs...)
- // Устанавливаем локально собранные пакеты
+ // Устанавливаем локально собранные пакеты
if err != nil {
log.Fatal("Error installing package").Err(err).Send()
- // Логируем и завершаем выполнение при ошибке установки
+ // Логируем и завершаем выполнение при ошибке установки
}
}
}
diff --git a/pkg/distro/osrelease.go b/pkg/distro/osrelease.go
index f9ba17f..a62577e 100644
--- a/pkg/distro/osrelease.go
+++ b/pkg/distro/osrelease.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package distro
@@ -23,10 +24,11 @@ import (
"os"
"strings"
- "plemya-x.ru/alr/internal/shutils/handlers"
"mvdan.cc/sh/v3/expand"
"mvdan.cc/sh/v3/interp"
"mvdan.cc/sh/v3/syntax"
+
+ "plemya-x.ru/alr/internal/shutils/handlers"
)
// OSRelease contains information from an os-release file
diff --git a/pkg/gen/funcs.go b/pkg/gen/funcs.go
index 46022e3..7554344 100644
--- a/pkg/gen/funcs.go
+++ b/pkg/gen/funcs.go
@@ -1,20 +1,39 @@
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package gen
import (
- "strings"
- "text/template"
+ "strings"
+ "text/template"
)
// Определяем переменную funcs типа template.FuncMap, которая будет использоваться для
// предоставления пользовательских функций в шаблонах
var funcs = template.FuncMap{
- // Функция "tolower" использует strings.ToLower
- // для преобразования строки в нижний регистр
- "tolower": strings.ToLower,
+ // Функция "tolower" использует strings.ToLower
+ // для преобразования строки в нижний регистр
+ "tolower": strings.ToLower,
- // Функция "firstchar" — это лямбда-функция, которая берет строку
- // и возвращает её первый символ
- "firstchar": func(s string) string {
- return s[:1]
- },
+ // Функция "firstchar" — это лямбда-функция, которая берет строку
+ // и возвращает её первый символ
+ "firstchar": func(s string) string {
+ return s[:1]
+ },
}
diff --git a/pkg/gen/pip.go b/pkg/gen/pip.go
index c9a7384..b2d644b 100644
--- a/pkg/gen/pip.go
+++ b/pkg/gen/pip.go
@@ -1,98 +1,118 @@
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package gen
import (
- _ "embed" // Пакет для встраивания содержимого файлов в бинарники Go, использовав откладку //go:embed
- "encoding/json" // Пакет для работы с JSON: декодирование и кодирование
- "errors" // Пакет для создания и обработки ошибок
- "fmt" // Пакет для форматированного ввода и вывода
- "io" // Пакет для интерфейсов ввода и вывода
- "net/http" // Пакет для HTTP-клиентов и серверов
- "text/template" // Пакет для обработки текстовых шаблонов
+ _ "embed" // Пакет для встраивания содержимого файлов в бинарники Go, использовав откладку //go:embed
+ "encoding/json" // Пакет для работы с JSON: декодирование и кодирование
+ "errors" // Пакет для создания и обработки ошибок
+ "fmt" // Пакет для форматированного ввода и вывода
+ "io" // Пакет для интерфейсов ввода и вывода
+ "net/http" // Пакет для HTTP-клиентов и серверов
+ "text/template" // Пакет для обработки текстовых шаблонов
)
// Используем директиву //go:embed для встраивания содержимого файла шаблона в строку pipTmpl
// Встраивание файла tmpls/pip.tmpl.sh
+//
//go:embed tmpls/pip.tmpl.sh
var pipTmpl string
// PipOptions содержит параметры, которые будут переданы в шаблон
type PipOptions struct {
- Name string // Имя пакета
- Version string // Версия пакета
- Description string // Описание пакета
+ Name string // Имя пакета
+ Version string // Версия пакета
+ Description string // Описание пакета
}
// pypiAPIResponse представляет структуру ответа от API PyPI
type pypiAPIResponse struct {
- Info pypiInfo `json:"info"` // Информация о пакете
- URLs []pypiURL `json:"urls"` // Список URL-адресов для загрузки пакета
+ Info pypiInfo `json:"info"` // Информация о пакете
+ URLs []pypiURL `json:"urls"` // Список URL-адресов для загрузки пакета
}
// Метод SourceURL ищет и возвращает URL исходного distribution для пакета, если он существует
func (res pypiAPIResponse) SourceURL() (pypiURL, error) {
- for _, url := range res.URLs {
- if url.PackageType == "sdist" {
- return url, nil
- }
- }
- return pypiURL{}, errors.New("package doesn't have a source distribution")
+ for _, url := range res.URLs {
+ if url.PackageType == "sdist" {
+ return url, nil
+ }
+ }
+ return pypiURL{}, errors.New("package doesn't have a source distribution")
}
// pypiInfo содержит основную информацию о пакете, такую как имя, версия и пр.
type pypiInfo struct {
- Name string `json:"name"`
- Version string `json:"version"`
- Summary string `json:"summary"`
- Homepage string `json:"home_page"`
- License string `json:"license"`
+ Name string `json:"name"`
+ Version string `json:"version"`
+ Summary string `json:"summary"`
+ Homepage string `json:"home_page"`
+ License string `json:"license"`
}
// pypiURL представляет информацию об одном из доступных для загрузки URL
type pypiURL struct {
- Digests map[string]string `json:"digests"` // Контрольные суммы для файлов
- Filename string `json:"filename"` // Имя файла
- PackageType string `json:"packagetype"` // Тип пакета (например sdist)
+ Digests map[string]string `json:"digests"` // Контрольные суммы для файлов
+ Filename string `json:"filename"` // Имя файла
+ PackageType string `json:"packagetype"` // Тип пакета (например sdist)
}
// Функция Pip загружает информацию о пакете из PyPI и использует шаблон для вывода информации
func Pip(w io.Writer, opts PipOptions) error {
- // Создаем новый шаблон с добавлением функций из FuncMap
- tmpl, err := template.New("pip").
- Funcs(funcs).
- Parse(pipTmpl)
- if err != nil {
- return err
- }
+ // Создаем новый шаблон с добавлением функций из FuncMap
+ tmpl, err := template.New("pip").
+ Funcs(funcs).
+ Parse(pipTmpl)
+ if err != nil {
+ return err
+ }
- // Формируем URL для запроса к PyPI на основании имени и версии пакета
- url := fmt.Sprintf(
- "https://pypi.org/pypi/%s/%s/json",
- opts.Name,
- opts.Version,
- )
+ // Формируем URL для запроса к PyPI на основании имени и версии пакета
+ url := fmt.Sprintf(
+ "https://pypi.org/pypi/%s/%s/json",
+ opts.Name,
+ opts.Version,
+ )
- // Выполняем HTTP GET запрос к PyPI
- res, err := http.Get(url)
- if err != nil {
- return err
- }
- defer res.Body.Close() // Закрываем тело ответа после завершения работы
- if res.StatusCode != 200 {
- return fmt.Errorf("pypi: %s", res.Status)
- }
+ // Выполняем HTTP GET запрос к PyPI
+ res, err := http.Get(url)
+ if err != nil {
+ return err
+ }
+ defer res.Body.Close() // Закрываем тело ответа после завершения работы
+ if res.StatusCode != 200 {
+ return fmt.Errorf("pypi: %s", res.Status)
+ }
- // Раскодируем ответ JSON от PyPI в структуру pypiAPIResponse
- var resp pypiAPIResponse
- err = json.NewDecoder(res.Body).Decode(&resp)
- if err != nil {
- return err
- }
+ // Раскодируем ответ JSON от PyPI в структуру pypiAPIResponse
+ var resp pypiAPIResponse
+ err = json.NewDecoder(res.Body).Decode(&resp)
+ if err != nil {
+ return err
+ }
- // Если в opts указано описание, используем его вместо описания из PyPI
- if opts.Description != "" {
- resp.Info.Summary = opts.Description
- }
+ // Если в opts указано описание, используем его вместо описания из PyPI
+ if opts.Description != "" {
+ resp.Info.Summary = opts.Description
+ }
- // Выполняем шаблон с использованием данных из resp и записываем результат в w
- return tmpl.Execute(w, resp)
+ // Выполняем шаблон с использованием данных из resp и записываем результат в w
+ return tmpl.Execute(w, resp)
}
diff --git a/pkg/gen/tmpls/pip.tmpl.sh b/pkg/gen/tmpls/pip.tmpl.sh
index 326ab73..2b8da68 100644
--- a/pkg/gen/tmpls/pip.tmpl.sh
+++ b/pkg/gen/tmpls/pip.tmpl.sh
@@ -1,3 +1,22 @@
+# This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+# It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+#
+# ALR - Any Linux Repository
+# Copyright (C) 2025 Евгений Храмов
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
name='{{.Info.Name | tolower}}'
version='{{.Info.Version}}'
release='1'
diff --git a/pkg/loggerctx/log.go b/pkg/loggerctx/log.go
index b948530..4fc8d8c 100644
--- a/pkg/loggerctx/log.go
+++ b/pkg/loggerctx/log.go
@@ -1,3 +1,22 @@
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package loggerctx
import (
diff --git a/pkg/manager/apk.go b/pkg/manager/apk.go
index 1372b6b..8d71c19 100644
--- a/pkg/manager/apk.go
+++ b/pkg/manager/apk.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package manager
diff --git a/pkg/manager/apt.go b/pkg/manager/apt.go
index 8cc4cad..6ba1026 100644
--- a/pkg/manager/apt.go
+++ b/pkg/manager/apt.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package manager
diff --git a/pkg/manager/apt_rpm.go b/pkg/manager/apt_rpm.go
index a13d292..2593e89 100644
--- a/pkg/manager/apt_rpm.go
+++ b/pkg/manager/apt_rpm.go
@@ -1,20 +1,18 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package manager
@@ -107,6 +105,7 @@ func (a *APTRpm) UpgradeAll(opts *Opts) error {
}
return nil
}
+
func (y *APTRpm) ListInstalled(opts *Opts) (map[string]string, error) {
out := map[string]string{}
cmd := exec.Command("rpm", "-qa", "--queryformat", "%{NAME}\u200b%|EPOCH?{%{EPOCH}:}:{}|%{VERSION}-%{RELEASE}\\n")
diff --git a/pkg/manager/dnf.go b/pkg/manager/dnf.go
index c97c573..a3b4dc6 100644
--- a/pkg/manager/dnf.go
+++ b/pkg/manager/dnf.go
@@ -19,154 +19,154 @@
package manager
import (
- "bufio"
- "fmt"
- "os/exec"
- "strings"
+ "bufio"
+ "fmt"
+ "os/exec"
+ "strings"
)
// DNF представляет менеджер пакетов DNF
type DNF struct {
- rootCmd string // rootCmd хранит команду, используемую для выполнения команд с правами root
+ rootCmd string // rootCmd хранит команду, используемую для выполнения команд с правами root
}
// Exists проверяет, доступен ли DNF в системе, возвращает true если да
func (*DNF) Exists() bool {
- _, err := exec.LookPath("dnf")
- return err == nil
+ _, err := exec.LookPath("dnf")
+ return err == nil
}
// Name возвращает имя менеджера пакетов, в данном случае "dnf"
func (*DNF) Name() string {
- return "dnf"
+ return "dnf"
}
// Format возвращает формат пакетов "rpm", используемый DNF
func (*DNF) Format() string {
- return "rpm"
+ return "rpm"
}
// SetRootCmd устанавливает команду, используемую для выполнения операций с правами root
func (d *DNF) SetRootCmd(s string) {
- d.rootCmd = s
+ d.rootCmd = s
}
// Sync выполняет upgrade всех установленных пакетов, обновляя их до более новых версий
func (d *DNF) Sync(opts *Opts) error {
- opts = ensureOpts(opts) // Гарантирует, что opts не равен nil и содержит допустимые значения
- cmd := d.getCmd(opts, "dnf", "upgrade")
- setCmdEnv(cmd) // Устанавливает переменные окружения для команды
- err := cmd.Run() // Выполняет команду
- if err != nil {
- return fmt.Errorf("dnf: sync: %w", err)
- }
- return nil
+ opts = ensureOpts(opts) // Гарантирует, что opts не равен nil и содержит допустимые значения
+ cmd := d.getCmd(opts, "dnf", "upgrade")
+ setCmdEnv(cmd) // Устанавливает переменные окружения для команды
+ err := cmd.Run() // Выполняет команду
+ if err != nil {
+ return fmt.Errorf("dnf: sync: %w", err)
+ }
+ return nil
}
// Install устанавливает указанные пакеты с помощью DNF
func (d *DNF) Install(opts *Opts, pkgs ...string) error {
- opts = ensureOpts(opts)
- cmd := d.getCmd(opts, "dnf", "install", "--allowerasing")
- cmd.Args = append(cmd.Args, pkgs...) // Добавляем названия пакетов к команде
- setCmdEnv(cmd)
- err := cmd.Run()
- if err != nil {
- return fmt.Errorf("dnf: install: %w", err)
- }
- return nil
+ opts = ensureOpts(opts)
+ cmd := d.getCmd(opts, "dnf", "install", "--allowerasing")
+ cmd.Args = append(cmd.Args, pkgs...) // Добавляем названия пакетов к команде
+ setCmdEnv(cmd)
+ err := cmd.Run()
+ if err != nil {
+ return fmt.Errorf("dnf: install: %w", err)
+ }
+ return nil
}
// InstallLocal расширяет метод Install для установки пакетов, расположенных локально
func (d *DNF) InstallLocal(opts *Opts, pkgs ...string) error {
- opts = ensureOpts(opts)
- return d.Install(opts, pkgs...)
+ opts = ensureOpts(opts)
+ return d.Install(opts, pkgs...)
}
// Remove удаляет указанные пакеты с помощью DNF
func (d *DNF) Remove(opts *Opts, pkgs ...string) error {
- opts = ensureOpts(opts)
- cmd := d.getCmd(opts, "dnf", "remove")
- cmd.Args = append(cmd.Args, pkgs...)
- setCmdEnv(cmd)
- err := cmd.Run()
- if err != nil {
- return fmt.Errorf("dnf: remove: %w", err)
- }
- return nil
+ opts = ensureOpts(opts)
+ cmd := d.getCmd(opts, "dnf", "remove")
+ cmd.Args = append(cmd.Args, pkgs...)
+ setCmdEnv(cmd)
+ err := cmd.Run()
+ if err != nil {
+ return fmt.Errorf("dnf: remove: %w", err)
+ }
+ return nil
}
// Upgrade обновляет указанные пакеты до более новых версий
func (d *DNF) Upgrade(opts *Opts, pkgs ...string) error {
- opts = ensureOpts(opts)
- cmd := d.getCmd(opts, "dnf", "upgrade")
- cmd.Args = append(cmd.Args, pkgs...)
- setCmdEnv(cmd)
- err := cmd.Run()
- if err != nil {
- return fmt.Errorf("dnf: upgrade: %w", err)
- }
- return nil
+ opts = ensureOpts(opts)
+ cmd := d.getCmd(opts, "dnf", "upgrade")
+ cmd.Args = append(cmd.Args, pkgs...)
+ setCmdEnv(cmd)
+ err := cmd.Run()
+ if err != nil {
+ return fmt.Errorf("dnf: upgrade: %w", err)
+ }
+ return nil
}
// UpgradeAll обновляет все установленные пакеты
func (d *DNF) UpgradeAll(opts *Opts) error {
- opts = ensureOpts(opts)
- cmd := d.getCmd(opts, "dnf", "upgrade")
- setCmdEnv(cmd)
- err := cmd.Run()
- if err != nil {
- return fmt.Errorf("dnf: upgradeall: %w", err)
- }
- return nil
+ opts = ensureOpts(opts)
+ cmd := d.getCmd(opts, "dnf", "upgrade")
+ setCmdEnv(cmd)
+ err := cmd.Run()
+ if err != nil {
+ return fmt.Errorf("dnf: upgradeall: %w", err)
+ }
+ return nil
}
// ListInstalled возвращает список установленных пакетов и их версий
func (d *DNF) ListInstalled(opts *Opts) (map[string]string, error) {
- out := map[string]string{}
- cmd := exec.Command("rpm", "-qa", "--queryformat", "%{NAME}\u200b%|EPOCH?{%{EPOCH}:}:{}|%{VERSION}-%{RELEASE}\\n")
+ out := map[string]string{}
+ cmd := exec.Command("rpm", "-qa", "--queryformat", "%{NAME}\u200b%|EPOCH?{%{EPOCH}:}:{}|%{VERSION}-%{RELEASE}\\n")
- stdout, err := cmd.StdoutPipe()
- if err != nil {
- return nil, err
- }
+ stdout, err := cmd.StdoutPipe()
+ if err != nil {
+ return nil, err
+ }
- err = cmd.Start()
- if err != nil {
- return nil, err
- }
+ err = cmd.Start()
+ if err != nil {
+ return nil, err
+ }
- scanner := bufio.NewScanner(stdout)
- for scanner.Scan() {
- name, version, ok := strings.Cut(scanner.Text(), "\u200b")
- if !ok {
- continue
- }
- version = strings.TrimPrefix(version, "0:")
- out[name] = version
- }
+ scanner := bufio.NewScanner(stdout)
+ for scanner.Scan() {
+ name, version, ok := strings.Cut(scanner.Text(), "\u200b")
+ if !ok {
+ continue
+ }
+ version = strings.TrimPrefix(version, "0:")
+ out[name] = version
+ }
- err = scanner.Err()
- if err != nil {
- return nil, err
- }
+ err = scanner.Err()
+ if err != nil {
+ return nil, err
+ }
- return out, nil
+ return out, nil
}
// getCmd создает и возвращает команду exec.Cmd для менеджера пакетов DNF
func (d *DNF) getCmd(opts *Opts, mgrCmd string, args ...string) *exec.Cmd {
- var cmd *exec.Cmd
- if opts.AsRoot {
- cmd = exec.Command(getRootCmd(d.rootCmd), mgrCmd)
- cmd.Args = append(cmd.Args, opts.Args...)
- cmd.Args = append(cmd.Args, args...)
- } else {
- cmd = exec.Command(mgrCmd, args...)
- }
+ var cmd *exec.Cmd
+ if opts.AsRoot {
+ cmd = exec.Command(getRootCmd(d.rootCmd), mgrCmd)
+ cmd.Args = append(cmd.Args, opts.Args...)
+ cmd.Args = append(cmd.Args, args...)
+ } else {
+ cmd = exec.Command(mgrCmd, args...)
+ }
- if opts.NoConfirm {
- cmd.Args = append(cmd.Args, "-y") // Добавляет параметр автоматического подтверждения (-y)
- }
+ if opts.NoConfirm {
+ cmd.Args = append(cmd.Args, "-y") // Добавляет параметр автоматического подтверждения (-y)
+ }
- return cmd
+ return cmd
}
diff --git a/pkg/manager/managers.go b/pkg/manager/managers.go
index eccc8e6..3467d72 100644
--- a/pkg/manager/managers.go
+++ b/pkg/manager/managers.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package manager
diff --git a/pkg/manager/pacman.go b/pkg/manager/pacman.go
index 2c8250c..3e3422b 100644
--- a/pkg/manager/pacman.go
+++ b/pkg/manager/pacman.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package manager
diff --git a/pkg/manager/yum.go b/pkg/manager/yum.go
index 7c77c41..c9938ed 100644
--- a/pkg/manager/yum.go
+++ b/pkg/manager/yum.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package manager
diff --git a/pkg/manager/zypper.go b/pkg/manager/zypper.go
index c99cd3b..5a7cd5c 100644
--- a/pkg/manager/zypper.go
+++ b/pkg/manager/zypper.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package manager
diff --git a/pkg/repos/find.go b/pkg/repos/find.go
index 20394de..3a2021a 100644
--- a/pkg/repos/find.go
+++ b/pkg/repos/find.go
@@ -1,20 +1,22 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package repos
import (
diff --git a/pkg/repos/find_test.go b/pkg/repos/find_test.go
index 790dff3..5ff724a 100644
--- a/pkg/repos/find_test.go
+++ b/pkg/repos/find_test.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package repos_test
diff --git a/pkg/repos/pull.go b/pkg/repos/pull.go
index f151121..c8202ef 100644
--- a/pkg/repos/pull.go
+++ b/pkg/repos/pull.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package repos
@@ -35,6 +36,7 @@ import (
"mvdan.cc/sh/v3/expand"
"mvdan.cc/sh/v3/interp"
"mvdan.cc/sh/v3/syntax"
+
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/internal/db"
"plemya-x.ru/alr/internal/shutils/handlers"
diff --git a/pkg/repos/pull_test.go b/pkg/repos/pull_test.go
index 44075e3..fb89f8c 100644
--- a/pkg/repos/pull_test.go
+++ b/pkg/repos/pull_test.go
@@ -1,20 +1,21 @@
-/*
- * alr - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package repos_test
diff --git a/pkg/repos/repos.go b/pkg/repos/repos.go
index 5dd420b..dcdb00b 100644
--- a/pkg/repos/repos.go
+++ b/pkg/repos/repos.go
@@ -1,3 +1,19 @@
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package repos
import (
diff --git a/pkg/repos/repos_legacy.go b/pkg/repos/repos_legacy.go
index 892e272..0df9057 100644
--- a/pkg/repos/repos_legacy.go
+++ b/pkg/repos/repos_legacy.go
@@ -1,3 +1,19 @@
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package repos
import (
diff --git a/pkg/repos/utils.go b/pkg/repos/utils.go
index b4a6d3d..6b3bde7 100644
--- a/pkg/repos/utils.go
+++ b/pkg/repos/utils.go
@@ -1,3 +1,19 @@
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package repos
import (
@@ -10,6 +26,7 @@ import (
"github.com/go-git/go-git/v5/plumbing/format/diff"
"mvdan.cc/sh/v3/interp"
"mvdan.cc/sh/v3/syntax"
+
"plemya-x.ru/alr/internal/db"
"plemya-x.ru/alr/internal/shutils/decoder"
"plemya-x.ru/alr/pkg/distro"
diff --git a/pkg/search/search.go b/pkg/search/search.go
index a81eda9..74a8630 100644
--- a/pkg/search/search.go
+++ b/pkg/search/search.go
@@ -1,3 +1,22 @@
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
package search
import (
diff --git a/repo.go b/repo.go
index 9423e20..f3ad9d8 100644
--- a/repo.go
+++ b/repo.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package main
@@ -24,12 +25,13 @@ import (
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
+ "golang.org/x/exp/slices"
+
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/internal/db"
"plemya-x.ru/alr/internal/types"
"plemya-x.ru/alr/pkg/loggerctx"
"plemya-x.ru/alr/pkg/repos"
- "golang.org/x/exp/slices"
)
var addrepoCmd = &cli.Command{
diff --git a/scripts/install.sh b/scripts/install.sh
index 8b97e66..59b87ca 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -1,3 +1,22 @@
+# This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+# It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+#
+# ALR - Any Linux Repository
+# Copyright (C) 2025 Евгений Храмов
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
info() {
echo $'\x1b[32m[ИНФО]\x1b[0m' $@
}
diff --git a/upgrade.go b/upgrade.go
index fb0ea97..25f4f89 100644
--- a/upgrade.go
+++ b/upgrade.go
@@ -1,20 +1,21 @@
-/*
- * ALR - Any Linux Repository
- * Copyright (C) 2024 Евгений Храмов
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+// This file was originally part of the project "LURE - Linux User REpository", created by Elara Musayelyan.
+// It has been modified as part of "ALR - Any Linux Repository" by Евгений Храмов.
+//
+// ALR - Any Linux Repository
+// Copyright (C) 2025 Евгений Храмов
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
package main
@@ -23,6 +24,10 @@ import (
"fmt"
"github.com/urfave/cli/v2"
+ "go.elara.ws/vercmp"
+ "golang.org/x/exp/maps"
+ "golang.org/x/exp/slices"
+
"plemya-x.ru/alr/internal/config"
"plemya-x.ru/alr/internal/db"
"plemya-x.ru/alr/internal/types"
@@ -31,9 +36,6 @@ import (
"plemya-x.ru/alr/pkg/loggerctx"
"plemya-x.ru/alr/pkg/manager"
"plemya-x.ru/alr/pkg/repos"
- "go.elara.ws/vercmp"
- "golang.org/x/exp/maps"
- "golang.org/x/exp/slices"
)
var upgradeCmd = &cli.Command{