Commit Graph

1269 Commits

Author SHA1 Message Date
Rene Ladan
0b673d6c5b cleanup: remove LEGAL and (support in) related tools.
LEGAL is badly maintained, LEGALlint notices quite a number of ports
which mismatch their line in LEGAL. The port itself is always leading.

* math/giacxcas: restrict RESTRICTED_FILES to giac_* only

Differential Revision: https://reviews.freebsd.org/D30061

Reviewed by:	portmgr (mat), dch, eadler, marcus
2021-06-11 15:45:10 +02:00
Rene Ladan
d674d5221b Tools/scripts/rmport: satisfy path check hook 2021-05-31 22:53:38 +02:00
Sofian Brabez
b1d5160c96 Tools/scripts/getpatch: Add SPDX identifier 2021-05-28 12:25:52 +00:00
Rene Ladan
d7d1f48512 Tools/scripts/rmport: differentiate exit codes. 2021-04-21 10:01:03 +02:00
Mathieu Arnold
c618b15017
tindex: Amend last commit a bit.
When you run `git log foo` foo can be, from git-log(1),
`[<revision range>] [[--] <path>...]`, so, may things.

- A "revision range" described by gitrevision(7) (don't got there unless
  you have a few hours, or already lost your sanity), which can be :
  * a commit hash,
  * a tag
  * a branch,
  * a ref name
  * a "describe output"
  * and many other ways to describe revisions
  * a range made by any of the above
- An existing path.

When it can't find any of those, git figures out that you meant
something else and made a typo, and exits.

