1 Commits

Author SHA1 Message Date
a0e7e86408 - Move lib dir into top dir & remove usr,
- Add www/cgi-bin dir,
- Add urpmi-setup-dump.cgi and package it as example,
- URPMI-Setup:
    - Fix usage message.
2026-04-19 12:13:04 +02:00
3 changed files with 20 additions and 86 deletions

View File

@@ -1,9 +1,7 @@
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
Rx3-Base V 1.1.2 - A. GIBERT - 2026/05/03 Rx3-Base V 1.1.2 - A. GIBERT - 2026/04/19
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
- Base library: Add optionnal "FORCE" flag to cmd_exec & sh_exec functions to overstep Test mode,
- Split between rx3-base, rx3-base-config, rx3-base-libs and rx3-base-tools RPM packages,
- Move lib dir into top dir & remove usr, - Move lib dir into top dir & remove usr,
- Add www/cgi-bin dir, - Add www/cgi-bin dir,
- Add urpmi-setup-dump.cgi and package it as example, - Add urpmi-setup-dump.cgi and package it as example,

View File

@@ -36,12 +36,11 @@
# Package # Package
#----------------------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------------------
Summary: Rx3 Base Package
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
Summary: Rx3 Base Meta Package
License: GPL 3.0 License: GPL 3.0
URL: https://git.rx3.org/gitea/rx3/%{name} URL: https://git.rx3.org/gitea/rx3/%{name}
Group: System Group: System
@@ -52,10 +51,6 @@ Packager: Arnaud G. GIBERT <arnaud@rx3.net>
BuildArch: noarch BuildArch: noarch
Requires: %{name}-config
Requires: %{name}-libs
Requires: %{name}-tools
Source0: https://git.rx3.org/gitea/rx3/%{name}/archive/%{name}-%{version}.tar.gz Source0: https://git.rx3.org/gitea/rx3/%{name}/archive/%{name}-%{version}.tar.gz
@@ -64,34 +59,7 @@ Source0: https://git.rx3.org/gitea/rx3/%{name}/ar
This is the base component of an Rx3 system: This is the base component of an Rx3 system:
- Default config files, - Default config files,
- Base bash libraries, - Base bash libraries,
- Base tools. - Default tools.
This meta packe will install all the depencies.
%package config
Summary: Rx3 Base Config
%description config
This is a base component of an Rx3 system: Default config files.
%package libs
Summary: Rx3 Base Libraires
%description libs
This is a base component of an Rx3 system: Base bash libraries.
%package tools
Summary: Rx3 Base Tools
Requires: %{name}-libs
%description tools
This is a base component of an Rx3 system: Base tools.
@@ -145,24 +113,13 @@ cp sbin/* %{buildroot}%{_sbindir}
# Files # Files
#----------------------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------------------
%files config %files
%doc ReadMe.txt ReleaseNotes.txt ToDo.txt
%license COPYING COPYING.LESSER GNU_GPL-3.0.txt GNU_LGPL-3.0.txt GNU_FDL-1.3.txt
%defattr(644,root,root)
%{_sysconfdir}/profile.d/*
%files libs
%doc ReadMe.txt ReleaseNotes.txt ToDo.txt
%license COPYING COPYING.LESSER GNU_GPL-3.0.txt GNU_LGPL-3.0.txt GNU_FDL-1.3.txt
%defattr(644,root,root)
%{_prefix}/lib/rx3/*
%files tools
%doc ReadMe.txt ReleaseNotes.txt ToDo.txt www/cgi-bin/urpmi-setup-dump.cgi %doc ReadMe.txt ReleaseNotes.txt ToDo.txt www/cgi-bin/urpmi-setup-dump.cgi
%license COPYING COPYING.LESSER GNU_GPL-3.0.txt GNU_LGPL-3.0.txt GNU_FDL-1.3.txt %license COPYING COPYING.LESSER GNU_GPL-3.0.txt GNU_LGPL-3.0.txt GNU_FDL-1.3.txt
%defattr(644,root,root) %defattr(644,root,root)
%{_sysconfdir}/profile.d/*
%{_sysconfdir}/bash_completion.d/* %{_sysconfdir}/bash_completion.d/*
%{_prefix}/lib/rx3/*
%attr(0755,root,root) %{_sbindir}/* %attr(0755,root,root) %{_sbindir}/*
@@ -174,9 +131,8 @@ cp sbin/* %{buildroot}%{_sbindir}
#----------------------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------------------
%changelog %changelog
* Sun May 3 2026 Arnaud G. GIBERT <arnaud@rx3.net> - 1.1.2-1rx3.mga9 * Thu Apr 16 2026 Arnaud G. GIBERT <arnaud@rx3.net> - 1.1.2-1rx3.mga9
- Update to 1.1.2 - Update ro 1.1.2,
- Split between rx3-base, rx3-base-config, rx3-base-libs and rx3-base-tools packages
- Move lib source dir - Move lib source dir
- Add cgi-bin example as doc - Add cgi-bin example as doc

View File

@@ -125,8 +125,8 @@ str_escape()
echo_line() echo_line()
{ {
local string="${1}" local string="$1"
local count="${2:-""}" local count="$2"
echo -en "\e[2K\r" echo -en "\e[2K\r"
@@ -161,16 +161,6 @@ echo_error()
cmd_exec() cmd_exec()
{ {
local force="FALSE"
if [[ "$1" == "FORCE" ]]
then
force="TRUE"
shift
fi
if [[ "${VERBOSE}" == "TRUE" ]] if [[ "${VERBOSE}" == "TRUE" ]]
then then
local caller="${FUNCNAME[1]:-MAIN}" local caller="${FUNCNAME[1]:-MAIN}"
@@ -181,12 +171,12 @@ cmd_exec()
echo >&2 echo >&2
fi fi
if [[ ( "${force}" != "TRUE" ) && ( "${DUMP}" == "TRUE" ) ]] if [[ ${DUMP} == "TRUE" ]]
then then
printf '%q ' "$@" printf '%q ' "$@"
echo echo
else else
if [[ ( "${force}" == "TRUE" ) || ( "${DRY_RUN}" != "TRUE" ) ]] if [[ "${DRY_RUN}" != "TRUE" ]]
then then
"$@" "$@"
fi fi
@@ -203,19 +193,9 @@ cmd_exec()
sh_exec() sh_exec()
{ {
local force="FALSE"
if [[ "$1" == "FORCE" ]]
then
force="TRUE"
shift
fi
if [[ "$#" -ne 1 ]] || [[ -z "$1" ]] if [[ "$#" -ne 1 ]] || [[ -z "$1" ]]
then then
echo_error "sh_exec expects exactly 1 non empty argument after FORCE optional flag" echo_error "sh_exec expects exactly 1 non empty argument"
return 1 return 1
fi fi
@@ -228,11 +208,11 @@ sh_exec()
printf 'bash -c %q\n' "${NAME}" "${caller}" "$1" >&2 printf 'bash -c %q\n' "${NAME}" "${caller}" "$1" >&2
fi fi
if [[ ( "${force}" != "TRUE" ) && ( "${DUMP}" == "TRUE" ) ]] if [[ ${DUMP} == "TRUE" ]]
then then
printf 'bash -c %q\n' "${NAME}" "${caller}" "$1" printf 'bash -c %q\n' "${NAME}" "${caller}" "$1"
else else
if [[ ( "${force}" == "TRUE" ) || ( "${DRY_RUN}" != "TRUE" ) ]] if [[ "${DRY_RUN}" != "TRUE" ]]
then then
bash -o errexit -o pipefail -o nounset -O extglob -c -- "$1" bash bash -o errexit -o pipefail -o nounset -O extglob -c -- "$1" bash
fi fi
@@ -250,10 +230,10 @@ sh_exec()
tab_assign() tab_assign()
{ {
declare -n ta_tab=$1 declare -n ta_tab=$1
local ta_key=$2 ta_key=$2
local ta_value=$3 ta_value=$3
if [[ "${ta_value}" == "-" ]] if [[ "${ta_value}" == "-" ]]
then then
ta_value="" ta_value=""
@@ -273,8 +253,8 @@ tab_assign()
var_assign() var_assign()
{ {
declare -n va_var=$1 declare -n va_var=$1
local va_value=$2 va_value=$2
local va_mode=$3 va_mode=$3
if [[ "${va_value}" == "-" ]] if [[ "${va_value}" == "-" ]]