* [gentoo-commits] proj/hardened-patchset:master commit in: scripts/
@ 2011-05-26 10:26 Anthony G. Basile
0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2011-05-26 10:26 UTC (permalink / raw
To: gentoo-commits
commit: 2bab800162de53d9175070d4cfeccfb56034fc69
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu May 26 10:26:46 2011 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu May 26 10:26:46 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-patchset.git;a=commit;h=2bab8001
scripts/switchout.sh: remove old grsec patch, rename new, update README
---
scripts/switchout.sh | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/scripts/switchout.sh b/scripts/switchout.sh
new file mode 100755
index 0000000..a3ded86
--- /dev/null
+++ b/scripts/switchout.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+OLD="$(ls 4420_*)"
+NEW="$(ls grsecurity-*)"
+NNEW="4420_$NEW"
+
+sed -i -e "s:${OLD}:${NNEW}:" 0000_README
+
+mv $NEW $NNEW
+rm $OLD
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] proj/hardened-patchset:master commit in: scripts/
@ 2012-02-25 17:30 Anthony G. Basile
0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2012-02-25 17:30 UTC (permalink / raw
To: gentoo-commits
commit: ea6fb7ece921bdfa2cb1cf81f2879305bb61cd95
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 25 17:30:10 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Feb 25 17:30:10 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-patchset.git;a=commit;h=ea6fb7ec
scripts/just_fetch.pl: updated to match new grsec 2.9 pattern
---
scripts/just_fetch.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/just_fetch.pl b/scripts/just_fetch.pl
index bc9f921..663ddbc 100755
--- a/scripts/just_fetch.pl
+++ b/scripts/just_fetch.pl
@@ -6,7 +6,7 @@ use HTML::LinkExtor ;
my $upstream_url = "http://grsecurity.net/test.php" ;
-my $file_pattern = "grsecurity-2.2.2-";
+my $file_pattern = "grsecurity-";
my @allowed_suffixes = ( ".patch", ".patch.sig" ) ;
my %currently_available = () ;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] proj/hardened-patchset:master commit in: scripts/
@ 2012-03-26 10:53 Anthony G. Basile
0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2012-03-26 10:53 UTC (permalink / raw
To: gentoo-commits
commit: 0e4ebee6584bc6a423536531cb4bec5ca566f3a5
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 26 10:53:32 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Mar 26 10:53:32 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-patchset.git;a=commit;h=0e4ebee6
scripts/just_fetch.pl: fetch both stable and testing branches
---
scripts/just_fetch.pl | 59 ++++++++++++++++++++++++++----------------------
1 files changed, 32 insertions(+), 27 deletions(-)
diff --git a/scripts/just_fetch.pl b/scripts/just_fetch.pl
index 663ddbc..80e95ef 100755
--- a/scripts/just_fetch.pl
+++ b/scripts/just_fetch.pl
@@ -4,51 +4,58 @@ use strict ;
use LWP::Simple ; ;
use HTML::LinkExtor ;
-my $upstream_url = "http://grsecurity.net/test.php" ;
+my @upstream_url =
+(
+ "http://grsecurity.net/test.php",
+ "http://grsecurity.net/download_stable.php"
+) ;
my $file_pattern = "grsecurity-";
-my @allowed_suffixes = ( ".patch", ".patch.sig" ) ;
+my @allowed_suffixes = ( ".patch", ".patch.sig" ) ;
my %currently_available = () ;
sub sane
{
- my ( $name ) = @_ ;
+ my ( $name ) = @_ ;
- return 0 if $name eq "" ;
- return 0 if $name =~ / / ;
+ return 0 if $name eq "" ;
+ return 0 if $name =~ / / ;
- my $got_suffix = 0 ;
- foreach my $suffix ( @allowed_suffixes )
- {
- $got_suffix = 1 if $name =~ /$suffix$/ ;
- }
+ my $got_suffix = 0 ;
+ foreach my $suffix ( @allowed_suffixes )
+ {
+ $got_suffix = 1 if $name =~ /$suffix$/ ;
+ }
- return $got_suffix ;
+ return $got_suffix ;
}
sub get_currently_available
{
- my $parser ;
- my @links ;
+ my $parser ;
+ my @links ;
- $parser = HTML::LinkExtor->new( undef, $upstream_url ) ;
- $parser->parse( get( $upstream_url ) )->eof ;
+ foreach my $uurl ( @upstream_url )
+ {
+ $parser = HTML::LinkExtor->new( undef, $uurl ) ;
+ $parser->parse( get( $uurl ) )->eof ;
- @links = $parser->links ;
+ @links = $parser->links ;
- foreach my $ref ( @links )
- {
- my $file_url = ${$ref}[2] ;
- my $file_name = $file_url ;
- $file_name =~ s/^.*\/(.*)$/$1/ ;
+ foreach my $ref ( @links )
+ {
+ my $file_url = ${$ref}[2] ;
+ my $file_name = $file_url ;
+ $file_name =~ s/^.*\/(.*)$/$1/ ;
- next unless sane( $file_name ) ;
+ next unless sane( $file_name ) ;
- $currently_available{ $file_name } = $file_url ;
- }
+ $currently_available{ $file_name } = $file_url ;
+ }
+ }
}
@@ -71,7 +78,7 @@ sub download_newly_available
print "FAIL\n" ;
}
}
-
+
return $downloads ;
}
@@ -103,5 +110,3 @@ sub main
}
main() ;
-
-
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] proj/hardened-patchset:master commit in: scripts/
@ 2012-10-13 8:27 Anthony G. Basile
0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2012-10-13 8:27 UTC (permalink / raw
To: gentoo-commits
commit: 7f279c1cc8ce27966ba741bc4da0c2b9eb84ed9d
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 13 08:25:52 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Oct 13 08:25:52 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-patchset.git;a=commit;h=7f279c1c
scripts/just_fetch.pl: add gpg verification
---
scripts/just_fetch.pl | 62 +++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 53 insertions(+), 9 deletions(-)
diff --git a/scripts/just_fetch.pl b/scripts/just_fetch.pl
index 370be36..3e37e4b 100755
--- a/scripts/just_fetch.pl
+++ b/scripts/just_fetch.pl
@@ -11,10 +11,16 @@ my @upstream_url =
) ;
my $file_pattern = "grsecurity-";
-my @allowed_suffixes = ( ".patch", ".patch.sig" ) ;
+
+my @gpg_suffixes = ( ".patch.sig" ) ;
+my @allowed_suffixes = ( ".patch" ) ;
+push( @allowed_suffixes, @gpg_suffixes ) ;
my %currently_available = () ;
+my $GPG = "/usr/bin/gpg" ;
+my $RM = "/bin/rm";
+
sub sane
{
@@ -61,7 +67,7 @@ sub get_currently_available
sub download_newly_available
{
- my $downloads = "" ;
+ my @downloads = () ;
foreach my $file_name ( sort keys %currently_available )
{
@@ -71,7 +77,7 @@ sub download_newly_available
if ( getstore( $file_url, $file_name ) )
{
print "OK\n" ;
- $downloads .= "\t$file_name\n" ;
+ push(@downloads,$file_name);
}
else
{
@@ -79,18 +85,21 @@ sub download_newly_available
}
}
- return $downloads ;
+ return @downloads ;
}
sub print_successful_downloads
{
- my ( $downloads ) = @_ ;
+ my @downloads = @_ ;
- if( $downloads ne "" )
+ if( $#downloads >= 0 )
{
print "\n\nSuccessfully downloaded files from upstream:\n\n" ;
- print $downloads ;
+ foreach( @downloads )
+ {
+ print "\t". $_ . "\n" ;
+ }
print "\n\n" ;
}
else
@@ -100,13 +109,48 @@ sub print_successful_downloads
}
}
+sub test_gpg_sigs
+{
+ my @downloads = @_ ;
+
+ print "\n\nTesting gpg sigs ...\n\n" ;
+ foreach my $d ( @downloads )
+ {
+ foreach my $s ( @gpg_suffixes )
+ {
+ if( $d =~ /$s$/)
+ {
+ system("$GPG --verify $d >/dev/null 2>&1") ;
+ my $err = $? >> 8 ;
+ if( $err != 0 )
+ {
+ if( $err == 1 )
+ {
+ print "\tBAD signiture for $d\n" ;
+ }
+ else
+ {
+ print "\tUNKNOWN error for $d: $err\n" ;
+ }
+ }
+ else
+ {
+ print "\tGOOD signiture for $d\n" ;
+ system("$RM -f $d");
+ }
+ }
+ }
+ }
+}
+
sub main
{
get_currently_available() ;
- my $downloads = download_newly_available() ;
+ my @downloads = download_newly_available() ;
- print_successful_downloads( $downloads ) ;
+ print_successful_downloads( @downloads ) ;
+ test_gpg_sigs( @downloads ) ;
}
main() ;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] proj/hardened-patchset:master commit in: scripts/
@ 2016-04-21 7:16 Anthony G. Basile
0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2016-04-21 7:16 UTC (permalink / raw
To: gentoo-commits
commit: 6ecb7dc2bfedfa17230de1f574c0e31b7d2c04bc
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 21 07:16:09 2016 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 07:16:09 2016 +0000
URL: https://gitweb.gentoo.org/proj/hardened-patchset.git/commit/?id=6ecb7dc2
scripts/sendit.sh: helper to send patches to my dev space
scripts/sendit.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/sendit.sh b/scripts/sendit.sh
new file mode 100755
index 0000000..294fef8
--- /dev/null
+++ b/scripts/sendit.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+REMOTE=blueness@dev.gentoo.org
+RDIR=/home/blueness/public_html/hardened-sources/hardened-patches
+
+scp $1 ${REMOTE}:${RDIR}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] proj/hardened-patchset:master commit in: scripts/
@ 2016-05-14 13:28 Anthony G. Basile
0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2016-05-14 13:28 UTC (permalink / raw
To: gentoo-commits
commit: a54d71c671e6d944bc4c4c5d9f415e734f1494fc
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat May 14 13:29:41 2016 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat May 14 13:29:41 2016 +0000
URL: https://gitweb.gentoo.org/proj/hardened-patchset.git/commit/?id=a54d71c6
scripts: intelligently obtain KMAJOR
scripts/ap.patch.sh | 11 ++++-------
scripts/re.patch.sh | 11 ++++-------
2 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/scripts/ap.patch.sh b/scripts/ap.patch.sh
index 9ad2c24..19c4bb3 100755
--- a/scripts/ap.patch.sh
+++ b/scripts/ap.patch.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-SCRIPT="${0}"
-KMAJOR="${1}"
+SCRIPT="$0"
+KMAJOR="$1"
+DIRVER="$(basename $(pwd) | sed -e 's/linux-//' -e 's/-hardened.*//')"
+: ${KMAJOR:=$DIRVER}
PATCHSET="/root/hardened-patchset/${KMAJOR}"
-if [[ -z "${KMAJOR}" ]] ; then
- echo "Usage: ${SCRIPT} <kernel_major>"
- exit
-fi
-
if [[ ! -d ${PATCHSET} ]] ; then
echo "Patchset ${KMAJOR} doesn't exist"
exit
diff --git a/scripts/re.patch.sh b/scripts/re.patch.sh
index d1ac153..0daafc3 100755
--- a/scripts/re.patch.sh
+++ b/scripts/re.patch.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-SCRIPT="${0}"
-KMAJOR="${1}"
+SCRIPT="$0"
+KMAJOR="$1"
+DIRVER="$(basename $(pwd) | sed -e 's/linux-//' -e 's/-hardened.*//')"
+: ${KMAJOR:=$DIRVER}
PATCHSET="/root/hardened-patchset/${KMAJOR}"
-if [[ -z "${KMAJOR}" ]] ; then
- echo "Usage: ${SCRIPT} <kernel_major>"
- exit
-fi
-
if [[ ! -d ${PATCHSET} ]] ; then
echo "Patchset ${KMAJOR} doesn't exist"
exit
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-05-14 13:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-14 13:28 [gentoo-commits] proj/hardened-patchset:master commit in: scripts/ Anthony G. Basile
-- strict thread matches above, loose matches on Subject: below --
2016-04-21 7:16 Anthony G. Basile
2012-10-13 8:27 Anthony G. Basile
2012-03-26 10:53 Anthony G. Basile
2012-02-25 17:30 Anthony G. Basile
2011-05-26 10:26 Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox