Skip to content

Commit b967b28

Browse files
author
Derek Gonyeo
authored
Merge pull request #66 from dgonyeo/pull-from-upstream
Pull from upstream
2 parents f475763 + 568e6c4 commit b967b28

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+805
-488
lines changed

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
About this document:
2-
Last modified by Alex Smith, 2015-07-12
2+
Last modified by Alex Smith, 2015-09-04
33

44
Copyright (C) 2013 Alex Smith.
55

aimake

Lines changed: 72 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,17 @@ options. (Note that you don't need to, and shouldn't, include the B<-l>
291291
options that specify dependencies on libraries; aimake should figure those out
292292
by itself.)
293293

294+
=item YFLAGS
295+
296+
Command-line arguments to pass to C<yacc>. The default is to pass no options
297+
beyond the C<--defines=> that aimake always provides because it needs special
298+
handling (to place the files in the right place).
299+
300+
=item LEXFLAGS
301+
302+
Command-line arguments to pass to C<lex>. The default is to pass C<--warn>,
303+
which tells C<flex> (the default C<lex> implementation) to produce warnings.
304+
294305
=back
295306

296307
Note that this option is I<not> "sticky"; the value has to be given anew with
@@ -498,6 +509,17 @@ running; in these cases, you can specify C<--nonempty-directory> to suppress
498509
the sanity check. Before using this option, make absolutely sure you are
499510
running from the correct directory.
500511

512+
This option can also be used to permit installing to the source or build
513+
directory, a combination that is typically disallowed because it makes no
514+
sense and can lead to accidentally overwriting the source.
515+
516+
=item B<--no-sanity-checks>
517+
518+
Disables checks on permissions that are normally used to prevent yourself
519+
accidentally creating a file that can't be deleted. The most common reason to
520+
use this is if you're building as root because you're using a system or jail
521+
that has no regular users.
522+
501523
=item B<--install-only>
502524

