Commit graph

1304 commits

Author SHA1 Message Date
Rene Ladan
206e6293bd Tools/scripts/rmport: do not add a trailing colon when only removing one port
Reported by:	sunpoet (via private mail)
2023-06-03 13:06:52 +02:00
Rene Ladan
9f5f51d945 Tools/scripts: rmport: force cleaning up at the end 2023-05-20 11:39:45 +02:00
Baptiste Daroussin
14e0241210 Tools/scripts/bump_revision.pl: default on -l instead of -g
-g option means also bump portevision of indirect dependencies,
this is not required by default since at least FreeBSD 11 when we
stopped recursively copying DT_NEEDED
2023-05-11 14:55:24 +02:00
Rene Ladan
8270a4ffc5 Tools/scripts/rmport: also cleanup when being trapped on a signal
This should get rid of stale gitrmlist* and gitlog* files.
2023-04-30 13:40:21 +02:00
Rene Ladan
3a59d525a9 Tools/scripts/rmport: remove extraneous trailing '/' in single-port commit messages 2023-04-30 13:29:38 +02:00
Rene Ladan
021979f6cf Tools/scripts/rmport: try to fix flow for amending the final commit 2023-04-30 13:18:56 +02:00
Rene Ladan
3a48862fcd Tools/scripts/rmport: update copyright year 2023-04-30 13:14:01 +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
Matthias Andree
0b21baa862 Tools/scripts/bump_revision.pl: update 2023-03-04 11:41:16 +01:00
Rene Ladan
a3e43bd4a8 Tools/scripts/rmport: Fix my English
Reported by:	George L. Yermulnik <yz@yz.kiev.ua>
2023-02-19 21:24:17 +01:00
Rene Ladan
f08b42fbd9 Tools/scripts: use a port-specific commit message if removing a single port.
This helps in `git shortlog`, replacing "cleanup: Remove expired ports" by
"category/port: Remove expired port" for a given category and port.

Reported by:	gerald
2023-02-19 20:42:20 +01:00
Yuri Victorovich
5a99dc0e5b Tools/scripts/add-port-to-category-makefile.sh: Add export LC_ALL=C
PR:		268737
Suggested by:	bdrewery@
2023-01-30 22:03:59 -08:00
Yuri Victorovich
1eba137b81 Tools/scripts: Add add-port-to-category-makefile.sh, command that adds new port to category's Makefile
PR:		268737
2023-01-16 13:07:27 -08:00
Rene Ladan
282db8d418 Tools/scripts: note that you should also be in sync with origin/main 2022-12-04 12:29:43 +01: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
2a09e5b4da cleanup: remove support for FreeBSD 13.0 which expired today.
- Mk/bsd.port.mk: mark 13.0 as unsupported
- Tools/scripts/portsearch: Drop support for FreeBSD <= 4
- archivers/zstd: revert "Fix build on FreeBSD 13.0"
- deskutils/xdg-desktop-portal: remove check for 13.0
- devel/libpeas: remove outdated comment
- editors/imhex: remove compatibility for 13.0
- editors/libreoffice: remove compatibility for 13.0
- editors/openoffice-4: remove compatibility for 13.0
- editors/openoffice-devel: remove compatibility for 13.0
- emulators/linux_base-c7: remove compatiblity for 13.0
- graphics/drm-kmod: remove detection for 13.0
- graphics/gpu-firmware-amd-kmod: do not check 13.0 anymore
- graphics/linux-c7-libdrm: remove support for 13.0
- math/igraph: remove support for 13.0
- net/asterisk16: drop support for ancient FreeBSD versions
- net/asterisk18: drop support for ancient FreeBSD versions
- security/openssl*: drop now obsolete patches
- sysutils/bhyve+: drop support for FreeBSD 13.0
- sysutils/ebsnvme-id: drop support for FreeBSD 13.0
- sysutils/openzfs: remove detection of FreeBSD 13.0
- sysutils/openzfs-kmod: drop detection of FreeBSD 13.0
- www/firefox: generalize pkg-message a bit regarding hgame(4)
- x11/xorg-cf-files: remove support for FreeBSD < 6 (yes, pre-2008)