If you really meant a path, you have to run `git log -- foo`. Then git
knows that you meant a path and only a path, it will then assume that
you knew what you meant, and will go look in the history.
2021-04-08 17:46:53 +02:00
Rene Ladan
ce196940be tindex: fix when INDEX fails and ports are deleted since the last success.
`git log' cannot get the log of a non-existent file, which the script uses
to obtain the last person who touched a port, so check if the file exists
before getting its log. This is similar to the Subversion case, which only
inspected changed files. The Git version still also checks added ports.

While here, call git in blame() using the predefined global variable.

Reported by:	antoine
2021-04-08 17:25:06 +02:00
Mathieu Arnold
0b1ee55426
Cleanup executable bits, prompted by 9e1d7c39a1. 2021-04-08 11:36:35 +02:00
Rene Ladan
578d48f1bc rmport: ready for git
- do not remove ports immediately but store them in a temporary file
  and remove them once the script has iterated over all ports to be
  removed. This prevents failed searches. The Subversion version
  used a temporary worktree so the main tree was unaffected.
- remove a "merge" from a question, we use rebase now.
- check if INDEX is readable and exit if not
2021-04-06 22:56:09 +02:00
Rene Ladan
6d299fa340 rmport: fix and simplify workflow
- gather information about the deleted port for the commit message
  before removing the port. I somehow missed that when testing the
  script.
- Instead of a temporary branch, just operate on the current branch
  and incorporate upstream changes with git pull --rebase. This
  prevents one from being stranded on a temporary branch if the
  script crashes and oblivates the need for a squash merge [1]

Suggested by:	mat [1]
2021-04-06 17:07:06 +02:00
Mathieu Arnold
135fdeebb9
all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
Mathieu Arnold
5d33e04596
framework: Remove $FreeBSD$
Where appropriate fiddle with a few other things.
2021-04-06 16:27:10 +02:00
Rene Ladan
297cd65581 Tools/scripts/rmport: convert workflow to git.
Do not push the final result automatically yet, unlike its previous
Subversion version.

Reviewed by:	emaste, mat, uqs
Approved by:	crees (maintainer, implicit)
Differential Revision:	https://reviews.freebsd.org/D29451
2021-04-06 12:39:47 +02:00
Rene Ladan
88917e9f46 Tools/scripts/chkversion.pl: remove svn compatibility
Differential Revision:	https://reviews.freebsd.org/D29451
2021-04-06 12:39:46 +02:00
Rene Ladan
ba2871e5f5 Tools/scripts/MOVEDlint.awk: remove svn compatibility
Reviewed by:	uqs
Differential Revision:	https://reviews.freebsd.org/D29451
2021-04-06 12:39:46 +02:00
Rene Ladan
68c56c1b4a Tools/scripts/search_lib_depends_and_bump.sh: remove svn in an echo
Differential Revision:	https://reviews.freebsd.org/D29451
2021-04-06 12:39:46 +02:00
Rene Ladan
a4c3b6f622 Remove two tools that are no longer useful with Git.
- mfh: this is replaced by 'git cherry-pick -x HASH'
- psvn: unlike svn, git has no per-file properties

Adjust README accordingly.

Differential Revision:	https://reviews.freebsd.org/D29451
With hat:	portmgr
2021-04-06 12:39:46 +02:00
Rene Ladan
88a97c4742 Tools/scripts/tindex: update for git
Reviewed by:	uqs
Differential Revision:	https://reviews.freebsd.org/D29451
2021-04-06 11:01:21 +02:00
Ed Maste
d47b0419db addport: Update contributor list file after Asciidoc conversion
Reviewed by:	crees
Approved by:	crees
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29476
2021-03-29 12:37:49 +00:00
Mathieu Arnold
780624a4cc You don't need approval to merge stuff. 2021-03-19 14:34:22 +00:00
Adam Weinberger
d5f31f3217 Tools/scripts/chkversion.pl: Git support
Git support is enabled by setting BLAME=yes (the SVN-specific
SVNBLAME=yes will be retired after transition). Mark all SVN
blocks to facilitate that eventuality.
2021-01-27 04:01:23 +00:00
Adam Weinberger
ec6ad647fa Tools/scripts/chkversion.pl: Fix and modernize
chkversion.pl was broken in a number of ways, including looking for CVS-style Id
lines in svn headers, not being updated for pkgng, etc.

This commit fixes those, and adopts some modern Perl practices.

NOTE: The $PKG_VERSION env var is renamed to $PKG. This should be a no-op for most
people (in the sense of it didn't work before, and the default should work for
pretty much everybody).
2021-01-26 16:50:39 +00:00
Adam Weinberger
ee8568c2d8 Tools/scripts/chkversion.pl: Guard against undefined values
There are a few places where undefined values can creep in. While
reinforcing defined values, use the defined-or (//) operator for
some visual simplification.
2021-01-24 18:42:29 +00:00
Antoine Brodin
d60fdf6e09 Update tindex for FreeBSD 14 2021-01-22 09:48:06 +00:00
Antoine Brodin
a93919ef03 tindex: reduce diff with what is used on portsindexbuild
Use git to update src.13
2021-01-18 10:24:13 +00:00
Matthias Andree
3fe84e82d4 bump_revision.pl: fix typo in help text. 2020-08-23 09:16:29 +00:00
Mateusz Piotrowski
4bd3723c02 Make argument parsing a bit more robust
Currently, when running mfh with a flag like --help the user gets
a confusing error message from expr(1) like the following:

> expr: illegal option -- -
> expr: usage: expr [-e] expression
>
> revision "--help" should be a number

This is not helpful. Instead, make sure that any arguments specified by the
user are handled properly by expr(1). This results in a much cleaner error
message:

> revision "--help" should be a number

Reviewed by:	mat
Approved by:	portmgr (mat)
Differential Revision:	https://reviews.freebsd.org/D25958
2020-08-05 15:03:01 +00:00
Mathieu Arnold
466a092fb2 Move script to a more appropriate location. 2020-08-03 13:53:06 +00:00
Ryan Steinmetz
178b0490c2 - Update wording/style on REINPLACE_CMD checks 2020-08-03 13:46:11 +00:00
Matthias Andree
243562ce09 bump_revision.pl: svn.freebsd.org -> repo.freebsd.org
and while here, fix a typo in the tmpdir's name.
2020-07-16 15:00:59 +00:00
Rene Ladan
ec55b02c40 Tools/scripts/patchtool: adjust for Python 3
PR:		246414
Submitted by:	ashish
Event:		July 2020 Bugathon
2020-07-11 20:26:01 +00:00
Matthias Andree
e3be41ec11 Tools/scripts/psvn: filter out svn status comments such as moved from/to.
Avoids spurious but harmless warnings.
2020-06-11 18:12:55 +00:00
Matthias Andree
f0711b4f79 Tools/scripts/mfh: revert accidental tab expansion
Regression from r537876

Reported by:	tijl@
Approved by:	portmgr@ (implicit, whitespace-only edit to fix a regression)
2020-06-04 21:01:37 +00:00
Matthias Andree
b0b59f3278 Tools/scripts/mfh: check out entire port directory even if touching only files/
- remove unused clean() function, trap does it
- fix race around mktemp/setting up rm trap
- rename filelist to dirlist so it matches its purpose
- move defaults up front to the script
- misc. minor edits

PR:		246336
Approved by:	portmgr (mat@)
Differential Revision:	https://reviews.freebsd.org/D24789
2020-06-04 09:19:50 +00:00
Matthias Andree
6028208dff Tools/scripts/bump_revision.pl: Abort when invalid option given. 2020-05-08 01:18:16 +00:00
Matthias Andree
6560980dd3 Tools/scripts/sed_checked.sh: Revert accidental unapproved commit. 2020-05-08 01:11:02 +00:00
Matthias Andree
106ebbd24e Tools/scripts/bump_revision.pl: chase option rename for getopts(). 2020-05-08 01:10:16 +00:00
Matthias Andree
db9d6d4735 Tools/scripts/bump_revision.pl: rename options to avoid astonishment.
-n was more or less some "force" option, rename to -f
-c was a dry-run option that's often called -n, rename accordingly.
2020-05-08 01:09:15 +00:00
Matthias Andree
f94f54f0cd bump_revision.pl: minor usability improvements
- use env -S to split the shebang line (RhToad@#bsdports)
- launder -p PORTSDIR argument and chdir to it so it doesn't matter
  which cwd bump_revision.pl is executed from
- if INDEX not found, hint the user that also his -p option might be off,
  because the -i INDEX option defaults to a file relative to -p PORTSDIR.
2020-04-19 00:36:04 +00:00
Matthias Andree
1240f9c8de Tools/scripts/sed_checked.sh: reword sed warning
The original wording was misleading and might have mistaken for
identical file names, but what is meant is that the sed run did not
introduce changes to the file's __content__. Reword accordingly.
2020-01-12 12:06:52 +00:00
Steve Wills
0a82a7c091 Add QA warning about useless REINPLACE_CMD
Reviewed by:	mat, bdrewery, tobik
Approved by:	mat
Differential Revision:	https://reviews.freebsd.org/D22174
2020-01-09 13:01:45 +00:00
Matthias Andree
c11266721a Tools/scripts/bump_revision.pl: Fix a few issues
- When using a non-default ports tree (-p PATH),
  strip that from the requisite origins, too.
- Fix the counters when multiple ports are given on the command line,
  i. e. we are bumping depends if more requisites are updated at once.
2020-01-05 02:05:23 +00:00
Matthias Andree
58e5e2482e Tools/scripts/bump_revision.pl: Fix typo in comment 2020-01-05 01:35:58 +00:00
Baptiste Daroussin
70aef9747e Update supported version of FreeBSD 2019-09-13 12:47:03 +00:00
Baptiste Daroussin
8675fe333a Stop documenting scripts which no longer lives in the tree
PR:		226606
Submitted by:	Sergey Akhmatov <sergey@akhmatov.ru>
2019-09-05 14:18:46 +00:00
Matthias Andree
08c566cdbf Fix typos/grammar.
Thanks for the review, Mark.

Reported by:	linimon@
2019-07-12 16:40:14 +00:00
Matthias Andree
d89e773d86 Update bump_revision.pl.
Key features:
- updated for SVN (the old version expected CVS)
- shallow mode to only bump direct dependencies (option -l)

PR:		192706
Submitted by:	mandree@ (new maintainer)
2019-07-12 16:07:44 +00:00
Gerald Pfeifer
2e782655b8 Transfer maintainership of this script to mandree@ based on conversations
we've been having after I was planning to EOL it last year and a nice
revamp of this script he has prepared.

Thank you for taking this over, and good luck, Matthias!

PR:		192706
2019-07-12 12:20:34 +00:00
Luca Pizzamiglio
81826cc2ef Tools/script/addport: Fix usage with multiple directories
PR:		238379
Submitted by:	me
Approved by:	crees@
2019-06-10 13:54:40 +00:00
Matthias Fechner
7d3b225247 Do not search only in subfolder editors but in all.
I forgot to remove this before I commited it.
2019-05-18 10:28:00 +00:00
Matthias Fechner
d747a7be63 Added a script to bump PORTREVISION if a library has changed a version like libgit2.
Just execute it in the root of you ports with e.g.
Tools/scripts/search_lib_depends_and_bump.sh devel/libgit2

This will search over all existing ports, check if they need to be bumped.
After all ports are bumped it triggers a portlint for each modified port.
The portlint loop continues till all errors and warnings are fixed.
Feel free to break this loop using CTRL+C.
2019-03-28 17:01:17 +00:00