Commit graph

435 commits

Author SHA1 Message Date
Lexi Winter dbd0366f34 package: move lpr into its own package
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1171
2024-04-19 16:54:31 -06:00
Warner Losh 4d65a7c695 usr.sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:01 -07:00
Warner Losh 0b8224d1cc Remove copyright strings ifdef'd out
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
2023-11-26 22:23:58 -07:00
Warner Losh 8a7b612037 usr.sbin: Remove ancient SCCS tags.
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
2023-11-26 22:23:56 -07:00
John Baldwin e4c68414d0 lpr: Remove now unused fallback definition for __FBSDID
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41956
2023-09-25 07:50:33 -07:00
Warner Losh b2c76c41be Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:15 -06:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Warner Losh 42b388439b Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:23 -06:00
Warner Losh b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Elyes Haouas 05d85d7781 lpr: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:39 -06:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
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
2023-05-12 10:44:03 -06:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Elyes Haouas 365348f66a lpr: Remove trailing semicolon
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/654
2023-03-14 20:39:34 -06:00
Elyes Haouas 1def31df76 lpr: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 08:01:28 -07:00
Jens Schweikhardt 20f68c5f2d Indicate that xrefs to *roff,tbl,eqn et al are found in ports/textproc/groff. 2022-08-15 22:15:18 +02:00
Brooks Davis a812a5cacb lpr: remove a.out binary detection
Since the first unattributed commit in 1981, lpr has attempted to
prevent users from printing executables (and in earlier versions
archives). Archive detection was lost in 1992 when lpr gained a
dependency on a.out.h. No corresponding support was added for ELF files
with the full transiation to ELF in 1998, but a.out support has been
dragged forward to and contaminated platforms that never supported
a.out.

While this feature isn't unuseful, preventing the printing of
a single file format we stopped producing ~20 years ago isn't worth
the costs (however minimal).

Reviewed by:	gad, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D34901
2022-04-15 20:04:41 +01:00
Gordon Bergling 840d72371b lpr(1): Fix a typo in a source code comment
-s /debuging/debugging/

MFC after:	3 days
2021-11-19 20:04:09 +01:00
Gordon Bergling 04389c855e Fix some common typos in comments
- s/configuraiton/configuration/
- s/specifed/specified/
- s/compatiblity/compatibility/

