]> git.pld-linux.org Git - packages/apparmor-parser.git/blob - apparmor-parser-avoid-pushpop.patch
- converted to UTF-8
[packages/apparmor-parser.git] / apparmor-parser-avoid-pushpop.patch
1 This patch fixes the apparmor parser tst Makefile to not use popd/pushd
2 bashisms which were in place to get around PWD not getting set
3 correctly. Instead, fix the simple.pl script to call pwd directly.
4 Based on feedback from PLD/Arkadiusz Miskiewicz <arekm@maven.pl>.
5 ---
6  parser/tst/Makefile  |    2 +-
7  parser/tst/simple.pl |    8 +++++---
8  2 files changed, 6 insertions(+), 4 deletions(-)
9
10 Index: trunk-forge/parser/tst/Makefile
11 ===================================================================
12 --- trunk-forge.orig/parser/tst/Makefile
13 +++ trunk-forge/parser/tst/Makefile
14 @@ -12,7 +12,7 @@ all: tests
15  
16  .PHONY: tests
17  tests: ../apparmor_parser
18 -       $(Q)pushd . && ${PROVE} ${PROVE_ARG} ${TESTS} && popd
19 +       $(Q)${PROVE} ${PROVE_ARG} ${TESTS}
20  
21  ../apparmor_parser:
22         make -C .. apparmor_parser
23 Index: trunk-forge/parser/tst/simple.pl
24 ===================================================================
25 --- trunk-forge.orig/parser/tst/simple.pl
26 +++ trunk-forge/parser/tst/simple.pl
27 @@ -13,6 +13,8 @@ $config{'parser'} = "/sbin/subdomain_par
28  $config{'profiledir'} = "./simple_tests/";
29  
30  my $help;
31 +my $pwd = `pwd`;
32 +chomp($pwd);
33  
34  GetOptions(
35    "help|h" => \$help,
36 @@ -32,13 +34,13 @@ read_config();
37  # Override config file profile location when passed on command line
38  if (@ARGV >= 1) {
39    $config{'profiledir'} = shift;
40 -} 
41 +}
42  
43  if ($config{'profiledir'} =~ /^\//) {
44    $config{'includedir'} = $config{'profiledir'};
45  } else {
46 -  $config{'includedir'} = "$ENV{'PWD'}/$config{'profiledir'}";
47 -} 
48 +  $config{'includedir'} = "$pwd/$config{'profiledir'}";
49 +}
50  
51  sub read_config {
52    my $which;
This page took 0.113032 seconds and 3 git commands to generate.