503525
Don't run any rules but install rules, even if they're marked using
@@ -4034,7 +4056,7 @@ my ($opt_verbose, $opt_install, $opt_prefix, $opt_dump, @opt_warnings,
40344056
$opt_install_only, $opt_elevate_permissions, $opt_specific_exit_status,
40354057
@opt_with, @opt_without, @opt_with_default, $opt_nonempty_directory,
40364058
%opt_directory_overrides, $opt_nocr, @opt_rebuild, $opt_documentation,
4037-
$opt_gen_installer, %opt_var, $opt_profile,
4059+
$opt_gen_installer, %opt_var, $opt_profile, $opt_no_sanity_checks,
40384060
$opt_license, $opt_filelist, $opt_noperms, @opt_local_config); # options
40394061
my ($codeset, $text_layers, $binary_layers,
40404062
$utf8_layers, $ascii_layers); # encodings
@@ -5032,7 +5054,7 @@ sub calculate_installation_path {
50325054
# file in some cases. So when the file isn't an executable, we set the
50335055
# execute bit based on the read bit.
50345056

5035-
($octal & 0700) >= 0600 or
5057+
($octal & 0700) >= 0600 or $opt_no_sanity_checks or
50365058
die "Refusing to deny read or write permission to Administrators";
50375059
my $otherread = ($octal & 0004) ? 'yes' : 'KEYDEL';
50385060
my $otherwrite = ($octal & 0002) ? 'yes' : 'KEYDEL';
@@ -5206,7 +5228,8 @@ sub calculate_installation_path {
52065228
}
52075229

52085230
my @pi = parse_aipath $instdir;
5209-
$pi[0] eq 'spath' or die "Installing to build or source dir";
5231+
$pi[0] eq 'spath' or $opt_nonempty_directory or
5232+
die "Installing to build or source dir";
52105233

52115234
$filelist_feature_seen{$feature}{$id} or
52125235
$filelist_features{$feature} .=
@@ -8098,6 +8121,7 @@ GetOptions('verbose|v:+' => \$opt_verbose,
80988121
'destdir=s' => \$opt_prefix,
80998122
'filelist=s' => \$opt_filelist,
81008123
'gen-installer=s' => \$opt_gen_installer,
8124+
'no-sanity-checks' => \$opt_no_sanity_checks,
81018125
'natural-permissions' => \$opt_noperms,
81028126
'profile' => \$opt_profile,
81038127
'dump-status:s' => \$opt_dump,
@@ -8386,7 +8410,8 @@ $opt_install and $ipath = ospath2aipath($opt_install);
83868410
# Check effective UID for this, so that root can run a setuid-something-else
83878411
# install program, and so that we complain if someone installs aimake suid root
83888412
# (note: do not install aimake suid root).
8389-
if ($os_parsed ne 'MSWin32' && $> == 0 && !$opt_install_only) {
8413+
if ($os_parsed ne 'MSWin32' && $> == 0 && !$opt_install_only &&
8414+
!$opt_no_sanity_checks) {
83908415
die ("Please do not run aimake as root.\n" .
83918416
"To install as root, use '-S su' or '-S sudo' as appropriate.");
83928417
}
@@ -8511,7 +8536,7 @@ if ($installing && !defined $opt_elevate_permissions &&
85118536

85128537
# Complain and exit if -S or --install-only were specified, but we're
85138538
# nonetheless failing to install.
8514-
if ((defined $opt_elevate_permissions || defined $opt_install_only) &&
8539+
if ((defined $opt_elevate_permissions || $opt_install_only) &&
85158540
!$installing) {
85168541
die "Cannot obey the requested install options: -S and --install-only " .
85178542
"are useful only when installing, but the install path '" .
@@ -10773,6 +10798,46 @@ EOF
1077310798
verb => 'determined',
1077410799
},
1077510800

10801+
default_yflags => {
10802+
output => 'optionset:YFLAGS',
10803+
outdepends => [],
10804+
verb => 'determined',
10805+
low_message_priority => 1,
10806+
command_line_override => 'YFLAGS',
10807+
},
10808+
default_am_yflags => {
10809+
output => 'optionset:AM_YFLAGS',
10810+
outdepends => [],
10811+
verb => 'determined',
10812+
low_message_priority => 1,
10813+
command_line_override => 'AM_YFLAGS',
10814+
},
10815+
yflags_includes_am_yflags => {
10816+
object => 'optionset:YFLAGS',
10817+
depends => 'optionset:AM_YFLAGS',
10818+
verb => 'determined',
10819+
},
10820+
10821+
default_lexflags => {
10822+
output => 'optionset:LEXFLAGS',
10823+
outdepends => ['optstring:--warn'],
10824+
verb => 'determined',
10825+
low_message_priority => 1,
10826+
command_line_override => 'LEXFLAGS',
10827+
},
10828+
default_am_lexflags => {
10829+
output => 'optionset:AM_LEXFLAGS',
10830+
outdepends => [],
10831+
verb => 'determined',
10832+
low_message_priority => 1,
10833+
command_line_override => 'AM_LEXFLAGS',
10834+
},
10835+
lexflags_includes_am_lexflags => {
10836+
object => 'optionset:LEXFLAGS',
10837+
depends => 'optionset:AM_LEXFLAGS',
10838+
verb => 'determined',
10839+
},
10840+
1077610841
cflags_includes_cppflags => {
1077710842
object => 'optionset:CFLAGS',
1077810843
depends => 'optionset:CPPFLAGS',
@@ -11879,7 +11944,7 @@ EOF
1187911944
# traditional lex's nasty habit of using hardcoded filenames.
1188011945
lex_tool => {
1188111946
output => 'tool:lex',
11882-
outdepends => ['cmd:flex'],
11947+
outdepends => ['cmd:flex', 'optionset:LEXFLAGS'],
1188311948
verb => 'found',
1188411949
},
1188511950
compile_lex => {
@@ -11894,7 +11959,7 @@ EOF
1189411959

1189511960
yacc_tool => {
1189611961
output => 'tool:yacc',
11897-
outdepends => ['cmd:bison'],
11962+
outdepends => ['cmd:bison', 'optionset:YFLAGS'],
1189811963
verb => 'found',
1189911964
},
1190011965
compile_yacc => {

doc/changelog.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
About this document:
2-
Last modified by Alex Smith, 2015-04-05
2+
Last modified by Alex Smith, 2016-03-08
33

44
Copyright (C) 2013 Alex Smith.
55

@@ -1326,7 +1326,7 @@ now feels the ground for items. (4, f394be6, 1c76f8f)
13261326
it. (Ace, cea2284)
13271327

13281328
`h`, etc.: Walking into an always-peaceful monster will chat to them rather
1329-
than atacking them, unless an `F` prefix is given. (Ace, 361ed66)
1329+
than attacking them, unless an `F` prefix is given. (Ace, 361ed66)
13301330

13311331
`h`, etc.: What these commands do is now controllable via the `movecommand`
13321332
option, which offers a range of possibilities, such as the `standard`

0 commit comments

Comments
 (0)