| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This script is usually run unprivileged, so install fails to create a
temporary file while copying the finished database. Revert to using
cat, which can overwrite the existing file as it is usually owned by
the same user which is running the script.
Fixes: f62c1f3f8e91
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D46872
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a signal is trapped, the script continues after the trap code has
run, unless the trap code explicitly exits. In the particular case of
locate.updatedb, this is mostly harmless, except that the trap code is
executed twice (once for the signal and once when we reach the end of
the script), but it's still worth fixing.
Furthermore, install the trap as soon as we've created the temporary
directory, to minimize the window during which we can fail to clean up
after ourselves if interrupted.
While here, simplify the empty check at the end and make some minor
style tweaks.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D46475
|
| |
|
|
|
|
|
| |
This is a residual of the $FreeBSD$ removal.
MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was prompted by noticing that '/var/db/portsnap' still exists on
newly-installed machines.
With this change, all mentions of portsnap(8) in the tree are gone,
except for the historical note in the AUTHORS section of manpage
phttpget(8).
locate(1) will thus start indexing again '/var/db/portsnap' on machines
where this directory still exists, which may be a good way to push
administrators to delete it.
Reviewed by: cperciva
Approved by: emaste (mentor)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45023
|
| |
|
|
|
|
|
|
|
|
|
| |
We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
| |
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.
Sponsored by: Netflix
|
| |
|
|
|
|
|
| |
These do not use __FBSDID but instead use bare char arrays.
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D41957
|
| |
|
|
| |
Remove /^\.\\"\s*\$FreeBSD\$$\n/
|
| |
|
|
| |
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| |
|
|
|
|
|
|
|
| |
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix
|
| | |
|
| |
|
|
|
| |
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D39526
|
| |
|
|
|
|
|
|
| |
- BSD KNF: return is a native statement and we use
a space before the parenthesis
- remove superfluous empty lines
Reported by: jrtc27
|
| |
|
|
| |
Reported by: jrtc27
|
| |
|
|
|
|
|
| |
PR: 211501
Reported by: Oliver Peter
Reviewed by: Pau Amma
Differential Revision: https://reviews.freebsd.org/D34243
|
| |
|
|
| |
This simplifies the code, less casting is needed.
|
| |
|
|
|
| |
A lookup array is faster than a function with linear search.
The old function was not used for years - spring cleaning.
|
| |
|
|
| |
Reported by: jhb
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
The length has not changed and is 1024 chars (equals PATH_MAX).
PR: 201243
Submitted by: Willem Jan Withagen <wjw@digiware.nl>
|
| |
|
|
|
|
|
| |
An empty database is a database which does not contain any filenames.
It should not occur in practice but maybe in the case of an error.
echo | /usr/libexec/locate.mklocatedb > empty.db; locate -d empty.db -S
|
| |
|
|
| |
There are no measurable performance differences if registers are used or not.
|
| | |
|
| |
|
|
|
|
|
|
| |
For historical reasons, the integer is stored with an offset of plus 14.
That means, for a given max path length of 1024 the valid values
are -1009 .. 1037 and not -1023 .. 1023
PR: 201243
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
- stop on first error
- improve awk script: print the last two characters for bigram - not the second word
- remove unnecessary checks
- use mktemp
- refactor
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
By default BSD sort(1) uses 90% (or at least 50%?) of the available
main memory. That is good for performance for a single job, but not
for a shared OS. For a long running script the performance is less
important than the stability of the server. Also, if a server
with 64GB RAM starts swapping, the performance goes south and
hurts other running applications.
Note: this change does not affect the weekly cron job to
rebuild the locate database. The FreeBSD locate.updatedb
use the -presort option (find -s)
|
| |
|
|
|
| |
- this fix (harmless) integer overflows for very large partitions (>1PB)
- code cleanup
|
| |
|
|
|
|
| |
This fixes an integer overflow for very large partitions around 35 billion
filenames (>2PB). However, in an artificially worst case it may occurs
by only 17 mio filenames on a partition.
|
| | |
|
| |
|
|
| |
PR: 32686
|
| |
|
|
|
|
|
|
|
| |
We have the authorization from the University of California to remove
the advertising clause for a while, wosch@ who also hold a copyright
on this code also approved the relicensing
Approved by: wosch@
MFC after: 3 days
|
| |
|
|
|
|
| |
- simpler usage of mktemp(1)
- remove unnecessary checks
- documentation
|
| |
|
|
| |
A bigram may contain a space character, and we always need two characters.
|
| | |
|
| |
|
|
|
| |
I guess nobody used this in the last decade, and you can get
similar results with the time(1) command.
|
| |
|
|
|
|
| |
This fix (harmless) integer overflows for larger partitions (>2TB)
PR: 223023
|
| |
|
|
|
|
| |
Using locate -m on a database > 2GB should work now.
PR: 261277
|
| |
|
|
|
|
|
|
|
|
|
| |
While here, also fix a useless .Tn reported by mandoc.
PR: 251746
MFC after: 1 week
Sumbitted by: David Schlachter <fbsd-bugzilla@schlachter.ca>
Notes:
svn path=/head/; revision=368550
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Just a single variable declaration to extern and define elsewhere here,
myctype.
-fno-common will become a default in GCC10/LLVM11.
MFC after: 3 days
Notes:
svn path=/head/; revision=359425
|
| |
|
|
|
|
|
|
|
|
| |
This leverages CONFS to handle the install and purges an old comment.
Approved by: re (blanket, pkgbase), bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D17215
Notes:
svn path=/head/; revision=338758
|