53 Commits

Author SHA1 Message Date
Carlo Strub
4248ebfe69 Tools/scripts: Small fix in README
distclean.sh is not using md5 but sha256
2025-08-31 21:59:34 +02:00
Rene Ladan
078b5f9227 Tools/scripts/README: remove gnomedepends
The script itself was removed in commit 4dfa8c4b4524325509ba9e2484f49631a4c1902e
2025-08-16 12:52:58 +02:00
Rene Ladan
4c58862f6c Tools/scripts/README: add missing extension to some entries 2025-08-16 12:52:58 +02:00
Charlie Li
67de7ad43c
strip_RECORD.py: move to Mk/Scripts
Requested by: mat
2023-03-09 06:18:17 -05:00
Charlie Li
1e9c9994ae
Tools/scripts: add strip_RECORD.py
Strips/prints only the first column of a Python wheel's RECORD file.
To be used as part of the USE_PYTHON=autoplist process.
2023-03-08 22:20:24 -05:00
Rene Ladan
b74ed0f79d Mk: remove ancient 'make update-patches' target.
People should use 'make makepatch' instead which creates patches
with the expected filename and header.

Differential Revision: https://reviews.freebsd.org/D36767
2022-09-28 09:48:20 +02:00
Rene Ladan
bec21c95d9 Tools/scripts: remove addport
The addport script is no longer useful since git has been introduced in
April 2021, just use plain "git add" instead. Do not forget to add the
port name to the category Makefile and mention the contributor in the
contributors article in the doc repository.

Differential Revision: https://reviews.freebsd.org/D35104
2022-05-09 21:06:06 +02:00
Stefan Eßer
59c30220dc Tools/scripts: Add port_conflicts_check.lua
Add a script to check the CONFLICTS and CONFLICTS_INSTALL parameters
of ports for completeness and correctness.

This script uses the "hidden" LUA interpreter in the FreeBSD base
system and the pkg-provides extension of the pkg command to check
for conflicting files in all packages available for the architecture
and version of the base system this command is run on.

It generates output in the following format:

portedit merge -ie 'CONFLICTS_INSTALL=kicad-library-footprints-devel \
    # share/kicad/template/fp-lib-table' \
    /usr/ports/cad/kicad-library-footprints

(The last line is shown wrapped for the text of this commit message.)

The portedit command is provided by the port-fmt package. It takes
care of placing the CONFLICTS_ENTRY into the correct position of the
port's Makefile (and removes prior definitions).

The files listed with each result are examples of files that are in
conflict between the port and the packages in the list after ">".
The main purpose of the files list is to help distinguish between
conflicts that affect all flavors or versions of a port, or whether
the files are placed in version specific sub-directories or use other
mechanisms to allow e.g. multiple Python versions to co-exist.
(In the latter case ${PYTHON_PKGNAMEPREFIX} can be used to limit
the CONFLICTS_INSTALL entry to conflicting packages using the same
Python interpreter version, for example, else a prefix like py*- might
be required for a version independent pattern).

Users of this feature are highly advised to check each Makefile by
comparing it with pre-edit version before the changes are committed!

There are several limitations that can cause incorrect or undesirable
changes:

- The list of files installed by each port is only available for the
  officially built packages (and the flavors selected from the set of
  available flavors). It does not include ports that may not be
  packaged or that are broken or ignored due to a dependency on a
  broken port (or for other reasons). As a result, there may be
  undected conflicts with ports for which no official package is
  available.

- The CONFLICTS_INSTALL line is not always inserted into the correct
  position in the Makefile, typically due to out-of-order entries used
  by portedit to locate the desired position.

- Complex ports may have conditional CONFLICTS_INSTALL entries,
  depending on port options or flavors that are in effect. It is not
  possible to deal with that kind of Makefiles in an automated way.

- The union of all CONFLICTS and CONFLICTS_INSTALL entries is used as
  the list of install conflicts of a port. But only CONFLICTS_INSTALL
  entries are generated by this tool. Quite a lot of ports have
  CONFLICTS entries where CONFLICTS_INSTALL would suffice (i.e. there
  is no build conflict, actually), but there are ports that need to
  keep the conflicts listed as CONFLICTS. Such issues can be found by
  comparing the before and after versions of the edited Makefiles.