While here, regenerate patches for:
- x11/xorg-cf-files
- net/asterisk16
- net/asterisk18

While here, remove a stale $Id$ from Tools/scripts/portsearch

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

Reviewed by:	office (fluffy), x11 (manu), arrowd, brnrd, cperciva, freqlabs, imp, jbeich, madpilot, nobutaka
2022-09-01 15:52:16 +02:00
Baptiste Daroussin
97d54c0413 MOVEDlint: ignore make.conf
Ignoring make.conf when looking up for existing flavors, makes the
test less likely to be polluted by end user defaults, like default
version of python etc.
2022-08-24 09:14:22 +02:00
Baptiste Daroussin
4dfa8c4b45 Scripts: remove now inaccurate gnomedepends.py 2022-08-23 15:42:27 +02:00
Baptiste Daroussin
fb4e70bad0 MOVEDlint: Test the first and second field for spaces
both fields should not have spaces in their field, let's make
MOVEDlint check for it
2022-08-23 15:16:19 +02:00
Baptiste Daroussin
abe88637f5 MOVEDlint: exit 1 in case of error 2022-08-23 14:55:06 +02:00
Baptiste Daroussin
85397ca391 MOVEDlint: accept -v blame=1 from command line 2022-08-23 14:49:19 +02:00
Baptiste Daroussin
d1349053a7 MOVEDlint: check for flavored version of a port
There is no need to document when a port has been flavored or new
flavor has been added, check if someone added such a line, and prevent
the person it is not needed
2022-08-23 14:16:46 +02:00
Baptiste Daroussin
d2aa049c86 MOVEDlint.awk: add the ability to select a start date
Reviewed by:	tcberner
Differential Revision:	https://reviews.freebsd.org/D36304
2022-08-23 14:07:36 +02:00
Stefan Eßer
1f357cdb92 Tools/scripts: update port_conflicts_check.lua
Check that the package file database exists and that it is up-to-date.
2022-05-22 22:13:41 +02:00
Stefan Eßer
4c9fcd143a Tools/scripts: update port_conflicts_check.lua
This update provides the following enhancements:

- The list of all files of all packages in the official repository
  is directly parsed from a dump of the provides.db database, instead
  of parsing the output of "pkg provides".

- If a package uses a version specific sub-directory as is the case
  for e.g. most perl or python modules, a pattern that is generated
  that matches only other modules built for the same interpreter
  version.
2022-05-20 15:09:21 +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
Matthias Fechner
760896708c Tools/scripts: limit scope the script searches
The script now searches on limited depth and ignores distfiles folder.

Reported by:	diizzy
2022-03-28 09:40:46 +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
Matthias Andree
171f76521e Tools/scripts/bump_revision.pl: Minimal update
to deal with ports that have flavors renaming the main port,
for instance e2fsprogs-nobootfsck.
2022-01-17 23:19:14 +01:00
Baptiste Daroussin
701cc6b7ea tindex: add new compression format for INDEX
Add zstd (faster to decompress) and xz (smaller) compression for INDEX

Results are the following:
39552 INDEX-14
2366  INDEX-14.bz2
1625  INDEX-14.xz
1672  INDEX-14.zst
2021-11-22 09:16:17 +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
620968a43a cleanup: drop support for EOL FreeBSD 11.X
Search criteria used:
- 11.4
- OSREL*
- OSVER*
- *_FreeBSD_11

Input from:
- adridg: devel/qca-legacy
- jbeich: _WITH_DPRINTF, _WITH_GETLINE, GNU bfd workarounds
- sunpoet: security/p5-*OpenSSL*

Reviewed by:	doceng, kde, multimedia, perl, python, ruby, rust
Differential Revision: https://reviews.freebsd.org/D32008
Test Plan: make index
2021-09-30 23:23:30 +02:00
Rene Ladan
332b174080 rmport: first check if we are in a git checkout, then check for changes. 2021-09-08 21:57:45 +02:00
Rene Ladan
18860205ed rmport: use "cleanup" instead of "*/*" 2021-07-03 19:56:51 +02: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
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