Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 0x4A6F-master
  • 0x4A6F-rpi4
  • autinerd/experimental-openwrt-24.10
  • experimental
  • feature/addMikrotikwAP
  • master
  • nrb/airmax-test
  • nrb/ar9344-reset-sequence
  • nrb/gluon-master-cpe510
  • nrb/test-radv-filter
  • nrbffs/fastd-remove-delay
  • nrbffs/netgear-ex6120
  • v2018.2.2-ffs
  • v2018.2.3-ffs
  • v2019.1-ffs
  • v2019.1.1-ffs
  • v2019.1.2-ffs
  • v2020.1-ffs
  • v2020.1.1-ffs
  • v2020.1.3-ffs
  • v2020.2-ffs
  • v2020.2.1-ffs
  • v2020.2.2-ffs
  • v2020.2.3-ffs
  • v2021.1-ffs
  • v2021.1.1-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • v2022.1.3-ffs
  • v2022.1.4-ffs
  • v2023.1-ffs
  • v2023.2-ffs
  • v2023.2.2-ffs
  • v2023.2.3-ffs
  • v2023.2.4-ffs
  • experimental-2022-09-24
  • experimental-2022-09-24-base
  • experimental-2023-03-11
  • experimental-2023-03-11-base
  • experimental-2023-03-12
  • experimental-2023-03-12-base
  • experimental-2023-03-16
  • experimental-2023-03-16-base
  • experimental-2023-03-20
  • experimental-2023-03-20-base
  • experimental-2023-03-23
  • experimental-2023-03-23-base
  • experimental-2023-03-25
  • experimental-2023-03-25-base
  • experimental-2023-03-26
  • experimental-2023-03-26-base
  • experimental-2023-03-30
  • experimental-2023-03-30-base
  • experimental-2023-03-31
  • experimental-2023-03-31-base
  • experimental-2023-04-01
  • experimental-2023-04-01-base
  • experimental-2023-04-08
  • experimental-2023-04-08-base
  • experimental-2023-04-10
  • experimental-2023-04-10-base
  • experimental-2023-04-13
  • experimental-2023-04-13-base
  • experimental-2023-04-15
  • experimental-2023-04-15-base
  • experimental-2023-04-16
  • experimental-2023-04-16-base
  • experimental-2023-04-18
  • experimental-2023-04-18-base
  • experimental-2023-04-20
  • experimental-2023-04-20-base
  • experimental-2023-04-26
  • experimental-2023-04-26-base
  • experimental-2023-04-28
  • experimental-2023-04-28-base
  • experimental-2023-04-30
  • experimental-2023-04-30-base
  • experimental-2023-05-02
  • experimental-2023-05-02-base
  • experimental-2023-05-03
  • experimental-2023-05-03-base
  • experimental-2023-05-12
  • experimental-2023-05-12-base
  • experimental-2023-05-21
  • experimental-2023-05-21-base
  • experimental-2023-05-25
  • experimental-2023-05-25-base
  • experimental-2023-07-02
  • experimental-2023-07-02-base
  • experimental-2023-07-04
  • experimental-2023-07-04-base
  • experimental-2023-07-12
  • experimental-2023-07-12-base
  • experimental-2023-07-16
  • experimental-2023-07-16-base
  • experimental-2023-08-04
  • experimental-2023-08-04-base
  • experimental-2023-08-10
  • experimental-2023-08-10-base
  • experimental-2023-09-08
  • experimental-2023-09-08-base
  • experimental-2023-09-09
  • experimental-2023-09-09-base
  • experimental-2023-09-10
  • experimental-2023-09-10-base
  • experimental-2023-09-11
  • experimental-2023-09-11-base
  • experimental-2023-09-12
  • experimental-2023-09-12-base
  • experimental-2023-09-13
  • experimental-2023-09-13-base
  • experimental-2023-09-15
  • experimental-2023-09-15-base
  • experimental-2023-09-16
  • experimental-2023-09-16-base
  • experimental-2023-09-18
  • experimental-2023-09-18-base
  • experimental-2023-09-20
  • experimental-2023-09-20-base
  • experimental-2023-09-27
  • experimental-2023-09-27-base
  • experimental-2023-09-28
  • experimental-2023-09-28-base
  • experimental-2023-09-29
  • experimental-2023-09-29-base
  • experimental-2023-10-02
  • experimental-2023-10-02-base
  • experimental-2023-10-13
  • experimental-2023-10-13-base
  • experimental-2023-10-14
  • experimental-2023-10-14-base
  • experimental-2023-10-16
  • experimental-2023-10-16-base
  • experimental-2023-10-23
  • experimental-2023-10-23-base
135 results

Target

Select target project
  • firmware/gluon
  • 0x4A6F/gluon
  • patrick/gluon
3 results
Select Git revision
  • 0x4A6F-master
  • 0x4A6F-rpi4
  • 2014.3.x
  • 2014.4.x
  • babel
  • hoodselector
  • master
  • radv-filterd
  • v2015.1.x
  • v2016.1.x
  • v2016.2.4-batmanbug
  • v2016.2.x
  • v2018.2.2-ffs
  • v2018.2.x
  • v2014.1
  • v2014.2
  • v2014.3
  • v2014.3.1
  • v2014.4
  • v2015.1
  • v2015.1.1
  • v2015.1.2
  • v2016.1
  • v2016.1.1
  • v2016.1.2
  • v2016.1.3
  • v2016.1.4
  • v2016.1.5
  • v2016.1.6
  • v2016.2
  • v2016.2.1
  • v2016.2.2
  • v2016.2.3
  • v2016.2.4
  • v2016.2.5
  • v2016.2.6
  • v2016.2.7
  • v2017.1
  • v2017.1.1
  • v2017.1.2
  • v2017.1.3
  • v2017.1.4
  • v2017.1.5
  • v2017.1.6
  • v2017.1.7
  • v2017.1.8
  • v2018.1
  • v2018.1.1
  • v2018.1.2
  • v2018.1.3
  • v2018.1.4
  • v2018.2
  • v2018.2-ffs0.1
  • v2018.2.1
  • v2018.2.1-ffs0.1
  • v2018.2.2-ffs0.1