- Conflicting ports that have been removed from the ports system will
  only be found as long as their official package files are still
  available. (There is a recommendation that conflicts with removed
  ports are kept for a few months.)

- If all packages conflicting with a given port have been removed
  from the ports system and the official packages repository, the
  now superfluous CONFLICTS_INSTALL definition will not be detected.
  This is due to only Makefiles of ports being parsed that install
  files in the same place as some other port. Parsing all Makefiles
  instead would increase the run-time of this script by more than a
  factor of 10.
2022-01-22 12:48:03 +01:00
Rodrigo Osorio
0c8d8ebb7b Tools/scripts: Add new script update_crates to replace CARGO_CRATES block
Simple shell script to help updating Makefile CARGO_CRATES variable
returned by make cargo-crates.

simplest way to use it :
   make cargo-crates | update_crates Makefile > NewMakefile
2021-11-14 23:45:25 +01:00
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
Mathieu Arnold
5d33e04596
framework: Remove $FreeBSD$
Where appropriate fiddle with a few other things.
2021-04-06 16:27:10 +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
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 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
Eitan Adler
eac1d5f88c Tools: add LEGALlint
This checks 'LEGAL' for common errors, It is inspired by MOVEDLint.
2018-05-27 05:02:06 +00:00
Mathieu Arnold
21a283f3be Remove UNIQUENAME and LATEST_LINK.
UNIQUENAME was never unique, it was only used by USE_LDCONFIG and now,
we won't have conflicts there.

Use PKGBASE instead of LATEST_LINK in PKGLATESTFILE, the *only* consumer
is pkg-devel, and it works just fine without LATEST_LINK as pkg-devel
has the correct PKGNAME anyway.

Now that UNIQUENAME is gone, OPTIONSFILE is too. (it's been called
OPTIONS_FILE now.)

Reviewed by:	antoine, bapt
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D3336
2015-08-17 14:20:40 +00:00
Rodrigo Osorio
88944e3161 Add getpatch.sh, a shell script only tool to download patch attachments on bug tracking systems 2015-03-30 21:13:12 +00:00
Eitan Adler
ecf399dfec Remove consistency-check since it relies on MD5 and only works for old pkg_ tools
Also clean up README a bit more

Discussed with:	ak, bapt
2014-06-25 08:50:50 +00:00
Eitan Adler
e78a8b68bf Clean up README 2014-06-25 08:39:27 +00:00
Eitan Adler
95a6a111a4 To my knoledge (and grep) the close-pr script in Tools/scripts is not used anywhere, so remove it.
OKed by: bapt
2014-06-25 08:27:37 +00:00
Baptiste Daroussin
afdc465ff0 Import mfh script to merge to the Q branches 2013-12-19 14:43:58 +00:00
Eitan Adler
e8e51739fe Remove p5-deps.pl which was used when perl 5.8 was removed. It has not been needed in many years.
Reported by:	ak
2013-10-30 21:28:24 +00:00
Baptiste Daroussin
a4ae5c22ec Remove Tools/scripts/convert-makefile-header.pl it is not needed anymore 2013-09-21 00:06:29 +00:00
Eitan Adler
c92a7a17e1 Remove dialogwrapper now that dialog4ports exists 2013-07-07 15:32:35 +00:00
Bryan Drewery
5fc8f5e96e prdone and prpatch were removed in r297358 2012-12-12 02:02:15 +00:00
Eitan Adler
a3f7fb53bb Document tool which converts from old style header to new style
Feature safe:	yes
2012-11-28 18:06:21 +00:00
Eitan Adler
fe682edd2d By request, move dialogwrapper to the main folder and fix the readme.
Additionally, document the wrapper in the main readme
2012-09-01 02:56:50 +00:00
Sofian Brabez
d1bd97d171 - Fix documentation
Submitted by:	culot, gahr
2012-08-30 10:23:01 +00:00
Sofian Brabez
3bdb4508da - Add getpatch script to download patch attachments on bug tracking systems
Approved by:	portmgr (bapt)
2012-08-23 14:07:48 +00:00
Eitan Adler
5c65825d5a Document MOVEDlint in README 2012-02-16 16:09:41 +00:00
Eitan Adler
621a1828da - Remove some old duplicate words. They were getting in way of finding newer ones. 2011-12-27 03:32:25 +00:00
Jun Kuriyama
e2f30d68c5 - Add a script to check unneeded dependencies for perl modules. 2010-01-29 14:52:45 +00:00
Philip M. Gollucci
5d1e7f6179 note mark_safe.pl 2009-05-17 11:40:16 +00:00
Andrew Pantyukhin
0b5ca793be Add a tiny sh hack - ardiff - compares two archives. 2008-05-06 16:17:01 +00:00
Alexander Leidinger
1fc8d4fdd0 Add explicit_lib_depends.sh. 2007-08-26 15:02:24 +00:00
Alexander Leidinger
43b63893be Add 2 scripts which help in port maintenance to list all direct library
dependencies of a port:
	neededlibs.sh
		Extract direct library dependencies (filenames) from binaries.
	resolveportsfromlibs.sh
		Prints the name(s) of ports(s) given a library filename,
		suitable for direct use (copy&paste) in LIB_DEPENDS.

