Repo Control file improvements
Control files at minimum now list Package: Version: Depends: Architecture: Maintainer: MD5Sum: Size: Filename: Source: Description: This will help improve workflow when rebuilding opkg-feed.... - Enhanced opkg-feed rebuild with a new test version of the script. - Set the luci app default to send at commands to smd7 to avoid issues with smd11 being occupied
This commit is contained in:
@@ -10,5 +10,4 @@ SourceDateEpoch: 1691250335
|
|||||||
Maintainer: Adrian Guenter <a@gntr.me>
|
Maintainer: Adrian Guenter <a@gntr.me>
|
||||||
Architecture: aarch64_cortex-a53
|
Architecture: aarch64_cortex-a53
|
||||||
Installed-Size: 3571
|
Installed-Size: 3571
|
||||||
Description: Atinout is a program that will execute AT commands in sequence and
|
Description: Atinout is a program that will execute AT commands in sequence and capture the response from the modem.
|
||||||
capture the response from the modem.
|
|
||||||
|
|||||||
1
ipk-source/luci-app-atinout-mod/CONTROL/conffiles
Normal file
1
ipk-source/luci-app-atinout-mod/CONTROL/conffiles
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/etc/config/atcommands.user
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
Package: luci-app-atinout-mod
|
Package: luci-app-atinout-mod
|
||||||
Version: 1.3.4-20241006
|
Version: 1.3.4-20250119
|
||||||
Depends: libc, atinout, luci-compat
|
Depends: libc, atinout, luci-compat
|
||||||
Source: package/luci-app-atinout-mod
|
Source: package/luci-app-atinout-mod
|
||||||
SourceName: luci-app-atinout-mod
|
SourceName: luci-app-atinout-mod
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
config atinout 'general'
|
config atinout 'general'
|
||||||
option atcport '/dev/smd11'
|
option atcport '/dev/smd7'
|
||||||
|
|
||||||
|
|||||||
@@ -2,5 +2,6 @@ Package: ookla-speedtest
|
|||||||
Version: 1.2.0
|
Version: 1.2.0
|
||||||
Architecture: aarch64_cortex-a53
|
Architecture: aarch64_cortex-a53
|
||||||
Maintainer: Ookla speedtest.net https://www.speedtest.net/apps/cli
|
Maintainer: Ookla speedtest.net https://www.speedtest.net/apps/cli
|
||||||
|
Source: speedtest.net
|
||||||
Description: Allows you to test your internet speed with speedtest.net
|
Description: Allows you to test your internet speed with speedtest.net
|
||||||
Depends: libc
|
Depends: libc
|
||||||
|
|||||||
@@ -2,5 +2,6 @@ Package: sdxpinn-console-menu
|
|||||||
Version: 0.0.2
|
Version: 0.0.2
|
||||||
Architecture: aarch64_cortex-a53
|
Architecture: aarch64_cortex-a53
|
||||||
Maintainer: Cameron Thompson iamromulan@github.com
|
Maintainer: Cameron Thompson iamromulan@github.com
|
||||||
|
Source: github.com/iamromulan
|
||||||
Description: A custom CLI menu system for mamnagment of Quectel RM5xx modems
|
Description: A custom CLI menu system for mamnagment of Quectel RM5xx modems
|
||||||
Depends: libc sdxpinn-mount-fix
|
Depends: libc, sdxpinn-mount-fix
|
||||||
|
|||||||
@@ -2,5 +2,6 @@ Package: sdxpinn-mount-fix
|
|||||||
Version: 1.2.0
|
Version: 1.2.0
|
||||||
Architecture: aarch64_cortex-a53
|
Architecture: aarch64_cortex-a53
|
||||||
Maintainer: Cameron Thompson iamromulan@github.com
|
Maintainer: Cameron Thompson iamromulan@github.com
|
||||||
|
Source: github.com/iamromulan
|
||||||
Description: Creates a usable mount space and overlay for SDXPINN modems. Dependencies bundled: libinotifytools and inotifywait
|
Description: Creates a usable mount space and overlay for SDXPINN modems. Dependencies bundled: libinotifytools and inotifywait
|
||||||
Depends: libc
|
Depends: libc
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ Package: sdxpinn-quecmanager-beta
|
|||||||
Version: 1.1.1-1
|
Version: 1.1.1-1
|
||||||
Architecture: aarch64_cortex-a53
|
Architecture: aarch64_cortex-a53
|
||||||
Maintainer: Russel Yasol dr-dolomite@github.com Cameron Thompson iamromulan@github.com
|
Maintainer: Russel Yasol dr-dolomite@github.com Cameron Thompson iamromulan@github.com
|
||||||
|
Source: github.com/iamromulan
|
||||||
Description: A custom web UI desgined to run alongside luci for Quectel RM55x modems
|
Description: A custom web UI desgined to run alongside luci for Quectel RM55x modems
|
||||||
Depends: sdxpinn-mount-fix, libc, coreutils-timeout, uhttpd, sms-tool (>= 2025.1.19-APmod-iamromulan), jq, ookla-speedtest
|
Depends: sdxpinn-mount-fix, libc, coreutils-timeout, uhttpd, sms-tool (>= 2025.1.19-APmod-iamromulan), jq, ookla-speedtest
|
||||||
Conflicts: sdxpinn-quecmanager
|
Conflicts: sdxpinn-quecmanager
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ Package: sdxpinn-quecmanager
|
|||||||
Version: 1.0.1
|
Version: 1.0.1
|
||||||
Architecture: aarch64_cortex-a53
|
Architecture: aarch64_cortex-a53
|
||||||
Maintainer: Russel Yasol dr-dolomite@github.com Cameron Thompson iamromulan@github.com
|
Maintainer: Russel Yasol dr-dolomite@github.com Cameron Thompson iamromulan@github.com
|
||||||
|
Source: github.com/iamromulan
|
||||||
Description: A custom web UI desgined to run alongside luci for Quectel RM55x modems
|
Description: A custom web UI desgined to run alongside luci for Quectel RM55x modems
|
||||||
Depends: libc sdxpinn-mount-fix atinout
|
Depends: libc, sdxpinn-mount-fix, atinout
|
||||||
Conflicts: sdxpinn-quecmanager-beta
|
Conflicts: sdxpinn-quecmanager-beta
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
Package: sms-tool
|
Package: sms-tool
|
||||||
Version: 2025.1.19-APmod-iamromulan
|
Version: 2025.1.19-APmod-iamromulan
|
||||||
|
Maintainer: github.com/iamromulan
|
||||||
Depends: libc, socat-at-bridge
|
Depends: libc, socat-at-bridge
|
||||||
Source: github/iamromulan/sms_tool
|
Source: github/iamromulan/sms_tool
|
||||||
SourceName: github/iamromulan/sms_tool
|
SourceName: github/iamromulan/sms_tool
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ Package: socat-at-bridge
|
|||||||
Version: 1.1.1
|
Version: 1.1.1
|
||||||
Depends: libc, socat
|
Depends: libc, socat
|
||||||
Source: github/iamromulan/quectel-rgmii-toolkit
|
Source: github/iamromulan/quectel-rgmii-toolkit
|
||||||
|
Maintainer: github.com/iamromulan
|
||||||
Section: utils
|
Section: utils
|
||||||
URL: https://github.com/iamromulan/quectel-rgmii-toolkit
|
URL: https://github.com/iamromulan/quectel-rgmii-toolkit
|
||||||
Architecture: aarch64_cortex-a53
|
Architecture: aarch64_cortex-a53
|
||||||
|
|||||||
@@ -8,6 +8,4 @@ LicenseFiles: LICENSE
|
|||||||
Section: net
|
Section: net
|
||||||
Maintainer: Jan Pavlinec <jan.pavlinec1@gmail.com>
|
Maintainer: Jan Pavlinec <jan.pavlinec1@gmail.com>
|
||||||
Architecture: aarch64_cortex-a53
|
Architecture: aarch64_cortex-a53
|
||||||
Description: It creates a secure network between your servers, computers,
|
Description: It creates a secure network between your servers, computers, and cloud instances. Even when separated by firewalls or subnets. Updated by iamromulan to 1.76.1
|
||||||
and cloud instances. Even when separated by firewalls or subnets. Updated
|
|
||||||
by iamromulan to 1.76.1
|
|
||||||
|
|||||||
@@ -8,6 +8,4 @@ LicenseFiles: LICENSE
|
|||||||
Section: net
|
Section: net
|
||||||
Maintainer: Jan Pavlinec <jan.pavlinec1@gmail.com>
|
Maintainer: Jan Pavlinec <jan.pavlinec1@gmail.com>
|
||||||
Architecture: aarch64_cortex-a53
|
Architecture: aarch64_cortex-a53
|
||||||
Description: It creates a secure network between your servers, computers,
|
Description: It creates a secure network between your servers, computers,and cloud instances. Even when separated by firewalls or subnets. Updated by iamromulan to 1.76.1
|
||||||
and cloud instances. Even when separated by firewalls or subnets. Updated
|
|
||||||
by iamromulan to 1.76.1
|
|
||||||
|
|||||||
129
opkg-feed/rebuild-feed_test.sh
Executable file
129
opkg-feed/rebuild-feed_test.sh
Executable file
@@ -0,0 +1,129 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Check if the script is run as root. If not, rerun with sudo.
|
||||||
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
|
echo "Script is not running as root. Re-executing with sudo..."
|
||||||
|
exec sudo "$0" "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Define Constants
|
||||||
|
IPK_SOURCE_DIR=../ipk-source
|
||||||
|
PACKAGES=./Packages
|
||||||
|
PACKAGESGZ=./Packages.gz
|
||||||
|
PACKAGESSIG=./Packages.sig
|
||||||
|
PUBLICKEY=./iamromulan-SDXPINN-repo.key
|
||||||
|
PRIVKEY=/home/iamromulan/Documents/GitHub/priv/iamromulan-SDXPINN-repo-private.key
|
||||||
|
USIGN=./usign_x64
|
||||||
|
LOGFILE=./Packages.log
|
||||||
|
|
||||||
|
# Start logging
|
||||||
|
echo "Starting package analysis - $(date)" > "$LOGFILE"
|
||||||
|
|
||||||
|
# Function to calculate MD5 and file size for a given .ipk file
|
||||||
|
calculate_md5_and_size() {
|
||||||
|
local file=$1
|
||||||
|
md5sum=$(md5sum "$file" | awk '{print $1}')
|
||||||
|
filesize=$(stat -c%s "$file")
|
||||||
|
echo "$md5sum $filesize"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to parse control file
|
||||||
|
parse_control_file() {
|
||||||
|
local control_file=$1
|
||||||
|
local fields=(Package Version Depends Architecture Maintainer Source Description Section Conflicts License)
|
||||||
|
declare -A control_data
|
||||||
|
|
||||||
|
while IFS=':' read -r key value; do
|
||||||
|
key=$(echo "$key" | xargs)
|
||||||
|
value=$(echo "$value" | xargs)
|
||||||
|
if [[ " ${fields[*]} " == *" $key "* ]]; then
|
||||||
|
control_data["$key"]="$value"
|
||||||
|
fi
|
||||||
|
done < "$control_file"
|
||||||
|
|
||||||
|
echo "${control_data[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Scan ipk-source directory and process packages
|
||||||
|
for pkg_dir in "$IPK_SOURCE_DIR"/*; do
|
||||||
|
pkg_name=$(basename "$pkg_dir")
|
||||||
|
if [[ "$pkg_name" =~ _ ]]; then
|
||||||
|
pkg_arch=$(echo "$pkg_name" | awk -F'_' '{print $2}')
|
||||||
|
pkg_name=$(echo "$pkg_name" | awk -F'_' '{print $1}')
|
||||||
|
else
|
||||||
|
pkg_arch="all"
|
||||||
|
fi
|
||||||
|
|
||||||
|
control_file="$pkg_dir/CONTROL/control"
|
||||||
|
ipk_file="${pkg_name}_${pkg_arch}.ipk"
|
||||||
|
|
||||||
|
# Skip if control file or ipk is missing
|
||||||
|
if [[ ! -f "$control_file" ]] || [[ ! -f "$ipk_file" ]]; then
|
||||||
|
echo "Skipping $pkg_name (missing control file or .ipk file)" | tee -a "$LOGFILE"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Parse control file
|
||||||
|
read -r -a control_data <<< "$(parse_control_file "$control_file")"
|
||||||
|
|
||||||
|
# Calculate MD5 and size
|
||||||
|
read current_md5 current_size < <(calculate_md5_and_size "$ipk_file")
|
||||||
|
|
||||||
|
# Check if package exists in Packages file
|
||||||
|
pkg_start_line=$(grep -n "^Package: ${control_data[Package]}$" "$PACKAGES" | cut -d ':' -f 1)
|
||||||
|
|
||||||
|
if [ -z "$pkg_start_line" ]; then
|
||||||
|
echo "Adding new package ${control_data[Package]}..." | tee -a "$LOGFILE"
|
||||||
|
|
||||||
|
# Append new entry to Packages file
|
||||||
|
{
|
||||||
|
for key in "${!control_data[@]}"; do
|
||||||
|
echo "$key: ${control_data[$key]}"
|
||||||
|
done
|
||||||
|
echo "MD5Sum: $current_md5"
|
||||||
|
echo "Size: $current_size"
|
||||||
|
echo "Filename: $ipk_file"
|
||||||
|
echo ""
|
||||||
|
} >> "$PACKAGES"
|
||||||
|
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update existing package entry if needed
|
||||||
|
pkg_end_line=$(sed -n "$pkg_start_line,\$p" "$PACKAGES" | grep -n -m 1 -A 1 '^$' | tail -1 | cut -d '-' -f 1)
|
||||||
|
pkg_end_line=$((pkg_start_line + pkg_end_line - 1))
|
||||||
|
|
||||||
|
for key in "${!control_data[@]}"; do
|
||||||
|
existing_value=$(sed -n "${pkg_start_line},${pkg_end_line}p" "$PACKAGES" | grep "^$key:" | awk -F': ' '{print $2}')
|
||||||
|
if [[ "${control_data[$key]}" != "$existing_value" ]]; then
|
||||||
|
echo "Updating $key for ${control_data[Package]}..." | tee -a "$LOGFILE"
|
||||||
|
sed -i "${pkg_start_line},${pkg_end_line}s/^$key: .*/$key: ${control_data[$key]}/" "$PACKAGES"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Update MD5 and size if different
|
||||||
|
existing_md5=$(sed -n "${pkg_start_line},${pkg_end_line}p" "$PACKAGES" | grep "^MD5Sum:" | awk '{print $2}')
|
||||||
|
existing_size=$(sed -n "${pkg_start_line},${pkg_end_line}p" "$PACKAGES" | grep "^Size:" | awk '{print $2}')
|
||||||
|
|
||||||
|
if [[ "$current_md5" != "$existing_md5" ]] || [[ "$current_size" != "$existing_size" ]]; then
|
||||||
|
echo "Updating MD5 and size for ${control_data[Package]}..." | tee -a "$LOGFILE"
|
||||||
|
sed -i "${pkg_start_line},${pkg_end_line}s/^MD5Sum: .*/MD5Sum: $current_md5/" "$PACKAGES"
|
||||||
|
sed -i "${pkg_start_line},${pkg_end_line}s/^Size: .*/Size: $current_size/" "$PACKAGES"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Remove packages not in ipk-source
|
||||||
|
grep "^Package: " "$PACKAGES" | awk '{print $2}' | while read -r pkg_name; do
|
||||||
|
if [[ ! -d "$IPK_SOURCE_DIR/$pkg_name" ]]; then
|
||||||
|
echo "Removing orphaned package $pkg_name from Packages file..." | tee -a "$LOGFILE"
|
||||||
|
sed -i "/^Package: $pkg_name$/,/^$/d" "$PACKAGES"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Regenerate Packages.gz and sign with usign
|
||||||
|
gzip -k "$PACKAGES"
|
||||||
|
"$USIGN" -S -m "$PACKAGES" -s "$PRIVKEY"
|
||||||
|
|
||||||
|
echo "Package file and signature updated successfully." | tee -a "$LOGFILE"
|
||||||
|
echo "Package analysis completed - $(date)" | tee -a "$LOGFILE"
|
||||||
|
|
||||||
Reference in New Issue
Block a user