Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/hgy59/spksrc into remove_…
Browse files Browse the repository at this point in the history
…native_nasm
  • Loading branch information
hgy59 committed Dec 17, 2024
2 parents 52b31b8 + 56efd95 commit db7c4ba
Show file tree
Hide file tree
Showing 424 changed files with 305,840 additions and 1,901 deletions.
214 changes: 116 additions & 98 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,59 +10,51 @@ on:
publish:
description: 'Publish to repository'
required: false
default: 'false'
default: false
type: boolean
# Add a separator as a non-input description
build_settings_description:
description: 'Build Settings (archs to include):'
required: false
default: ''
type: choice
options:
- 'true'
- 'false'
- '---'
add_noarch_builds:
description: 'Include noarch packages'
required: false
default: 'true'
type: choice
options:
- 'true'
- 'false'
default: true
type: boolean
add_noarch_dsm72_builds:
description: 'Include noarch DSM 7.2 packages'
required: false
default: false
type: boolean
add_dsm72_builds:
description: 'Include DSM 7.2 archs'
required: false
default: 'false'
type: choice
options:
- 'true'
- 'false'
default: false
type: boolean
add_dsm71_builds:
description: 'Include DSM 7.1 archs'
required: false
default: 'true'
type: choice
options:
- 'true'
- 'false'
default: true
type: boolean
add_dsm62_builds:
description: 'Include DSM 6.2 archs'
required: false
default: 'true'
type: choice
options:
- 'true'
- 'false'
default: true
type: boolean
add_dsm52_builds:
description: 'Include DSM 5.2 archs'
required: false
default: 'false'
type: choice
options:
- 'true'
- 'false'
default: false
type: boolean
add_srm12_builds:
description: 'Include SRM 1.2 archs'
required: false
default: 'false'
type: choice
options:
- 'true'
- 'false'
default: false
type: boolean
pull_request:
paths:
- 'spk/**'
Expand All @@ -84,12 +76,7 @@ jobs:
outputs:
arch_packages: ${{ steps.dependencies.outputs.arch_packages }}
noarch_packages: ${{ steps.dependencies.outputs.noarch_packages }}
add_noarch_builds: ${{ steps.set-defaults.outputs.add_noarch_builds }}
add_dsm72_builds: ${{ steps.set-defaults.outputs.add_dsm72_builds }}
add_dsm71_builds: ${{ steps.set-defaults.outputs.add_dsm71_builds }}
add_dsm62_builds: ${{ steps.set-defaults.outputs.add_dsm62_builds }}
add_dsm52_builds: ${{ steps.set-defaults.outputs.add_dsm52_builds }}
add_srm12_builds: ${{ steps.set-defaults.outputs.add_srm12_builds }}
has_min_dsm72_packages: ${{ steps.dependencies.outputs.has_min_dsm72_packages }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -118,17 +105,6 @@ jobs:
GH_FILES: ${{ steps.getfile.outputs.files }} ${{ steps.getfile_pr.outputs.files }}
SPK_TO_BUILD: ${{ github.event.inputs.package }}

# Set default values for all builds (manual or automated)
- name: Set default values for generate matrix
id: set-defaults
run: |
echo "add_noarch_builds=${{ github.event.inputs.add_noarch_builds || steps.dependencies.outputs.has_noarch_packages }}" >> $GITHUB_OUTPUT
echo "add_dsm72_builds=${{ github.event.inputs.add_dsm72_builds || steps.dependencies.outputs.has_min_dsm72_packages }}" >> $GITHUB_OUTPUT
echo "add_dsm71_builds=${{ github.event.inputs.add_dsm71_builds || steps.dependencies.outputs.has_arch_packages }}" >> $GITHUB_OUTPUT
echo "add_dsm62_builds=${{ github.event.inputs.add_dsm62_builds || steps.dependencies.outputs.has_arch_packages }}" >> $GITHUB_OUTPUT
echo "add_dsm52_builds=${{ github.event.inputs.add_dsm52_builds || 'false' }}" >> $GITHUB_OUTPUT
echo "add_srm12_builds=${{ github.event.inputs.add_srm12_builds || 'false' }}" >> $GITHUB_OUTPUT
- name: Cache downloaded files
uses: actions/cache@v4
with:
Expand All @@ -143,73 +119,115 @@ jobs:
ARCH_PACKAGES: ${{ needs.prepare.outputs.arch_packages }}
NOARCH_PACKAGES: ${{ needs.prepare.outputs.noarch_packages }}

generate_matrix:
name: Generate Matrix
needs: prepare
set-defaults:
name: Set Defaults
runs-on: ubuntu-latest
needs: prepare
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
matrix: ${{ steps.defaults.outputs.matrix }}
steps:
- id: set-matrix
- id: defaults
run: |
# Use the default values passed from the prepare step
add_noarch_builds=${{ needs.prepare.outputs.add_noarch_builds }}
add_dsm72_builds=${{ needs.prepare.outputs.add_dsm72_builds }}
add_dsm71_builds=${{ needs.prepare.outputs.add_dsm71_builds }}
add_dsm62_builds=${{ needs.prepare.outputs.add_dsm62_builds }}
add_dsm52_builds=${{ needs.prepare.outputs.add_dsm52_builds }}
add_srm12_builds=${{ needs.prepare.outputs.add_srm12_builds }}
# Retrieve inputs and package availability
add_noarch_builds=${{ github.event.inputs.add_noarch_builds || 'false' }}
add_noarch_dsm72_builds=${{ github.event.inputs.add_noarch_dsm72_builds || 'false' }}
add_dsm72_builds=${{ github.event.inputs.add_dsm72_builds || 'false' }}
add_dsm71_builds=${{ github.event.inputs.add_dsm71_builds || 'false' }}
add_dsm62_builds=${{ github.event.inputs.add_dsm62_builds || 'false' }}
add_dsm52_builds=${{ github.event.inputs.add_dsm52_builds || 'false' }}
add_srm12_builds=${{ github.event.inputs.add_srm12_builds || 'false' }}
has_noarch_packages=$([ -n "${{ needs.prepare.outputs.noarch_packages }}" ] && echo "true" || echo "false")
has_arch_packages=$([ -n "${{ needs.prepare.outputs.arch_packages }}" ] && echo "true" || echo "false")
has_min_dsm72_packages=${{ needs.prepare.outputs.has_min_dsm72_packages || 'false' }}
# Dynamic logic for automatic builds
if [ "${{ github.event_name }}" != "workflow_dispatch" ]; then
# Enable noarch builds if noarch packages exist
add_noarch_builds=$([ "$has_noarch_packages" == "true" ] && echo "true" || echo "false")
# Enable noarch DSM 7.2 builds if noarch packages exist and minimum DSM 7.2 requirements are met
add_noarch_dsm72_builds=$([ "$has_noarch_packages" == "true" ] && [ "$has_min_dsm72_packages" == "true" ] && echo "true" || echo "false")
# Enable DSM 7.2 builds if arch packages exist and minimum DSM 7.2 requirements are met
add_dsm72_builds=$([ "$has_arch_packages" == "true" ] && [ "$has_min_dsm72_packages" == "true" ] && echo "true" || echo "false")
# Enable DSM 7.1 builds if arch packages exist
add_dsm71_builds=$([ "$has_arch_packages" == "true" ] && echo "true" || echo "false")
# Enable DSM 6.2 builds if arch packages exist
add_dsm62_builds=$([ "$has_arch_packages" == "true" ] && echo "true" || echo "false")
fi
# Build matrix
matrix=$(jq -n '{"include": []}')
# Create matrix as a JSON object
matrix='{"include": ['
if [ "$add_noarch_builds" == "true" ]; then
matrix+='{"arch": "noarch-1.1"},'
matrix+='{"arch": "noarch-3.1"},'
matrix+='{"arch": "noarch-6.1"},'
matrix+='{"arch": "noarch-7.0"},'
# Helper function to add entries to the matrix
add_to_matrix() {
matrix=$(echo "$matrix" | jq --arg arch "$1" '.include += [{"arch": $arch}]')
}
# Add noarch builds
if [ "$add_noarch_builds" == "true" ] && [ "$has_noarch_packages" == "true" ]; then
add_to_matrix "noarch-1.1"
add_to_matrix "noarch-3.1"
add_to_matrix "noarch-6.1"
add_to_matrix "noarch-7.0"
fi
# Add noarch DSM 7.2 builds
if [ "$add_noarch_dsm72_builds" == "true" ] && [ "$has_noarch_packages" == "true" ]; then
add_to_matrix "noarch-7.2"
fi
if [ "$add_dsm72_builds" == "true" ]; then
matrix+='{"arch": "x64-7.2"},'
matrix+='{"arch": "aarch64-7.2"},'
# Add DSM 7.2 builds
if [ "$add_dsm72_builds" == "true" ] && [ "$has_arch_packages" == "true" ]; then
add_to_matrix "x64-7.2"
add_to_matrix "aarch64-7.2"
add_to_matrix "armv7-7.2"
fi
if [ "$add_dsm71_builds" == "true" ]; then
matrix+='{"arch": "x64-7.1"},'
matrix+='{"arch": "aarch64-7.1"},'
matrix+='{"arch": "evansport-7.1"},'
matrix+='{"arch": "armv7-7.1"},'
matrix+='{"arch": "comcerto2k-7.1"},'
# Add DSM 7.1 builds
if [ "$add_dsm71_builds" == "true" ] && [ "$has_arch_packages" == "true" ]; then
add_to_matrix "x64-7.1"
add_to_matrix "aarch64-7.1"
add_to_matrix "evansport-7.1"
add_to_matrix "armv7-7.1"
add_to_matrix "comcerto2k-7.1"
fi
if [ "$add_dsm62_builds" == "true" ]; then
matrix+='{"arch": "x64-6.2.4"},'
matrix+='{"arch": "aarch64-6.2.4"},'
matrix+='{"arch": "evansport-6.2.4"},'
matrix+='{"arch": "armv7-6.2.4"},'
matrix+='{"arch": "hi3535-6.2.4"},'
matrix+='{"arch": "88f6281-6.2.4"},'
matrix+='{"arch": "qoriq-6.2.4"},'
# Add DSM 6.2 builds
if [ "$add_dsm62_builds" == "true" ] && [ "$has_arch_packages" == "true" ]; then
add_to_matrix "x64-6.2.4"
add_to_matrix "aarch64-6.2.4"
add_to_matrix "evansport-6.2.4"
add_to_matrix "armv7-6.2.4"
add_to_matrix "hi3535-6.2.4"
add_to_matrix "88f6281-6.2.4"
add_to_matrix "qoriq-6.2.4"
fi
if [ "$add_dsm52_builds" == "true" ]; then
matrix+='{"arch": "x86-5.2"},'
matrix+='{"arch": "88f6281-5.2"},'
matrix+='{"arch": "ppc853x-5.2"},'
# Add DSM 5.2 builds
if [ "$add_dsm52_builds" == "true" ] && [ "$has_arch_packages" == "true" ]; then
add_to_matrix "x86-5.2"
add_to_matrix "88f6281-5.2"
add_to_matrix "ppc853x-5.2"
fi
# Add SRM 1.2 builds
if [ "$add_srm12_builds" == "true" ]; then
matrix+='{"arch": "armv7-1.2"},'
add_to_matrix "armv7-1.2"
fi
# Remove trailing comma and close the matrix
matrix=$(echo $matrix | sed 's/,$//')
matrix+=']}'
echo "matrix=$matrix" >> $GITHUB_OUTPUT
# Output the final matrix
echo "matrix=$(echo $matrix | jq -c)" >> $GITHUB_OUTPUT
build:
name: Build
needs: [prepare, generate_matrix]
needs: [prepare, set-defaults]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.generate_matrix.outputs.matrix) }}
matrix: ${{ fromJSON(needs.set-defaults.outputs.matrix) }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ local.mk:
@echo "DISTRIBUTOR_URL =" >> $@
@echo "REPORT_URL =" >> $@
@echo "DEFAULT_TC =" >> $@
@echo "# Option to disable the use of github API to get the real name and url of the maintainer" >> $@
@echo "# define it for local builds when you reach the API rate limit" >> $@
@echo "DISABLE_GITHUB_MAINTAINER =" >> $@
@echo "#PSTAT = on" >> $@
@echo "#PARALLEL_MAKE = max" >> $@

Expand Down
9 changes: 1 addition & 8 deletions cross/arp-scan/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PKG_DIST_SITE = https://github.com/royhills/arp-scan/archive
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

OPTIONAL_DEPENDS = cross/libpcap cross/libpcap_1.9
DEPENDS = cross/libpcap

HOMEPAGE = https://www.royhills.co.uk/wiki/index.php/Arp-scan_User_Guide
COMMENT = Command-line tool for system discovery and fingerprinting. It constructs and sends ARP requests to the specified IP addresses, and displays any responses that are received.
Expand All @@ -22,13 +22,6 @@ ADDITIONAL_CPPFLAGS = -O3

include ../../mk/spksrc.cross-cc.mk

ifeq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
DEPENDS = cross/libpcap_1.9
else
DEPENDS = cross/libpcap
endif


.PHONY: arp-scan_pre_configure
arp-scan_pre_configure:
$(RUN) autoreconf --install
3 changes: 1 addition & 2 deletions cross/arp-scan/PLIST
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
rsc:bin/arp-fingerprint
bin:bin/arp-scan
rsc:bin/get-iab
rsc:bin/get-oui
rsc:etc/arp-scan/mac-vendor.txt
rsc:share/arp-scan
73 changes: 73 additions & 0 deletions cross/attr/patches/001-attributes_h-for-old-gcc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# remove deprecated attributes not supported by old GCC
#
--- include/attributes.h.orig 2022-12-31 01:37:46.000000000 +0100
+++ include/attributes.h 2024-10-19 01:00:38.903700421 +0200
@@ -126,11 +126,9 @@
* The return value is -1 on error (w/errno set appropriately), 0 on success.
*/
EXPORT int attr_get (const char *__path, const char *__attrname,
- char *__attrvalue, int *__valuelength, int __flags)
- __attribute__ ((deprecated ("Use getxattr or lgetxattr instead")));
+ char *__attrvalue, int *__valuelength, int __flags);
EXPORT int attr_getf (int __fd, const char *__attrname, char *__attrvalue,
- int *__valuelength, int __flags)
- __attribute__ ((deprecated ("Use fgetxattr instead")));
+ int *__valuelength, int __flags);

