forked from Plemya-x/ALR
		
	chore: run make update-license fmt
				
					
				
			This commit is contained in:
		@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * Вы должны были получить копию GNU General Public License
 | 
			
		||||
 * вместе с этой программой. Если нет, см. <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
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"
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
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"
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * вместе с этой программой. Если нет, посмотрите <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
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()
 | 
			
		||||
            // Логируем и завершаем выполнение при ошибке установки
 | 
			
		||||
			// Логируем и завершаем выполнение при ошибке установки
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
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]
 | 
			
		||||
	},
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										140
									
								
								pkg/gen/pip.go
									
									
									
									
									
								
							
							
						
						
									
										140
									
								
								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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
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)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
name='{{.Info.Name | tolower}}'
 | 
			
		||||
version='{{.Info.Version}}'
 | 
			
		||||
release='1'
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
package loggerctx
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
package manager
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
package manager
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
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")
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
package manager
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
package manager
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
package manager
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
package manager
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
package repos
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
package repos_test
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
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"
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
// 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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
package repos_test
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
package repos
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
package repos
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
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"
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
package search
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user