Example usage is included in the scripts. The following combined usage may
be helpful for further porting/testing automation:
	resolveportsfromlibs.sh -b /usr/local $(neededlibs.sh /test/bin/*)

Requested by:	kris, lofi (sort of)
2007-08-12 12:49:23 +00:00
Anton Berezin
bbd85008bd Add a splitpatch.pl utility, a small script to convert multi-file
patches to several appropriately named single-file patches.

Requested by:	flz
2005-04-12 10:56:08 +00:00
Florent Thoumie
75dd621ca0 - Add bump_revision.pl, a small script to bump the PORTREVISION variable
of ports which are depending on a port with a changed shared lib version.

Edwin dedicates this script to his son Dirk, born few days ago :)
Congrats (again) !

PR:		ports/63915
Submitted by:	edwin
2005-04-12 09:22:59 +00:00
Kris Kennaway
3038d3579a Document the check-latest-link and tindex scripts 2005-01-24 07:22:38 +00:00
Kirill Ponomarev
043f5658ce Remove traling spaces. 2005-01-09 10:21:17 +00:00
Oliver Eikemeier
8d16127344 Add chkorigin.sh, a script that checks the ports tree for ports with a wrong
PKGORIGIN. Useful especially after repocopies.

  env PORTSDIR=/usr/ports sh /usr/ports/Tools/scripts/chkorigin.sh

Approved by:	marcus (portmgr)
2004-03-19 11:08:09 +00:00
David E. O'Brien
5dda2933f1 There is nothing "future" about 'addport'. 2004-01-02 23:27:29 +00:00
Akinori MUSHA
ce03f12ae5 Add de-pkg-comment. 2003-02-18 12:45:59 +00:00
Maxim Sobolev
428d6d1995 Add checkcats.py - a script that verifyes that master categories in all ports
are correct and reports any problems.
2001-12-11 10:49:51 +00:00
Trevor Johnson
01b5fe4634 Add update-patches, a script to generate updated versions of the
patches in a port.

Obtained from:	OpenBSD
2000-10-19 10:47:28 +00:00
Brian Feldman
11a2dbd370 Add plist, a script to automate the generation of a pkg-plist. 2000-10-17 14:46:04 +00:00
Mark Ovens
c8794db7c3 New script (and it's README) for searching the ports tree. Add this script
to the main README.

This was originally submitted as a port but was added to Tools/scripts
instead at alex's suggestion.

PR:		20863
Approved by:	alex
2000-08-28 11:37:23 +00:00
Maxim Sobolev
c978a0f298 Add gnomedepends.py to our collection of helpfull scripts.
gnomedepends is a script, which analyses pkg/PLIST and gives an advice as to
which GNOME ports should be listes in {RUN,LIB}_DEPENDS for the port to ensure
correct removal of GNOME shared directories.
2000-08-02 07:10:24 +00:00
Maxim Sobolev
2ec55b0869 Add checknewvers.sh - a script which checks for availability of the newest
versions of distfiles on MASTER_SITES. This is still work in progress, so
please use with caution and don't forget report bugs and submit patches.
2000-07-07 14:57:41 +00:00
Maxim Sobolev
9ef89b7e83 Add close-pr - a slightly hacked version of edit-pr(1) to quickly close PR. 2000-06-26 17:49:04 +00:00