/*
* Set the value of an attribute, creating the attribute if necessary.
@@ -138,22 +136,18 @@
*/
EXPORT int attr_set (const char *__path, const char *__attrname,
const char *__attrvalue, const int __valuelength,
- int __flags)
- __attribute__ ((deprecated ("Use setxattr or lsetxattr instead")));
+ int __flags);
EXPORT int attr_setf (int __fd, const char *__attrname,
const char *__attrvalue, const int __valuelength,
- int __flags)
- __attribute__ ((deprecated ("Use fsetxattr instead")));
+ int __flags);

/*
* Remove an attribute.
* The return value is -1 on error (w/errno set appropriately), 0 on success.
*/
EXPORT int attr_remove (const char *__path, const char *__attrname,
- int __flags)
- __attribute__ ((deprecated ("Use removexattr or lremovexattr instead")));
-EXPORT int attr_removef (int __fd, const char *__attrname, int __flags)
- __attribute__ ((deprecated ("Use fremovexattr instead")));
+ int __flags);
+EXPORT int attr_removef (int __fd, const char *__attrname, int __flags);

/*
* List the names and sizes of the values of all the attributes of an object.
@@ -163,11 +157,9 @@
* The return value is -1 on error (w/errno set appropriately), 0 on success.
*/
EXPORT int attr_list(const char *__path, char *__buffer, const int __buffersize,
- int __flags, attrlist_cursor_t *__cursor)
- __attribute__ ((deprecated ("Use listxattr or llistxattr instead")));
+ int __flags, attrlist_cursor_t *__cursor);
EXPORT int attr_listf(int __fd, char *__buffer, const int __buffersize,
- int __flags, attrlist_cursor_t *__cursor)
- __attribute__ ((deprecated ("Use flistxattr instead")));
+ int __flags, attrlist_cursor_t *__cursor);

/*
* Operate on multiple attributes of the same object simultaneously.
@@ -187,11 +179,9 @@
* to a ATTR_OP_GET are the same as the args to an attr_get() call.
*/
EXPORT int attr_multi (const char *__path, attr_multiop_t *__oplist,
- int __count, int __flags)
- __attribute__ ((deprecated ("Use getxattr, setxattr, listxattr, removexattr instead")));
+ int __count, int __flags);
EXPORT int attr_multif (int __fd, attr_multiop_t *__oplist,
- int __count, int __flags)
- __attribute__ ((deprecated ("Use getxattr, setxattr, listxattr, removexattr instead")));
+ int __count, int __flags);

#ifdef __cplusplus
}
Loading

0 comments on commit db7c4ba

Please sign in to comment.