-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
74 changed files
with
22,798 additions
and
2,248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.*.sw? | ||
tags | ||
*.o | ||
rh | ||
*.html | ||
*.1 | ||
*.5 | ||
*diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Upstream-Name: rawhide | ||
Upstream-Contact: raf <[email protected]> | ||
Source: https://raf.org/rawhide | ||
|
||
Files: * | ||
Copyright: 1990 Ken Stauffer, 2022 raf <[email protected]> | ||
License: GPL-3.0-or-later | ||
|
||
Files: rhstr.c | ||
Copyright: 1990 Ken Stauffer, 2022 raf <[email protected]> | ||
1998 Todd C. Miller <[email protected]> | ||
License: GPL-3.0-or-later and BSD-3-Clause | ||
|
||
Files: rh.1.pod | ||
Copyright: 1990 Ken Stauffer, 2022 raf <[email protected]> | ||
1990-2022 Free Software Foundation, Inc | ||
License: GPL-3.0-or-later | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
3.0 (20220330) | ||
|
||
- Update (after 32 years!) to compile and work again (ISO/IEC C, POSIX) | ||
- Remove internal getopt/glob_match, replacing with standard getopt/fnmatch | ||
- Remove MANIFEST (empty) | ||
- Remove META (only relevant for the original comp.source.unix release) | ||
- Add LICENSE COPYING CHANGELOG CODE_OF_CONDUCT.md | ||
- Change -h option so it terminates (was documented behaviour but still wrong) | ||
- Fix insecure multiple potential buffer overruns | ||
- Fix insecure -x shell command injection | ||
- Improve syntax error messages (more informative) | ||
- Increase static code/data/stack space by three orders of magnitude | ||
- Increase identifier length limit to 200 | ||
- Add @groupname and @@ expression notation | ||
- Add support for underscore in function/parameter names | ||
- Add support for dot, dash, and underscore in user/group names | ||
- Add support for ~/.rhrc.d/*, /etc/rawhide.conf, and /etc/rawhide.conf.d/* | ||
- Add -N and -n options to suppress system-wide config and user-specific config | ||
- Add // and # single-line comment styles | ||
- Add built-in stat field symbols: blksize blocks | ||
- Change built-in symbols: hours/days/weeks to hour/day/week | ||
- Add built-in number symbols: second minute month year | ||
- Change to default "-e 1" expression to match everything (rather than stdin) | ||
- Add "-f -" convention to read from stdin (now that it's no longer the default) | ||
- Add error reporting during directory traversal (stderr and exit status) | ||
- Interpret two-digit years as being in the current century | ||
- Add built-in number symbols: IRWXU IRUSR IWUSR IXUSR | ||
- Add built-in number symbols: IRWXG IRGRP IWGRP IXGRP | ||
- Add built-in number symbols: IRWXO IROTH IWOTH IXOTH | ||
- Add /etc/rawhide.conf "standard" library (nice names for things, handy functions) | ||
- Remove example rhrc (subsumed by /etc/rawhide.conf) | ||
- Change built-in symbol NOW to now (not backwards compatible!) NOW { now } | ||
- Make "return" and ";" optional in functions (always redundant, more compact) | ||
- Make rh exit with failure status if any -x command exits with failure status | ||
- Add many ruthless tests | ||
- Add -V (version) option | ||
- Add --help and --version options | ||
- Add -0 option (nul-separated output) for use with xargs -0 | ||
- Make "-e" optional for lean flexible cmdline (expr can appear among dir args) | ||
- Fix built-in prune over-pruning (wasn't reset until after siblings done) | ||
- Add built-in symbol: exit (terminate immediately - usage: 'expr ? exit : 0') | ||
- Make "return" a keyword token rather than a built-in symbol | ||
- Fix "glob" string tokeniser to handle "\"" | ||
- Fix inaccurate [yyyy/mm/dd] to time_t conversion (use standard mktime) | ||
- Add support for datetimes: [yyyy/mm/dd hh:mm:ss] (ss and mm:ss are optional) | ||
- Make "*" match leading dot (POSIX/GNU find compatible, but not Solaris find) | ||
- Test on Debian, Ubuntu, Fedora, FreeBSD, OpenBSD, NetBSD, macOS, Solaris, Cygwin | ||
- Move some functions from rh.c/rhparse.c to more appropriate modules | ||
- Fix crash on attempt to divide by zero (and modulo) | ||
- Add support for doors (IFDOOR) on Solaris | ||
- Add hexadecimal number literals (0xff) | ||
- Add options -m # (minimum depth) and -M # (maximum depth) | ||
- Fix/Add short-circuit semantics for || and && operators (for "expr && exit") | ||
- Add built-in symbols: nouser nogroup | ||
- Minimize the number of race conditions during traversal (fstatat/openat/fdopendir) | ||
- Add built-in symbols: readable writable executable (faccessat/access) | ||
- Add -X 'cmd' option (like -x with safe cd for minimal race conditions) | ||
- Automatically remove cwd and other non-absolute dirs from $PATH when -X is used | ||
- Add configure script to adjust binary/config/manpage installation locations | ||
- Gzip manual entries when installing on systems that prefer it | ||
- Add -? 'spec' option (debug: cmdline parser traversal exec all extra) | ||
- Add "/path".mtime syntax for comparison against reference files | ||
- Add -D option (depth-first traversal) | ||
- Add -U option (unlink) | ||
- Add heuristic to better identify expr/path when no -e and path doesn't exist | ||
- Make -l (without -v) more like ls -l (add nlink username groupname mtime) | ||
- Add output column options: -d -i -B -s -g -o -a -u -c (mostly ls-compatible) | ||
- Make -v option include all the output columns | ||
- Add other output format options: -H -I -T -# | ||
- Add name output format options: -Q -E -b -q -p -t -F (mostly ls-compatible) | ||
- Change -H and -I to round up (ls-compatible output) | ||
- Add -HH and -II to round half up (more accurate) | ||
- Remove rh.man (troff) in favour of POD format (for html and troff output) | ||
- Re-document everything: README.md rh.1.pod rawhide.conf.5.pod | ||
- Add built-in symbol: today (last midnight local time) | ||
- Add "pattern".modifier syntax for glob modifiers: .i .path .ipath .link .ilink | ||
- Add -1 option (single filesystem - don't cross filesystem boundaries) | ||
- Add built-ins for symlink targets: texists tdev tino tmode tnlink tuid tgid ... | ||
- Add -y option (follow symlinks on the cmdline and in reference files) | ||
- Add -Y option (follow symlinks encountered while searching as well) | ||
- Add $RAWHIDE_REPORT_BROKEN_SYMLINKS to treat broken symlinks as an error | ||
- Add -S option (space column: blocks * 512) | ||
- Add -L 'format' option (output details in user-supplied printf-like format) | ||
- Add defense against terminal escape injection for stdout/stderr (but not debug) | ||
- Add pcre2 pattern modifiers: .re .repath .relink .rei .reipath .reilink | ||
- Add access control list (ACL) pattern modifiers: .acl .iacl .reacl .reiacl | ||
- Add -L %z format (access control list) | ||
- Add extended attribute (EA) pattern modifiers: .ea .iea .reea .reiea | ||
- Add -L %x format (extended attributes) | ||
- Add -L %Z format (selinux context - via ea (not via libselinux)) | ||
- Add "cmd".sh "pattern" modifier syntax to execute shell commands via system() | ||
- Add empty string "".mtime syntax to concisely refer to the last reference file path | ||
- Change size of (readable) directories to num of entries (excluding . and ..) (so empty() works) | ||
- Add decimal token size/scale units suffixes: K M G T P E k m g t p e | ||
- Replace "long" with "long long" everywhere (sorry 1990s!) to get 64-bit numbers on 32-bit systems | ||
- Add memory/file descriptor checking (valgrind): make test with VALGRIND=1 or vg=1 (30s -> 40m) | ||
- Change size of readable directories for -l and -L %s to the number of entries (excluding . and ..) | ||
- Add ACL/EA indicator to -l type/perm column: acl='+' ea='@' both='*' neither=' ' | ||
- Change prune to return 1 not 0 (but make expr 0 overall) so (bad && prune || good) is now possible | ||
- "Fix" %S (for -x/-X/"cmd".sh) so it's "/" for / (was empty) | ||
- Add configure --enable-ndebug --disable-ndebug (stripped binary 10% (12K) smaller with NDEBUG) | ||
- Add RAWHIDE_COLUMN_WIDTH_* env vars for people who don't like columns that widen on demand | ||
- Add configure --static=SIZE ("large" is default, "small" is 10%, "tiny" is 1%, all fine choices) | ||
- Add -L %X format (ACL/EA indicator like in rh -l) | ||
- Add built-in field symbols: major minor rmajor rminor tmajor tminor trmajor trminor | ||
- Add reference file fields: .major .minor .rmajor .rminor | ||
- Add -L %B (blksize) %E (rdev) %r (rdev minor) %R (rdev major) %v (dev minor) %V (dev major) | ||
- Add configure --disable-major (just for preparing the source distribution) | ||
- Add $RAWHIDE_CONFIG and $RAWHIDE_RC (not just for testing, and/but not for root) | ||
- Add configure --enable-mangz --disable-mangz (just so distribution can default to non-gzipped) | ||
- Add to ACL/EA indicator '.' for selinux (if nothing more interesting) (-l and -L %X) | ||
- Add LICENSES/* and .reuse/dep5 (REUSE 3.0 compliant) | ||
- Add built-in symbol: trim (like prune but doesn't prevent the current candidate from matching) | ||
- Change -r to mean -m1 -M1 (was originally just -M1, this is much better) | ||
- Fix -U combined with -y/-Y and symlinks to directories (was attempting rmdir for symlink) | ||
- Add $RAWHIDE_DONT_REPORT_CYCLES to suppress reporting filesystem cycles | ||
- Add gcov test coverage measurement (96.20% overall - remainder manually scrutinized) | ||
- Add configure --enable-gcov --disable-gcov | ||
- Add gcov_summary | ||
- Fix defense against terminal escape injection for stderr when stdout piped to a non-terminal | ||
- Treat "" that contains / as implicit "".path (so that "/" just works) | ||
- Add support for non-ASCII characters (UTF-8/ISO-8859-*) in function/parameter/user/group names | ||
- Don't \ quote non-ASCII characters (UTF-8/ISO-8859-*) in shell command %s %S interpolation | ||
- Add -L %j format (JSON) | ||
- Fix handling of SIGINT/SIGQUIT in -x/-X/"cmd".sh sub-processes (didn't terminate rh as well) | ||
- Add configure --disable-cc-other (just for preparing the source distribution) | ||
- Add make help | ||
- Add make gcov | ||
- Add samples/{README,.rh.sh,brevity.rh,rawhide.conf-tiny} | ||
- Add /etc/rawhide.conf.d/attributes to reserve some identifiers for the next version | ||
|
||
2.0 (19900218) | ||
|
||
- Initial commit (from comp.sources.unix by Ken Stauffer) | ||
CREDITS | ||
Ken Stauffer - Original author. | ||
Guy Harris - Corrected many portability problems. | ||
David MacKenzie - Manual revisions. Added getopt and glob matching. | ||
Norm Hutchinson - Fixed ungetit(). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
|
||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
We as members, contributors, and leaders pledge to make participation in our | ||
community a harassment-free experience for everyone, regardless of age, body | ||
size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
identity and expression, level of experience, education, socio-economic status, | ||
nationality, personal appearance, race, caste, color, religion, or sexual identity | ||
and orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, | ||
diverse, inclusive, and healthy community. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment for our | ||
community include: | ||
|
||
* Demonstrating empathy and kindness toward other people | ||
* Being respectful of differing opinions, viewpoints, and experiences | ||
* Giving and gracefully accepting constructive feedback | ||
* Accepting responsibility and apologizing to those affected by our mistakes, | ||
and learning from the experience | ||
* Focusing on what is best not just for us as individuals, but for the | ||
overall community | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
* The use of sexualized language or imagery, and sexual attention or | ||
advances of any kind | ||
* Trolling, insulting or derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or email | ||
address, without their explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Enforcement Responsibilities | ||
|
||
Community leaders are responsible for clarifying and enforcing our standards of | ||
acceptable behavior and will take appropriate and fair corrective action in | ||
response to any behavior that they deem inappropriate, threatening, offensive, | ||
or harmful. | ||
|
||
Community leaders have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions that are | ||
not aligned to this Code of Conduct, and will communicate reasons for moderation | ||
decisions when appropriate. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all community spaces, and also applies when | ||
an individual is officially representing the community in public spaces. | ||
Examples of representing our community include using an official e-mail address, | ||
posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported to the community leaders responsible for enforcement at [email protected]. | ||
All complaints will be reviewed and investigated promptly and fairly. | ||
|
||
All community leaders are obligated to respect the privacy and security of the | ||
reporter of any incident. | ||
|
||
## Enforcement Guidelines | ||
|
||
Community leaders will follow these Community Impact Guidelines in determining | ||
the consequences for any action they deem in violation of this Code of Conduct: | ||
|
||
### 1. Correction | ||
|
||
**Community Impact**: Use of inappropriate language or other behavior deemed | ||
unprofessional or unwelcome in the community. | ||
|
||
**Consequence**: A private, written warning from community leaders, providing | ||
clarity around the nature of the violation and an explanation of why the | ||
behavior was inappropriate. A public apology may be requested. | ||
|
||
### 2. Warning | ||
|
||
**Community Impact**: A violation through a single incident or series | ||
of actions. | ||
|
||
**Consequence**: A warning with consequences for continued behavior. No | ||
interaction with the people involved, including unsolicited interaction with | ||
those enforcing the Code of Conduct, for a specified period of time. This | ||
includes avoiding interactions in community spaces as well as external channels | ||
like social media. Violating these terms may lead to a temporary or | ||
permanent ban. | ||
|
||
### 3. Temporary Ban | ||
|
||
**Community Impact**: A serious violation of community standards, including | ||
sustained inappropriate behavior. | ||
|
||
**Consequence**: A temporary ban from any sort of interaction or public | ||
communication with the community for a specified period of time. No public or | ||
private interaction with the people involved, including unsolicited interaction | ||
with those enforcing the Code of Conduct, is allowed during this period. | ||
Violating these terms may lead to a permanent ban. | ||
|
||
### 4. Permanent Ban | ||
|
||
**Community Impact**: Demonstrating a pattern of violation of community | ||
standards, including sustained inappropriate behavior, harassment of an | ||
individual, or aggression toward or disparagement of classes of individuals. | ||
|
||
**Consequence**: A permanent ban from any sort of public interaction within | ||
the community. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 2.1, available at | ||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. | ||
|
||
Community Impact Guidelines were inspired by | ||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. | ||
|
||
For answers to common questions about this code of conduct, see the FAQ at | ||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available | ||
at [https://www.contributor-covenant.org/translations][translations]. | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html | ||
[Mozilla CoC]: https://github.com/mozilla/diversity | ||
[FAQ]: https://www.contributor-covenant.org/faq | ||
[translations]: https://www.contributor-covenant.org/translations | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
COPYING | ||
======= | ||
rawhide - find files using pretty C expressions | ||
https://raf.org/rawhide | ||
https://github.com/raforg/rawhide | ||
|
||
Copyright (C) 1990 Ken Stauffer, 2022 raf <[email protected]> | ||
|
||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, see <https://www.gnu.org/licenses/>. | ||
|
||
$OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp $ | ||
$OpenBSD: strlcat.c,v 1.5 2001/01/13 16:17:24 millert Exp $ | ||
Copyright (c) 1998 Todd C. Miller <[email protected]> | ||
|
||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions | ||
are met: | ||
1. Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
3. The name of the author may not be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL | ||
THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | ||
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
URL: https://raf.org/rawhide | ||
GIT: https://github.com/raforg/rawhide | ||
Date: 20220330 | ||
Authors: 1990 Ken Stauffer, 2022 raf <[email protected]> | ||
|
Oops, something went wrong.