MFC after:	5 days
2021-08-08 10:16:06 +02:00
Ceri Davies c1a148873d sys/*/conf/*, docs: fix links to handbook
While here, fix all links to older en_US.ISO8859-1 documentation
in the src/ tree.

PR:             255026
Reported by:    Michael Büker <freebsd@michael-bueker.de>
Reviewed by:    dbaio
Approved by:    blackend (mentor), re (gjb)
MFC after:      10 days
Differential Revision: https://reviews.freebsd.org/D30265
2021-05-20 09:27:10 +01:00
Chris Rees cebcca89f1 lpd: Update SYNOPSIS with new flag
Reported by:	0mp
2021-04-15 13:27:09 +01:00
Chris Rees 56b0f5f360 lpd.8: Chase Dd-- took old value when merging 2021-04-15 12:40:16 +01:00
Chris Rees 3c63660670 lpd: Add -F flag to prevent daemonizing
This is necessary for use with supervision, e.g. runit.

I chose -F simply because that is what the folks at LPRng use.

Approved by:		pfg, gad, ngie
Differential Revision:	https://reviews.freebsd.org/D29566
2021-04-15 12:34:01 +01:00
Gordon Bergling c07aa0a587 lpd(8): Mention the author of a paper in the SEE ALSO section
Obtained from:	OpenBSD
MFC after:	1 week
2021-04-09 11:29:18 +02:00
Enji Cooper a6e9cd258c Fix clang -Wcast-qual issues
Remove unnecessary `char*` casting for arguments passed to `cget*(3)`, and
deconst `_PATH_PRINTCAP` before passing it to `cget*` via the `printcapdb`
variable.

This unblocks ^/projects/runtime-coverage-v2 from building cleanly on
universe13a.freebsd.org. I suspect the issue was introduced through some
changes to `bsd.*.mk` inclusion on the branch, which I will continue to
investigate/isolate.

MFC after:	1 week
Tested with:	clang 8 (arm64)
2019-05-04 02:09:30 +00:00
Brad Davis 80994f8119 Move hosts.lpd and printcap to usr.sbin/lpr/lpd/
This leverages CONFS to handle the install

Approved by:	re (blanket, pkgbase), bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D17238
2018-09-20 09:21:05 +00:00
Garance A Drosehn 02e8b7b2e7 Fix the resource leak of a 'FILE *' which could happen in routine
ctl_readcf() if a call to malloc failed.

PR:		204955
Reported by:	David Binderman
2018-03-12 01:41:16 +00:00
Pedro F. Giffuni 1de7b4b805 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:37:16 +00:00
Pedro F. Giffuni 8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Pedro F. Giffuni df57947f08 spdx: initial adoption of licensing ID tags.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

Initially, only tag files that use BSD 4-Clause "Original" license.

RelNotes:	yes
Differential Revision:	https://reviews.freebsd.org/D13133
2017-11-18 14:26:50 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Sean Bruno 4c26331158 Quiesce clang warning while building lpc.
usr.sbin/lpr/lpc/lpc.c
  Warning
    passing 'char *[20]' to parameter of type 'const char **' discards
    qualifiers in nested pointer types
    [-Wincompatible-pointer-types-discards-qualifiers]
  Fix:
     Explicitly cast the variable "margv" to const char ** only for it's
     use as a parameter to suppress the error

Submitted by:	Aaron Prieger <aprieger@llnw.com>
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D11019
2017-06-16 20:00:39 +00:00
Garance A Drosehn e550d65c85 Fixes to chkprintcap:
- Check the return from a call to malloc() in skim_printcap(), and
  return a NULL if that fails.
- Fix a small memory leak in main() that happens if skim_printcap()
  returns an error, including the new error-return of NULL.

Submitted by:	Tom Rix <trix@juniper.net>
Reviewed by:	pfg, ngie
MFC after:	4 weeks
Sponsored by:	Dell EMC Isilon, Juniper
Differential Revision:	D9954, D9982
2017-03-20 22:36:28 +00:00
Pedro F. Giffuni 4fd444b072 lpr(1): small bounds check with reallocarray(3).
While here plug a memory leak upon error and postpose a multiplication
until after reallocation has succeded.

Hinted partially by:	OpenBSD
Reviewed by:		gad
MFC after:		2 weeks
2017-03-07 19:30:22 +00:00
Enji Cooper 7fec199b3b Simplify idioms in usr.sbin/lpr Makefiles
Use :H instead of .CURDIR-relative pathing to simplify make output, etc.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-01 05:14:45 +00:00
Warner Losh fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Baptiste Daroussin a9c48188b8 Rename getline with get_line to avoid collision with getline(3)
When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard
2016-05-10 11:17:19 +00:00
Baptiste Daroussin f03ef8405b Rename getline with get_line to avoid collision with getline(3)
When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard
2016-05-10 11:12:31 +00:00
Marcelo Araujo eff97b5e63 Use MIN macro from sys/param.h.
MFC after:	2 weeks.
2016-05-02 01:45:52 +00:00
Pedro F. Giffuni b5635ba0a2 usr.sbin: minor spelling fixes on comments.
No functional change.
2016-05-01 16:41:25 +00:00
Garance A Drosehn 820a9567ed Remove a variable and three lines of code which I should have removed as
part of revision 98776 back on June 24/2002.  Noticed by pfg@ trying
coccinelle for checking code.

MFC after:	3 weeks
2016-04-25 20:58:54 +00:00
Pedro F. Giffuni bc17d12da3 lpr: replace 0 with NULL for pointers.
Found with devel/coccinelle.

Reviewed by:	gad
2016-04-10 23:47:40 +00:00
Bryan Drewery 7fdd45b091 Use LIBEXECDIR for /usr/libexec.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-11-26 01:14:40 +00:00
Bryan Drewery 595fe15108 Add more SUBDIR_PARALLEL.
MFC after:	3 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 14:13:51 +00:00
Bryan Drewery ec766071e3 META_MODE: Remove DEP_MACHINE from Makefile.depend files.
This has not been needed since r246865 in projects/bmake.

Sponsored by:	EMC / Isilon Storage Division
2015-09-25 19:44:01 +00:00
Bryan Drewery 54c7d75a06 META_MODE: Remove DEP_RELDIR from Makefile.depend files.
This has not been needed since r284171 in projects/bmake.

Sponsored by:	EMC / Isilon Storage Division
2015-09-25 19:26:08 +00:00
Simon J. Gerraty ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty 44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty 98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00