56 results
Show changes
Showing
with 1188 additions and 389 deletions
From: Nico <github@nicoboehr.de>
Date: Fri, 29 Dec 2023 23:17:27 +0000
Subject: uradvd: add patch to announce prefix with preferred lifetime 0
diff --git a/net/uradvd/patches/001-uradvd-announce-with-pref-0.patch b/net/uradvd/patches/001-uradvd-announce-with-pref-0.patch
new file mode 100644
index 0000000000000000000000000000000000000000..7882639d1bfec0923460c93f55fe9f44e58212c1
--- /dev/null
+++ b/net/uradvd/patches/001-uradvd-announce-with-pref-0.patch
@@ -0,0 +1,11 @@
+--- a/uradvd.c
++++ b/uradvd.c
+@@ -43,7 +43,7 @@
+
+ /* These are in seconds */
+ #define AdvValidLifetime 86400u
+-#define AdvPreferredLifetime 14400u
++#define AdvPreferredLifetime 0u
+ #define AdvDefaultLifetime 0u
+ #define AdvCurHopLimit 64u
+ #define AdvRDNSSLifetime 1200u
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Fri, 25 Apr 2025 02:06:17 +0200
Subject: perl: replace 910-miniperl-needs-inc-dot.patch with smaller scope fix
The patch was first introduced in commit 4a94479f9652 ("perl: update to
5.26.1") to fix the target build when the host perl has
default_inc_excludes_dot enabled. It just added back the `-I`. to every
call of miniperl; this solution is questionable however, as it adds `.` to
the beginning of the search path, not as a final fallback like perl did
before default_inc_excludes_dot (and like miniperl does).
It is also not necessary - only two scripts, write_buildcustomize.pl and
configpm, expect to be able to include a file from `.` (in both cases a
file the script just generated). Just fix the two scripts instead.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/lang/perl/patches/910-fix-default_inc_excludes_dot.patch b/lang/perl/patches/910-fix-default_inc_excludes_dot.patch
new file mode 100644
index 0000000000000000000000000000000000000000..ab3e6243bda314f137d1c328fbbf0e7f3bb34f36
--- /dev/null
+++ b/lang/perl/patches/910-fix-default_inc_excludes_dot.patch
@@ -0,0 +1,22 @@
+--- a/write_buildcustomize.pl
++++ b/write_buildcustomize.pl
+@@ -3,7 +3,7 @@
+ use strict;
+
+ my $osname = $^O;
+-my $file = 'lib/buildcustomize.pl';
++my $file = './lib/buildcustomize.pl';
+
+ if ( @ARGV % 2 ) {
+ my $dir = shift;
+--- a/configpm
++++ b/configpm
+@@ -129,7 +129,7 @@ if ($Opts{chdir}) {
+ my ($Config_SH, $Config_PM, $Config_heavy, $Config_POD);
+ my $Glossary = 'Porting/Glossary';
+
+-$Config_PM = "lib/Config.pm";
++$Config_PM = "./lib/Config.pm";
+ $Config_POD = "lib/Config.pod";
+ $Config_SH = "config.sh";
+
diff --git a/lang/perl/patches/910-miniperl-needs-inc-dot.patch b/lang/perl/patches/910-miniperl-needs-inc-dot.patch
deleted file mode 100644
index 6997f04d575e5bb92e78052cf693ae39bb464a20..0000000000000000000000000000000000000000
--- a/lang/perl/patches/910-miniperl-needs-inc-dot.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/Makefile.SH
-+++ b/Makefile.SH
-@@ -346,7 +346,7 @@ OBJ_EXT = $_o
- # Macros to invoke a copy of miniperl during the build. Targets which
- # are built using these macros should depend on \$(MINIPERL_EXE)
- MINIPERL_EXE = miniperl\$(EXE_EXT)
--MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) -Ilib
-+MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) -Ilib -I.
-
- # Macros to invoke sort the MANIFEST during build
- MANIFEST_SRT = MANIFEST.srt
-@@ -1001,7 +1001,7 @@ lib/buildcustomize.pl: $& $(miniperl_obj
- @$(RMS) miniperl.xok
- $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
- $(miniperl_objs) $(libs)
-- $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-+ $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
- $(MINIPERL) -f write_buildcustomize.pl
- !NO!SUBS!
- ;;
-@@ -1012,7 +1012,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d
- @\$(RMS) miniperl.xok
- @\$(RMS) \$(MINIPERL_EXE)
- \$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
-- \$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-+ \$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
- \$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname"
- !GROK!THIS!
- else
-@@ -1021,7 +1021,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep
- @$(RMS) miniperl.xok
- $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
- $(miniperl_objs) $(libs)
-- $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-+ $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
- $(MINIPERL) -f write_buildcustomize.pl
- !NO!SUBS!
- fi
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Fri, 25 Apr 2025 12:35:23 +0200
Subject: perl: drop 110-always_use_miniperl.patch
The patch was introduced in commit 4c57844f0f04 ("lang/perl: Add hack to
make perl always use miniperl during build"), but it is not actually
necessary. By setting $perl to a non-empty value (using 'perl' as is
common on desktop distros), the logic works as intended and selects the
correct perl binary for host and target builds.
As miniperl just symlinks to host perl for target builds, the main
effect of this change is not unconditionally passing `-Ilib -I.`
anymore. This seems like a good thing; host libraries should be used
with host perl by default.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/lang/perl/files/base.config b/lang/perl/files/base.config
index 67232b6d83e70505e7e85ad6893a2661f4571f7f..7d8b88b200f589b0efad7b301d26c6f9b77dfb33 100644
--- a/lang/perl/files/base.config
+++ b/lang/perl/files/base.config
@@ -864,7 +864,7 @@ package='perl5'
pager='/usr/bin/less'
passcat='cat /etc/passwd'
path_sep=':'
-perl=''
+perl='perl'
perl5=''
perl_patchlevel=''
perl_static_inline='static __inline__'
diff --git a/lang/perl/patches/110-always_use_miniperl.patch b/lang/perl/patches/110-always_use_miniperl.patch
deleted file mode 100644
index 806a31256b2007ee5f2c36d75261fac0d176cc21..0000000000000000000000000000000000000000
--- a/lang/perl/patches/110-always_use_miniperl.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/Makefile.SH
-+++ b/Makefile.SH
-@@ -360,22 +360,11 @@ PERL_EXE_LDFLAGS=$exeldflags
- ;;
- esac
-
--case "$usecrosscompile$perl" in
--define?*)
-- $spitshell >>$Makefile <<!GROK!THIS!
--# Macros to invoke a copy of our fully operational perl during the build.
--PERL_EXE = perl\$(EXE_EXT)
--RUN_PERL = \$(LDLIBPTH) \$(RUN) $perl\$(EXE_EXT)
--!GROK!THIS!
-- ;;
--*)
-- $spitshell >>$Makefile <<!GROK!THIS!
-+$spitshell >>$Makefile <<!GROK!THIS!
- # Macros to invoke a copy of our fully operational perl during the build.
- PERL_EXE = perl\$(EXE_EXT)
--RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT) -Ilib -I.
-+RUN_PERL = \$(LDLIBPTH) \$(RUN) ./miniperl\$(EXE_EXT) -Ilib -I.
- !GROK!THIS!
-- ;;
--esac
-
- $spitshell >>$Makefile <<!GROK!THIS!
- # Macros to run our tests
diff --git a/lang/perl/patches/900-use-rm-force.patch b/lang/perl/patches/900-use-rm-force.patch
index 9e44f5402f184445dcf4e9c75d96d2e412e5c4e0..baff506f6427f0b16712c252b0159ad80db20243 100644
--- a/lang/perl/patches/900-use-rm-force.patch
+++ b/lang/perl/patches/900-use-rm-force.patch
@@ -8,7 +8,7 @@
ranlib = $ranlib
ECHO = $echo
-@@ -791,7 +792,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
+@@ -802,7 +803,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
./generate_uudmap$(HOST_EXE_EXT) $(generated_headers)
generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
@@ -17,7 +17,7 @@
$(LNS) $(HOST_GENERATE) generate_uudmap$(HOST_EXE_EXT)
!NO!SUBS!
-@@ -896,26 +897,26 @@ mydtrace.h: $(DTRACE_H)
+@@ -907,26 +908,26 @@ mydtrace.h: $(DTRACE_H)
define)
$spitshell >>$Makefile <<'!NO!SUBS!'
$(DTRACE_MINI_O): perldtrace.d $(miniperl_objs_nodt)
@@ -48,7 +48,7 @@
!NO!SUBS!
;;
-@@ -926,13 +927,13 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
+@@ -937,13 +938,13 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
case "$useshrplib" in
true)
$spitshell >>$Makefile <<'!NO!SUBS!'
@@ -64,7 +64,7 @@
mv $@ libperl$(OBJ_EXT)
$(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
!NO!SUBS!
-@@ -941,7 +942,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
+@@ -952,7 +953,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
;;
*)
$spitshell >>$Makefile <<'!NO!SUBS!'
@@ -73,7 +73,7 @@
$(AR) rc $(LIBPERL) $(perllib_objs) $(DYNALOADER)
@$(ranlib) $(LIBPERL)
!NO!SUBS!
-@@ -975,7 +976,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
+@@ -986,7 +987,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
amigaos*)
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
@@ -82,7 +82,7 @@
$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
# $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-@@ -997,7 +998,7 @@ NAMESPACEFLAGS = -force_flat_namespace
+@@ -1008,7 +1009,7 @@ NAMESPACEFLAGS = -force_flat_namespace
esac
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
@@ -91,7 +91,7 @@
$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
$(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-@@ -1008,8 +1009,8 @@ lib/buildcustomize.pl: $& $(miniperl_obj
+@@ -1019,8 +1020,8 @@ lib/buildcustomize.pl: $& $(miniperl_obj
if test "X$hostperl" != X; then
$spitshell >>$Makefile <<!GROK!THIS!
lib/buildcustomize.pl: \$& \$(miniperl_dep) write_buildcustomize.pl
@@ -102,7 +102,7 @@
\$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
\$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
\$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname"
-@@ -1017,7 +1018,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d
+@@ -1028,7 +1029,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d
else
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_dep) write_buildcustomize.pl
@@ -111,7 +111,7 @@
$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
$(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-@@ -1030,7 +1031,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep
+@@ -1041,7 +1042,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep
$spitshell >>$Makefile <<'!NO!SUBS!'
$(PERL_EXE): $& $(perlmain_dep) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) write_buildcustomize.pl
@@ -120,7 +120,7 @@
!NO!SUBS!
case "$osname" in
-@@ -1130,8 +1131,8 @@ pod/perl5400delta.pod: pod/perldelta.pod
+@@ -1141,8 +1142,8 @@ pod/perl5400delta.pod: pod/perldelta.pod
$(LNS) perldelta.pod pod/perl5400delta.pod
extra.pods: $(MINIPERL_EXE)
@@ -131,7 +131,7 @@
-@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
nx=`echo $$x | sed -e "s/README\.//"`; \
$(LNS) ../$$x "pod/perl"$$nx".pod" ; \
-@@ -1330,11 +1331,11 @@ realclean: _realcleaner _mopup
+@@ -1341,11 +1342,11 @@ realclean: _realcleaner _mopup
@echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh"
_clobber:
@@ -148,7 +148,7 @@
clobber: _realcleaner _mopup _clobber
-@@ -1342,24 +1343,24 @@ distclean: clobber
+@@ -1353,24 +1354,24 @@ distclean: clobber
# Like distclean but also removes emacs backups and *.orig.
veryclean: _verycleaner _mopup _clobber
@@ -184,7 +184,7 @@
-cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN)
-cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN)
-@if test -f $(MINIPERL_EXE) ; then \
-@@ -1369,8 +1370,8 @@ _cleaner1:
+@@ -1380,8 +1381,8 @@ _cleaner1:
else \
sh $(CLEAN).sh ; \
fi
@@ -195,7 +195,7 @@
# Dear POSIX, thanks for making the default to xargs to be
# run once if nothing is passed in. It is such a great help.
-@@ -1385,24 +1386,24 @@ _cleaner1:
+@@ -1396,24 +1397,24 @@ _cleaner1:
# Add new rules before that line - the next line (rm -f so_locations ...) is
# used as a placeholder by a regen script.
_cleaner2:
@@ -237,7 +237,7 @@
-rmdir lib/version lib/threads lib/inc/ExtUtils lib/inc lib/encoding
-rmdir lib/autodie/exception lib/autodie/Scope lib/autodie lib/XS
-rmdir lib/Win32API lib/VMS lib/Unicode/Collate/Locale
-@@ -1459,11 +1460,11 @@ _realcleaner:
+@@ -1470,11 +1471,11 @@ _realcleaner:
_verycleaner:
@$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=veryclean
@$(LDLIBPTH) $(MAKE) _cleaner2
@@ -251,7 +251,7 @@
lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c)
cscopeflags = -Rb # Recursive, build-only.
-@@ -1524,7 +1525,7 @@ case "$targethost" in
+@@ -1535,7 +1536,7 @@ case "$targethost" in
'') $spitshell >>$Makefile <<'!NO!SUBS!'
test_prep test-prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) \
$(dynamic_ext) $(TEST_PERL_DLL) runtests $(generated_pods) common_build
@@ -260,7 +260,7 @@
!NO!SUBS!
;;
-@@ -1574,7 +1575,7 @@ test_prep test-prep: test_prep_pre \$(MI
+@@ -1585,7 +1586,7 @@ test_prep test-prep: test_prep_pre \$(MI
$to config.sh
# --- For lib/diagnostics.t with -Duseshrplib
$to \$(PERL_EXE)
@@ -269,7 +269,7 @@
$to t/\$(PERL_EXE)
!GROK!THIS!
-@@ -1592,7 +1593,7 @@ else
+@@ -1603,7 +1604,7 @@ else
$spitshell >>$Makefile <<'!NO!SUBS!'
test_prep_reonly: $(MINIPERL_EXE) $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL)
$(MINIPERL) make_ext.pl $(dynamic_ext_re) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
@@ -278,7 +278,7 @@
!NO!SUBS!
fi
-@@ -1648,7 +1649,7 @@ minitest_prep: $(MINIPERL_EXE)
+@@ -1659,7 +1660,7 @@ minitest_prep: $(MINIPERL_EXE)
@echo "You may see some irrelevant test failures if you have been unable"
@echo "to build lib/Config.pm, or the Unicode data files."
@echo " "
diff --git a/lang/perl/patches/920-Revert-perl-127606-adjust-dependency-paths-on-instal.patch b/lang/perl/patches/920-Revert-perl-127606-adjust-dependency-paths-on-instal.patch
index e9e5688e475e810f45acbda5cd579c65e484b8b7..6436a8ea027f46a8ce1c41b13323b625cc51eb4d 100644
--- a/lang/perl/patches/920-Revert-perl-127606-adjust-dependency-paths-on-instal.patch
+++ b/lang/perl/patches/920-Revert-perl-127606-adjust-dependency-paths-on-instal.patch
@@ -42,10 +42,10 @@ Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
- ;;
-esac
-
- $spitshell >>$Makefile <<!GROK!THIS!
- # Macros to invoke a copy of our fully operational perl during the build.
- PERL_EXE = perl\$(EXE_EXT)
-@@ -1045,20 +1029,6 @@ $(PERL_EXE): $& $(perlmain_dep) $(LIBPER
+ case "$usecrosscompile$perl" in
+ define?*)
+ $spitshell >>$Makefile <<!GROK!THIS!
+@@ -1056,20 +1040,6 @@ $(PERL_EXE): $& $(perlmain_dep) $(LIBPER
$(SHRPENV) $(CC) -o perl $(CLDFLAGS) $(CCDLFLAGS) $(perlmain_objs) $(LLIBPERL) $(static_ext) `cat ext.libs` $(libs)
!NO!SUBS!
;;
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 26 Apr 2025 22:37:16 +0200
Subject: perl: fix parallel build race condition in target build
We have received reports of builds of perl occasionally failing when
building with many parallel jobs, with a log like the following:
LD_LIBRARY_PATH=[...]/perl/perl-5.40.0 ./miniperl -Ilib make_ext.pl \
dist/constant/pm_to_blib MAKE="make" LIBPERL_A=libperl.so
File/Path.pm did not return a true value at [...]/hostpkg/usr/lib/perl5/5.40.0/ExtUtils/MakeMaker.pm line 13.
BEGIN failed--compilation aborted at [...]/hostpkg/usr/lib/perl5/5.40.0/ExtUtils/MakeMaker.pm line 13.
Compilation failed in require at Makefile.PL line 3.
BEGIN failed--compilation aborted at Makefile.PL line 3.
Unsuccessful Makefile.PL(dist/constant): code=65280 at make_ext.pl line 532.
The failing extension (dist/constant in the above log) would differ
between runs.
The cause of the issue is the `-Ilib` in the command line of miniperl.
In the host build, `./miniperl -I lib` will use the following include
path:
[..]/build_dir/hostpkg/perl/perl-5.40.0/cpan/AutoLoader/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/dist/Carp/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/dist/PathTools
[..]/build_dir/hostpkg/perl/perl-5.40.0/dist/PathTools/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/cpan/ExtUtils-Install/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/cpan/ExtUtils-MakeMaker/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/cpan/ExtUtils-Manifest/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/cpan/File-Path/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/ext/re
[..]/build_dir/hostpkg/perl/perl-5.40.0/dist/Term-ReadLine/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/dist/Exporter/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/ext/File-Find/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/cpan/Text-Tabs/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/dist/constant/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/cpan/version/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/cpan/Getopt-Long/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/cpan/Text-ParseWords/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/cpan/ExtUtils-PL2Bat/lib
[..]/build_dir/hostpkg/perl/perl-5.40.0/lib
.
Various dependencies of the extension build scripts (Makefile.PL) -
including File-Path, which failed to be loaded in the error log - are
included in the path by buildcustomize.pl, as these extensions are only
installed to `lib` as the build proceeds.
However, in a target build, miniperl is just a symlink to the previously
built host perl. As the host perl does not implicitly load
`buildcustomize.pl`, we get the following include path for
`./miniperl -Ilib`:
lib
[..]/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.40.0/x86_64-linux
[..]/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.40.0
[..]/staging_dir/hostpkg/usr/lib/perl5/5.40.0/x86_64-linux
[..]/staging_dir/hostpkg/usr/lib/perl5/5.40.0
The host perl's install location is used as the default include path
which provides File-Path etc. for the target build; however, as more
and more libraries get installed into `lib` during the extension build,
they may get loaded from there instead, as `lib` is at the beginning of
the include path. When multiple extensions are built in parallel, a
Makefile.PL may attempt to load File/Path from `lib` after the file has
been created, but before its contents have been written fully, resulting
in the build to fail.
In fact, we should not load anything from `lib` during the target build,
as it is the staging directory for the target, including native
extensions built for the target architecture - with one exception: The
build scripts expect to find target information in the `Config` module,
so simply removing `lib` from the include path completely would break
the build.
Solve the issue by creating an alternative lib directory `lib_build`,
symlinking `Config.pm` and its dependencies in it, and replacing the
`-Ilib` argument with `-Ilib_build` using a wrapper script around the
host perl executable. This is similar to the approach seen in perl's own
obsolete/broken cross compile scripts (`Cross/Makefile`).
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/lang/perl/Makefile b/lang/perl/Makefile
index 6a6dd5ea86798e7e95e3657a94cca829dbd0924b..6ad27818e17c211abc1530eb0d1b1e7c1238bf28 100644
--- a/lang/perl/Makefile
+++ b/lang/perl/Makefile
@@ -92,6 +92,21 @@ endef
# Target perl
define Build/Configure
+ # We don't want to pass -Ilib to host perl in the target build (as lib
+ # contains the target libraries, and files may currently be written
+ # while being imported in parallel builds). We do however need the
+ # target versions of the Config modules at the beginning of the include
+ # path for the build scripts' use.
+ #
+ # Create an alternative lib_build directory that will be added to the
+ # include path instead of lib (using hostperl-wrapper), containing only
+ # the config modules.
+ $(INSTALL_DIR) $(PKG_BUILD_DIR)/lib_build
+ ln -sf ../lib/Config.pm ../lib/Config_heavy.pl ../lib/Config_git.pl $(PKG_BUILD_DIR)/lib_build/
+
+ install -m0755 files/hostperl-wrapper $(PKG_BUILD_DIR)/hostperl-wrapper
+ sed -i "s'@HOST_PERL@'$(HOST_PERL_PREFIX)/bin/perl'g" $(PKG_BUILD_DIR)/hostperl-wrapper
+
$(PERL_CMD) files/perlconfig.pl -Dowrt:target_cc='$(TARGET_CC)' \
-Dowrt:gccversion=$(CONFIG_GCC_VERSION) \
-Dowrt:target_cross='$(TARGET_CROSS)' \
diff --git a/lang/perl/files/base.config b/lang/perl/files/base.config
index 7d8b88b200f589b0efad7b301d26c6f9b77dfb33..1cadfc10ac20c3b2bb05bed3c2cc8e946ba24eef 100644
--- a/lang/perl/files/base.config
+++ b/lang/perl/files/base.config
@@ -650,7 +650,7 @@ hint='recommended'
hostcat='cat /etc/hosts'
hostgenerate="$owrt:host_perl_prefix/bin/generate_uudmap"
hostosname=''
-hostperl="$owrt:host_perl_prefix/bin/perl"
+hostperl="./hostperl-wrapper"
html1dir=' '
html1direxp=''
html3dir=' '
diff --git a/lang/perl/files/hostperl-wrapper b/lang/perl/files/hostperl-wrapper
new file mode 100644
index 0000000000000000000000000000000000000000..e31ef1cf8fe37a7a90ee9dd7cc60d3ca947e7600
--- /dev/null
+++ b/lang/perl/files/hostperl-wrapper
@@ -0,0 +1,14 @@
+#!@HOST_PERL@
+
+foreach (@ARGV) {
+ # Stop parsing options if we encounter a non-option argument or --
+ last if $_ eq '--' || $_ !~ m/^-/;
+
+ # Modify first option of the form -Ilib, -I../lib, ... to refer to lib_build instead
+ if ($_ =~ m@-I(.*/)?lib@) {
+ $_ .= '_build';
+ last;
+ }
+}
+
+exec '@HOST_PERL@', @ARGV
From: Linus Lüssing <linus.luessing@c0d3.blue>
Date: Sun, 10 Nov 2024 19:34:26 +0100
Subject: batman-adv: Introduce no noflood mark
This mark prevents a multicast packet being flooded through the whole
mesh. The advantage of marking certain multicast packets via e.g.
ebtables instead of dropping is then the following:
This allows an administrator to let specific multicast packets pass as
long as they are forwarded to a limited number of nodes only and are
therefore creating no burdon to unrelated nodes.
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
diff --git a/batman-adv/patches/2002-batman-adv-Introduce-no-noflood-mark.patch b/batman-adv/patches/2002-batman-adv-Introduce-no-noflood-mark.patch
new file mode 100644
index 0000000000000000000000000000000000000000..6058bff5bb4d07c78a82f59b47213a52b04d6a1e
--- /dev/null
+++ b/batman-adv/patches/2002-batman-adv-Introduce-no-noflood-mark.patch
@@ -0,0 +1,137 @@
+From: Linus Lüssing <linus.luessing@c0d3.blue>
+Date: Sat, 31 Mar 2018 03:36:19 +0200
+Subject: batman-adv: Introduce no noflood mark
+
+This mark prevents a multicast packet being flooded through the whole
+mesh. The advantage of marking certain multicast packets via e.g.
+ebtables instead of dropping is then the following:
+
+This allows an administrator to let specific multicast packets pass as
+long as they are forwarded to a limited number of nodes only and are
+therefore creating no burdon to unrelated nodes.
+
+Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
+
+--- a/include/uapi/linux/batman_adv.h
++++ b/include/uapi/linux/batman_adv.h
+@@ -481,6 +481,18 @@ enum batadv_nl_attrs {
+ */
+ BATADV_ATTR_MULTICAST_FANOUT,
+
++ /**
++ * @BATADV_ATTR_NOFLOOD_MARK: the noflood mark which allows to tag
++ * frames which should never be broadcast flooded through the mesh.
++ */
++ BATADV_ATTR_NOFLOOD_MARK,
++
++ /**
++ * @BATADV_ATTR_NOFLOOD_MASK: the noflood (bit)mask which allows to tag
++ * frames which should never be broadcast flooded through the mesh.
++ */
++ BATADV_ATTR_NOFLOOD_MASK,
++
+ /* add attributes above here, update the policy in netlink.c */
+
+ /**
+--- a/net/batman-adv/netlink.c
++++ b/net/batman-adv/netlink.c
+@@ -133,6 +133,8 @@ static const struct nla_policy batadv_ne
+ [BATADV_ATTR_AP_ISOLATION_ENABLED] = { .type = NLA_U8 },
+ [BATADV_ATTR_ISOLATION_MARK] = { .type = NLA_U32 },
+ [BATADV_ATTR_ISOLATION_MASK] = { .type = NLA_U32 },
++ [BATADV_ATTR_NOFLOOD_MARK] = { .type = NLA_U32 },
++ [BATADV_ATTR_NOFLOOD_MASK] = { .type = NLA_U32 },
+ [BATADV_ATTR_BONDING_ENABLED] = { .type = NLA_U8 },
+ [BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED] = { .type = NLA_U8 },
+ [BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED] = { .type = NLA_U8 },
+@@ -285,6 +287,14 @@ static int batadv_netlink_mesh_fill(stru
+ bat_priv->isolation_mark_mask))
+ goto nla_put_failure;
+
++ if (nla_put_u32(msg, BATADV_ATTR_NOFLOOD_MARK,
++ bat_priv->noflood_mark))
++ goto nla_put_failure;
++
++ if (nla_put_u32(msg, BATADV_ATTR_NOFLOOD_MASK,
++ bat_priv->noflood_mark_mask))
++ goto nla_put_failure;
++
+ if (nla_put_u8(msg, BATADV_ATTR_BONDING_ENABLED,
+ !!atomic_read(&bat_priv->bonding)))
+ goto nla_put_failure;
+@@ -463,6 +473,18 @@ static int batadv_netlink_set_mesh(struc
+ bat_priv->isolation_mark_mask = nla_get_u32(attr);
+ }
+
++ if (info->attrs[BATADV_ATTR_NOFLOOD_MARK]) {
++ attr = info->attrs[BATADV_ATTR_NOFLOOD_MARK];
++
++ bat_priv->noflood_mark = nla_get_u32(attr);
++ }
++
++ if (info->attrs[BATADV_ATTR_NOFLOOD_MASK]) {
++ attr = info->attrs[BATADV_ATTR_NOFLOOD_MASK];
++
++ bat_priv->noflood_mark_mask = nla_get_u32(attr);
++ }
++
+ if (info->attrs[BATADV_ATTR_BONDING_ENABLED]) {
+ attr = info->attrs[BATADV_ATTR_BONDING_ENABLED];
+
+--- a/net/batman-adv/soft-interface.c
++++ b/net/batman-adv/soft-interface.c
+@@ -177,6 +177,23 @@ static void batadv_interface_set_rx_mode
+ {
+ }
+
++/**
++ * batadv_send_skb_has_noflood_mark() - check if packet has a noflood mark
++ * @bat_priv: the bat priv with all the soft interface information
++ * @skb: the packet to check
++ *
++ * Return: True if the skb's mark matches a configured noflood mark and
++ * noflood mark mask. False otherwise.
++ */
++static bool
++batadv_skb_has_noflood_mark(struct batadv_priv *bat_priv, struct sk_buff *skb)
++{
++ u32 match_mark = skb->mark & bat_priv->noflood_mark_mask;
++
++ return bat_priv->noflood_mark_mask &&
++ match_mark == bat_priv->noflood_mark;
++}
++
+ static netdev_tx_t batadv_interface_tx(struct sk_buff *skb,
+ struct net_device *soft_iface)
+ {
+@@ -333,6 +350,9 @@ send:
+ if (batadv_dat_snoop_outgoing_arp_request(bat_priv, skb))
+ brd_delay = msecs_to_jiffies(ARP_REQ_DELAY);
+
++ if (batadv_skb_has_noflood_mark(bat_priv, skb))
++ goto dropped;
++
+ if (batadv_skb_head_push(skb, sizeof(*bcast_packet)) < 0)
+ goto dropped;
+
+--- a/net/batman-adv/types.h
++++ b/net/batman-adv/types.h
+@@ -1711,6 +1711,18 @@ struct batadv_priv {
+ */
+ u32 isolation_mark_mask;
+
++ /**
++ * @noflood_mark: the skb->mark value used to allow directed targeting
++ * only
++ */
++ u32 noflood_mark;
++
++ /**
++ * @noflood_mark_mask: bitmask identifying the bits in skb->mark to be
++ * used for the noflood mark
++ */
++ u32 noflood_mark_mask;
++
+ /** @bcast_seqno: last sent broadcast packet sequence number */
+ atomic_t bcast_seqno;
+
From: Linus Lüssing <linus.luessing@c0d3.blue>
Date: Sun, 10 Nov 2024 19:35:52 +0100
Subject: batctl: Add noflood_mark command
Adds support for the new 'noflood_mark' setting in batman-adv.
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
diff --git a/batctl/patches/2002-batctl-Add-noflood_mark-command.patch b/batctl/patches/2002-batctl-Add-noflood_mark-command.patch
new file mode 100644
index 0000000000000000000000000000000000000000..d4498603785a21a71951a6195cd96661be44d685
--- /dev/null
+++ b/batctl/patches/2002-batctl-Add-noflood_mark-command.patch
@@ -0,0 +1,217 @@
+From 12884631753aa24d9e36c5d65950320ecab61384 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@c0d3.blue>
+Date: Fri, 26 Apr 2019 19:27:38 +0200
+Subject: [PATCH] batctl: Add noflood_mark command
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Adds support for the new 'noflood_mark' setting in batman-adv.
+
+Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
+---
+ Makefile | 1 +
+ README.rst | 15 ++++++
+ batman_adv.h | 12 +++++
+ noflood_mark.c | 140 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 168 insertions(+)
+ create mode 100644 noflood_mark.c
+
+--- a/Makefile
++++ b/Makefile
+@@ -69,6 +69,7 @@ $(eval $(call add_command,multicast_mode
+ $(eval $(call add_command,neighbors,y))
+ $(eval $(call add_command,neighbors_json,y))
+ $(eval $(call add_command,network_coding,y))
++$(eval $(call add_command,noflood_mark,y))
+ $(eval $(call add_command,orig_interval,y))
+ $(eval $(call add_command,originators,y))
+ $(eval $(call add_command,originators_json,y))
+--- a/README.rst
++++ b/README.rst
+@@ -430,6 +430,21 @@ Example::
+
+
+
++batctl noflood_mark
++=======================
++
++display or modify noflood_mark setting
++
++Usage::
++
++ batctl noflood_mark|nf $value[/0x$mask]
++
++* Example 1: ``batctl nf 0x00000001/0xffffffff``
++* Example 2: ``batctl nf 0x00040000/0xffff0000``
++* Example 3: ``batctl nf 16``
++* Example 4: ``batctl nf 0x0f``
++
++
+ batctl translocal
+ -----------------
+
+--- a/batman_adv.h
++++ b/batman_adv.h
+@@ -481,6 +481,18 @@ enum batadv_nl_attrs {
+ */
+ BATADV_ATTR_MULTICAST_FANOUT,
+
++ /**
++ * @BATADV_ATTR_NOFLOOD_MARK: the noflood mark which allows to tag
++ * frames which should never be broadcast flooded through the mesh.
++ */
++ BATADV_ATTR_NOFLOOD_MARK,
++
++ /**
++ * @BATADV_ATTR_NOFLOOD_MASK: the noflood (bit)mask which allows to tag
++ * frames which should never be broadcast flooded through the mesh.
++ */
++ BATADV_ATTR_NOFLOOD_MASK,
++
+ /* add attributes above here, update the policy in netlink.c */
+
+ /**
+--- /dev/null
++++ b/noflood_mark.c
+@@ -0,0 +1,140 @@
++// SPDX-License-Identifier: GPL-2.0
++/* Copyright (C) 2009-2019 B.A.T.M.A.N. contributors:
++ *
++ * Antonio Quartulli <a@unstable.cc>
++ * Linus Lüssing <linus.luessing@c0d3.blue>
++ *
++ * License-Filename: LICENSES/preferred/GPL-2.0
++ */
++
++#include <errno.h>
++#include <stddef.h>
++#include <stdint.h>
++#include <string.h>
++
++#include "main.h"
++#include "sys.h"
++
++static struct noflood_mark_data {
++ uint32_t noflood_mark;
++ uint32_t noflood_mask;
++} noflood_mark;
++
++static int parse_noflood_mark(struct state *state, int argc, char *argv[])
++{
++ struct settings_data *settings = state->cmd->arg;
++ struct noflood_mark_data *data = settings->data;
++ char *mask_ptr;
++ char buff[256];
++ uint32_t mark;
++ uint32_t mask;
++ char *endptr;
++
++ if (argc != 2) {
++ fprintf(stderr, "Error - incorrect number of arguments (expected 1)\n");
++ return -EINVAL;
++ }
++
++ strncpy(buff, argv[1], sizeof(buff));
++ buff[sizeof(buff) - 1] = '\0';
++
++ /* parse the mask if it has been specified, otherwise assume the mask is
++ * the biggest possible
++ */
++ mask = 0xFFFFFFFF;
++ mask_ptr = strchr(buff, '/');
++ if (mask_ptr) {
++ *mask_ptr = '\0';
++ mask_ptr++;
++
++ /* the mask must be entered in hex base as it is going to be a
++ * bitmask and not a prefix length
++ */
++ mask = strtoul(mask_ptr, &endptr, 16);
++ if (!endptr || *endptr != '\0')
++ goto inval_format;
++ }
++
++ /* the mark can be entered in any base */
++ mark = strtoul(buff, &endptr, 0);
++ if (!endptr || *endptr != '\0')
++ goto inval_format;
++
++ data->noflood_mask = mask;
++ /* erase bits not covered by the mask */
++ data->noflood_mark = mark & mask;
++
++ return 0;
++
++inval_format:
++ fprintf(stderr, "Error - incorrect number of arguments (expected 1)\n");
++ fprintf(stderr, "The following formats for mark(/mask) are allowed:\n");
++ fprintf(stderr, " * 0x12345678\n");
++ fprintf(stderr, " * 0x12345678/0xabcdef09\n");
++ return -EINVAL;
++}
++
++static int print_noflood_mark(struct nl_msg *msg, void *arg)
++{
++ struct nlattr *attrs[BATADV_ATTR_MAX + 1];
++ struct nlmsghdr *nlh = nlmsg_hdr(msg);
++ struct genlmsghdr *ghdr;
++ int *result = arg;
++
++ if (!genlmsg_valid_hdr(nlh, 0))
++ return NL_OK;
++
++ ghdr = nlmsg_data(nlh);
++
++ if (nla_parse(attrs, BATADV_ATTR_MAX, genlmsg_attrdata(ghdr, 0),
++ genlmsg_len(ghdr), batadv_netlink_policy)) {
++ return NL_OK;
++ }
++
++ if (!attrs[BATADV_ATTR_NOFLOOD_MARK] ||
++ !attrs[BATADV_ATTR_NOFLOOD_MASK])
++ return NL_OK;
++
++ printf("0x%08x/0x%08x\n",
++ nla_get_u32(attrs[BATADV_ATTR_NOFLOOD_MARK]),
++ nla_get_u32(attrs[BATADV_ATTR_NOFLOOD_MASK]));
++
++ *result = 0;
++ return NL_STOP;
++}
++
++static int get_noflood_mark(struct state *state)
++{
++ return sys_simple_nlquery(state, BATADV_CMD_GET_MESH,
++ NULL, print_noflood_mark);
++}
++
++static int set_attrs_noflood_mark(struct nl_msg *msg, void *arg)
++{
++ struct state *state = arg;
++ struct settings_data *settings = state->cmd->arg;
++ struct noflood_mark_data *data = settings->data;
++
++ nla_put_u32(msg, BATADV_ATTR_NOFLOOD_MARK, data->noflood_mark);
++ nla_put_u32(msg, BATADV_ATTR_NOFLOOD_MASK, data->noflood_mask);
++
++ return 0;
++}
++
++static int set_noflood_mark(struct state *state)
++{
++ return sys_simple_nlquery(state, BATADV_CMD_SET_MESH,
++ set_attrs_noflood_mark, NULL);
++}
++
++static struct settings_data batctl_settings_noflood_mark = {
++ .data = &noflood_mark,
++ .parse = parse_noflood_mark,
++ .netlink_get = get_noflood_mark,
++ .netlink_set = set_noflood_mark,
++};
++
++COMMAND_NAMED(SUBCOMMAND, noflood_mark, "nf", handle_sys_setting,
++ COMMAND_FLAG_MESH_IFACE | COMMAND_FLAG_NETLINK,
++ &batctl_settings_noflood_mark,
++ "[mark] \tdisplay or modify noflood_mark setting");
#!/usr/bin/env bash
set -euo pipefail
echo "CONFIG_DEVEL=y"
if [ "$GLUON_AUTOREMOVE" != "0" ]; then
echo "CONFIG_AUTOREMOVE=y"
else
echo "# CONFIG_AUTOREMOVE is not set"
fi
local lib = dofile('scripts/target_lib.lua')
local env = lib.env
local subtarget = env.SUBTARGET
if subtarget == '' then
subtarget = 'generic'
end
local bindir = env.BOARD .. '/' .. subtarget
lib.exec({'rm', '-f', 'openwrt/bin/targets/'..bindir..'/\0'}, true, '2>/dev/null')
-- Full builds will output the "packages" directory, so clean up first
if (env.GLUON_DEVICES or '') == '' then
lib.exec {'rm', '-rf', 'openwrt/bin/targets/'..bindir..'/packages'}
end
#!/usr/bin/env bash
set -e
[ "$OPENWRT_TARGET" ] || exit 1
. scripts/common.inc.sh
if [ "$(expr match "$OPENWRT_TARGET" '.*-.*')" -gt 0 ]; then
OPENWRT_BINDIR="${OPENWRT_TARGET//-/\/}"
else
OPENWRT_BINDIR="${OPENWRT_TARGET}/generic"
fi
rm -f "openwrt/bin/targets/${OPENWRT_BINDIR}"/* 2>/dev/null || true
# Full builds will output the "packages" directory, so clean up first
[ "$DEVICES" ] || rm -rf "openwrt/bin/targets/${OPENWRT_BINDIR}/packages"
config() {
:
}
try_config() {
:
}
device() {
:
}
factory_image() {
:
}
sysupgrade_image() {
:
}
alias() {
:
}
manifest_alias() {
:
}
packages() {
:
}
factory() {
:
}
sysupgrade() {
:
}
extra_image() {
:
}
no_opkg() {
:
}
unknown_devices="$DEVICES"
want_device() {
[ "$DEVICES" ] || return 0
local new_devices=''
for device in $unknown_devices; do
if [ "$device" != "$1" ]; then
new_devices="${new_devices:+${new_devices} }$device"
fi
done
unknown_devices=$new_devices
for device in $DEVICES; do
if [ "$device" = "$1" ]; then
return 0
fi
done
return 1
}
check_devices() {
if [ "$unknown_devices" ]; then
echo "Error: unknown devices given: ${unknown_devices}" >&2
exit 1
fi
}
#!/usr/bin/env bash
# shellcheck enable=check-unassigned-uppercase
set -euo pipefail
# move into base directory, in case this script is not executed via `make container`
cd "$(dirname "$0")/.."
# normalize branch name to reflect a valid image name
BRANCH=$(git branch --show-current 2>/dev/null | sed 's/[^a-z0-9-]/_/ig')
TAG="gluon:${BRANCH:-latest}"
if [ "$(command -v podman)" ]
then
podman build -t "${TAG}" contrib/docker
podman run -it --rm -u "$(id -u):$(id -g)" --userns=keep-id --volume="$(pwd):/gluon:z" "${TAG}"
elif [ "$(command -v docker)" ]
then
docker build -t "${TAG}" contrib/docker
docker run -it --rm -u "$(id -u):$(id -g)" --volume="$(pwd):/gluon" -e HOME=/gluon "${TAG}"
else
echo "Please install either podman or docker. Exiting" >&2
exit 1
fi
local lib = dofile('scripts/target_lib.lua')
local env = lib.env
local target = env.GLUON_TARGET
assert(target)
assert(env.GLUON_IMAGEDIR)
assert(env.GLUON_PACKAGEDIR)
local openwrt_target
local subtarget = env.SUBTARGET
if subtarget ~= '' then
openwrt_target = env.BOARD .. '-' .. subtarget
else
openwrt_target = env.BOARD
subtarget = 'generic'
end
local bindir = env.BOARD .. '/' .. subtarget
local function mkdir(dir)
lib.exec {'mkdir', '-p', dir}
end
mkdir(env.GLUON_IMAGEDIR..'/factory')
mkdir(env.GLUON_IMAGEDIR..'/sysupgrade')
mkdir(env.GLUON_IMAGEDIR..'/other')
mkdir(env.GLUON_DEBUGDIR)
lib.include(target)
local function image_source(image)
return string.format(
'openwrt/bin/targets/%s/openwrt-%s-%s%s%s',
bindir, openwrt_target, image.name, image.in_suffix, image.extension)
end
local function clean(image, name)
local dir, file = image:dest_name(name, '\0', '\0')
lib.exec {'rm', '-f', dir..'/'..file}
end
for _, images in pairs(lib.images) do
for _, image in ipairs(images) do
clean(image, image.image)
local destdir, destname = image:dest_name(image.image)
local source = image_source(image)
lib.exec {'cp', source, destdir..'/'..destname}
for _, alias in ipairs(image.aliases) do
clean(image, alias)
local _, aliasname = image:dest_name(alias)
lib.exec {'ln', '-s', destname, destdir..'/'..aliasname}
end
end
for _, image in ipairs(images) do
local source = image_source(image)
lib.exec {'rm', '-f', source}
end
end
-- copy kernel image with debug symbols
local kernel_debug_glob = string.format('%s/gluon-\0-%s-kernel-debug.tar.zst',
env.GLUON_DEBUGDIR,
target)
lib.exec {'rm', '-f', kernel_debug_glob}
local kernel_debug_source = string.format('openwrt/bin/targets/%s/kernel-debug.tar.zst',
bindir)
local kernel_debug_dest = string.format('%s/gluon-%s-%s-%s-kernel-debug.tar.zst',
env.GLUON_DEBUGDIR,
lib.site_code,
env.GLUON_RELEASE,
target)
lib.exec {'cp', kernel_debug_source, kernel_debug_dest}
-- Copy opkg repo
if (env.GLUON_DEVICES or '') == '' then
local package_prefix = string.format('gluon-%s-%s', lib.site_code, env.GLUON_RELEASE)
local function dest_dir(prefix)
return env.GLUON_PACKAGEDIR..'/'..prefix..'/'..bindir
end
lib.exec {'rm', '-f', dest_dir('\0')..'/\0'}
lib.exec({'rmdir', '-p', dest_dir('\0')}, true, '2>/dev/null')
mkdir(dest_dir(package_prefix))
lib.exec {'rm', '-rf', 'openwrt/bin/targets/'..bindir..'/packages/tmp'}
lib.exec {'cp', 'openwrt/bin/targets/'..bindir..'/packages/\0', dest_dir(package_prefix)}
end
#!/usr/bin/env bash
set -e
[ "$GLUON_IMAGEDIR" -a "$GLUON_PACKAGEDIR" -a "$OPENWRT_TARGET" -a "$GLUON_RELEASE" -a "$GLUON_SITEDIR" ] || exit 1
default_factory_ext='.bin'
default_factory_suffix='-squashfs-factory'
default_sysupgrade_ext='.bin'
default_sysupgrade_suffix='-squashfs-sysupgrade'
default_extra_images=
output=
profile=
aliases=
factory_ext=
factory_suffix=
sysupgrade_ext=
sysupgrade_suffix=
extra_images=
no_opkg=
mkdir -p "${GLUON_IMAGEDIR}/factory" "${GLUON_IMAGEDIR}/sysupgrade" "${GLUON_IMAGEDIR}/other"
if [ "$(expr match "$OPENWRT_TARGET" '.*-.*')" -gt 0 ]; then
OPENWRT_BINDIR="${OPENWRT_TARGET//-/\/}"
else
OPENWRT_BINDIR="${OPENWRT_TARGET}/generic"
fi
SITE_CODE="$(scripts/site.sh site_code)"
PACKAGE_PREFIX="gluon-${SITE_CODE}-${GLUON_RELEASE}"
do_clean() {
local dir="$1"
local out_suffix="$2"
local ext="$3"
local name="$4"
rm -f "${GLUON_IMAGEDIR}/${dir}/gluon-"*"-${name}${out_suffix}${ext}"
}
get_file() {
local dir="$1"
local out_suffix="$2"
local ext="$3"
local name="$4"
echo "${GLUON_IMAGEDIR}/${dir}/gluon-${SITE_CODE}-${GLUON_RELEASE}-${name}${out_suffix}${ext}"
}
do_copy() {
local dir="$1"
local in_suffix="$2"
local out_suffix="$3"
local ext="$4"
local aliases="$5"
local file="$(get_file "$dir" "$out_suffix" "$ext" "$output")"
do_clean "$dir" "$out_suffix" "$ext" "$output"
cp "openwrt/bin/targets/${OPENWRT_BINDIR}/openwrt-${OPENWRT_TARGET}${profile}${in_suffix}${ext}" "$file"
for alias in $aliases; do
do_clean "$dir" "$out_suffix" "$ext" "$alias"
ln -s "$(basename "$file")" "$(get_file "$dir" "$out_suffix" "$ext" "$alias")"
done
}
copy() {
[ "$output" ] || return 0
want_device "$output" || return 0
[ -z "$factory_ext" ] || do_copy 'factory' "$factory_suffix" '' "$factory_ext" "$aliases"
[ -z "$sysupgrade_ext" ] || do_copy 'sysupgrade' "$sysupgrade_suffix" '-sysupgrade' "$sysupgrade_ext" "$aliases"
echo -n "$extra_images" | while read in_suffix && read out_suffix && read ext; do
do_copy 'other' "$in_suffix" "$out_suffix" "$ext" "$aliases"
done
}
. scripts/common.inc.sh
device() {
copy
output="$1"
profile="-$2"
aliases=
factory_ext="$default_factory_ext"
factory_suffix="$default_factory_suffix"
sysupgrade_ext="$default_sysupgrade_ext"
sysupgrade_suffix="$default_sysupgrade_suffix"
extra_images="$default_extra_images"
}
factory_image() {
copy
output="$1"
aliases=
if [ "$3" ]; then
profile="-$2"
factory_ext="$3"
else
profile=""
factory_ext="$2"
fi
factory_suffix=
sysupgrade_ext=
sysupgrade_suffix=
}
sysupgrade_image() {
copy
output="$1"
aliases=
if [ "$3" ]; then
profile="-$2"
sysupgrade_ext="$3"
else
profile=""
sysupgrade_ext="$2"
fi
factory_ext=
factory_suffix=
sysupgrade_suffix=
}
alias() {
aliases="$aliases $1"
}
factory() {
if [ "$2" ]; then
factory_suffix="$1"
factory_ext="$2"
else
factory_ext="$1"
fi
if [ -z "$profile" ]; then
default_factory_ext="$factory_ext"
default_factory_suffix="$factory_suffix"
fi
}
sysupgrade() {
if [ "$2" ]; then
sysupgrade_suffix="$1"
sysupgrade_ext="$2"
else
sysupgrade_ext="$1"
fi
if [ -z "$output" ]; then
default_sysupgrade_ext="$sysupgrade_ext"
default_sysupgrade_suffix="$sysupgrade_suffix"
fi
}
extra_image() {
local in_suffix="$1"
local out_suffix="$2"
local ext="$3"
extra_images="$in_suffix
$out_suffix
$ext
$extra_images"
if [ -z "$output" ]; then
default_extra_images="$extra_images"
fi
}
no_opkg() {
no_opkg=1
}
. targets/"$1"; copy
# Copy opkg repo
if [ -z "$no_opkg" -a -z "$DEVICES" ]; then
rm -f "$GLUON_PACKAGEDIR"/*/"$OPENWRT_BINDIR"/*
rmdir -p "$GLUON_PACKAGEDIR"/*/"$OPENWRT_BINDIR" 2>/dev/null || true
mkdir -p "${GLUON_PACKAGEDIR}/${PACKAGE_PREFIX}/${OPENWRT_BINDIR}"
cp "openwrt/bin/targets/${OPENWRT_BINDIR}/packages"/* "${GLUON_PACKAGEDIR}/${PACKAGE_PREFIX}/${OPENWRT_BINDIR}"
fi
DEFAULT_FEEDS="$(awk '{print $2}' openwrt/feeds.conf.default)"
#!/bin/sh
# list feeds which don't start with #
DEFAULT_FEEDS="$(awk '!/^#/ {print $2}' openwrt/feeds.conf.default)"
export DEFAULT_FEEDS
local cjson = require 'cjson'
local json = require 'jsonc'
local function load_json(filename)
local f = assert(io.open(filename))
local json = cjson.decode(f:read('*a'))
f:close()
return json
end
local domain = load_json(arg[1])
local domain = assert(json.load(arg[1]))
for k, _ in pairs(domain.domain_names) do
print(k)
end
local M = {}
local function to_keys(t)
local ret = {}
for _, v in ipairs(t) do
ret[v] = true
end
return ret
end
local function collect_keys(t)
local ret = {}
for v in pairs(t) do
table.insert(ret, v)
end
return ret
end
function M.get_packages(files, features)
local enabled_features = to_keys(features)
local handled_features = {}
local packages = {}
local funcs = {}
local function add_pkgs(pkgs)
for _, pkg in ipairs(pkgs or {}) do
packages[pkg] = true
end
end
function funcs._(feature)
return enabled_features[feature] ~= nil
end
function funcs.feature(feature, pkgs)
assert(
type(feature) == 'string',
'Incorrect use of feature(): pass a feature name without _ as first argument')
if enabled_features[feature] then
handled_features[feature] = true
add_pkgs(pkgs)
end
end
function funcs.when(cond, pkgs)
assert(
type(cond) == 'boolean',
'Incorrect use of when(): pass a locical expression of _-prefixed strings as first argument')
if cond then
add_pkgs(pkgs)
end
end
-- Evaluate the feature definition files
for _, file in ipairs(files) do
local f, err = loadfile(file)
if not f then
error('Failed to parse feature definition: ' .. err)
end
setfenv(f, funcs)
f()
end
-- Handle default packages
for _, feature in ipairs(features) do
if not handled_features[feature] then
packages['gluon-' .. feature] = true
end
end
return collect_keys(packages)
end
return M
#!/bin/bash --norc
set -e
shopt -s nullglob
nodefault() {
# We define a function instead of a variable, as variables could
# be predefined in the environment (in theory)
eval "gluon_feature_nodefault_$1() {
:
}"
}
packages() {
:
}
for f in package/features packages/*/features; do
. "$f"
done
# Shell variables can't contain minus signs, so we escape them
# using underscores (and also escape underscores to avoid mapping
# multiple inputs to the same output)
sanitize() {
local v="$1"
v="${v//_/_1}"
v="${v//-/_2}"
echo -n "$v"
}
vars=
for feature in $1; do
if [ "$(type -t gluon_feature_nodefault_${feature})" != 'function' ]; then
echo "gluon-${feature}"
fi
vars="$vars $(sanitize "$feature")=1"
done
nodefault() {
:
}
packages() {
local cond="$(sanitize "$1")"
shift
# We only allow variable names, parentheses and the operators: & | !
if [ "$(expr match "$cond" '.*[^A-Za-z0-9_()&|! ].*')" -gt 0 ]; then
exit 1
fi
# Let will return false when the result of the passed expression is 0,
# so we always add 1. This way false is only returned for syntax errors.
local ret="$(env -i $vars bash --norc -ec "let _result_='1+($cond)'; echo -n \"\$_result_\"" 2>/dev/null)"
case "$ret" in
2)
for pkg in "$@"; do
echo "$pkg"
done
;;
1)
;;
*)
exit 1
esac
}
for f in package/features packages/*/features; do
. "$f"
done
#!/bin/bash
#!/usr/bin/env bash
set -e
......@@ -11,7 +11,7 @@ rm -rf openwrt/feeds
rm -rf openwrt/package/feeds
(
echo 'src-link gluon_base ../../package'
echo "$GLUON_BASE_FEEDS"
for feed in $FEEDS; do
echo "src-link $feed ../../packages/$feed"
done
......
#!/bin/sh
check_command() {
which "$1" >/dev/null 2>&1
command -v "$1" >/dev/null
}
if check_command gnustat; then
......
local lib = dofile('scripts/target_lib.lua')
local env = lib.env
assert(env.GLUON_IMAGEDIR)
local target = arg[1]
lib.include(target)
local function strip(s)
return string.gsub(s, '\n$', '')
end
local function generate_line(model, dir, filename, filesize)
local exists = pcall(lib.exec, {'test', '-e', dir..'/'..filename})
if not exists then
return
end
local file256sum = strip(lib.exec_capture {'scripts/sha256sum.sh', dir..'/'..filename})
io.stdout:write(string.format('%s %s %s %s %s\n', model, env.GLUON_RELEASE, file256sum, filesize, filename))
end
local function generate(image)
local dir, filename = image:dest_name(image.image)
local exists = pcall(lib.exec, {'test', '-e', dir..'/'..filename})
if not exists then
return
end
local filesize = strip(lib.exec_capture {'scripts/filesize.sh', dir..'/'..filename})
generate_line(image.image, dir, filename, filesize)
for _, alias in ipairs(image.aliases) do
local aliasdir, aliasname = image:dest_name(alias)
generate_line(alias, aliasdir, aliasname, filesize)
end
for _, alias in ipairs(image.manifest_aliases) do
generate_line(alias, dir, filename, filesize)
end
end
for _, images in pairs(lib.images) do
for _, image in ipairs(images) do
if image.subdir == 'sysupgrade' then
generate(image)
end
end
end