Commit graph

35 commits

Author SHA1 Message Date
Cameron Youell ae845835d6 Meta: Dont finish lines with only one character in lint-ports.py 2023-07-18 00:17:34 +02:00
Tim Schumacher 89b0a61067 Ports: Remove support for auth_types other than sha256 2023-07-10 13:08:27 +02:00
Sam Atkins 5056668ab2 Meta: Add lint check that ports have an executable package.sh 2023-06-25 00:18:52 +02:00
Cameron Youell 0a0ba4cbc5 Meta: Ignore empty directories in lint-ports
Git doesn't track empty directories, so we can just ignore them
2023-06-19 23:13:36 +02:00
Cameron Youell bc75fa878e Meta: Use Python to parse a port's package.sh in lint-ports
This reduced the runtime of `lint-ports` from 72s down to 0.5s on
my computer (a reduction of ~99.2%)! While it may not be as
accurate as running `package.sh showproperty` it makes using
`precommit` while editing ports much nicer!
2023-06-19 23:13:36 +02:00
circl 06eca0a666 Meta: Add check if AvailablePorts.md is sorted 2022-06-02 23:18:06 +01:00
Tim Schumacher 7550017f97 Ports: Sanitize environment before handling Ports
This keeps users from leaking their host environment variables (CFLAGS,
etc.) into Ports, and it keeps us from leaking Port-specific settings
into their dependencies.
2022-05-21 18:12:07 +02:00
Daniel Bertalan 830f5c610d Meta: Fix unused variable warning in lint-ports.py
This went undetected because I broke CI so the Python linter didn't run.
2022-05-20 12:44:12 +01:00
Ali Mohammad Pur 6b8688228b Meta: Disallow non-git patches for ports 2022-05-19 20:17:10 +04:30
Jelle Raaijmakers fa77e6b289 Ports: Convert GLTron patches to new format 2022-05-09 21:18:21 +02:00
EWouters a07e12609e Ports/mrsh: Fix workdir, remove or upgrade patches
Also removes mrsh from the list of ports missing descriptions. I tried
to be descriptive about the patches, but as I picked this port up from
someone else, I'm not 100% sure how to best explain the patches.
2022-05-07 17:00:39 +02:00
EWouters d89a58216d Ports/pt2-clone: Update pt2-clone to version 1.43
Upgrade patches to git style, add ReadMe.md and remove from the list
of ports missing descriptions.
2022-04-11 19:43:56 -07:00
EWouters cf0798158a Ports/klong: Update klong to version 20220315
Upgrade patch to git style, add ReadMe.md and remove from the list of
ports missing descriptions.
2022-04-11 19:43:56 -07:00
EWouters 769615fc48 Ports/gawk: Update gawk to version 5.1.1
The patch for config.sub is no longer required.

This also removes gawk from the list of ports missing descriptions as
it no longer has any patches.
2022-04-11 19:43:56 -07:00
EWouters 8828b038f5 Ports/diffutils: Update diffutils to version 3.8
The fnmatch patch that was added in 6de6dff is reverted because it is
not clear why it is necessary, as discussed in #9206.

This also removes diffutils from the list of ports missing descriptions
as it no longer has any patches.
2022-04-11 19:43:56 -07:00
Jelle Raaijmakers 31b72c20f0 Meta: Check port property for ports in the linter
We now make sure the directory name and `port` property are identical.
2022-04-03 12:35:14 +01:00
EWouters 98db3a3ce9 Meta: Fix format-string in the port linter 2022-03-31 21:59:20 -07:00
Jelle Raaijmakers c637795888 Ports: Update PHP to 8.1.4 2022-03-29 22:49:27 +01:00
Brian Gianforcaro f01e1d0c17 Ports/gdb: Add descriptions to all gdb patches and remove dead code
Before working on the gdb port some more, I wanted to get these patches
cleaned up to have a good base to build upon.
2022-02-20 11:49:41 +01:00
Daniel Bertalan 7ab6816b49 Ports: Update binutils to version 2.38 2022-02-11 18:07:53 +01:00
Ali Mohammad Pur 63b02859bc Meta+Ports: Make 'package.sh showproperty' report multiple properties
And use that to avoid shelling out multiple times for checking
properties in lint-ports.py.
2022-01-17 11:17:15 +01:00
Brian Gianforcaro d20c5da0da Meta: Optimized lint-ports.py by avoiding duplicate execs of package.sh
The way that lint-ports.py obtains the ports properties is unfortunately
very process intensive. You have to execute `./package.sh showproperty`
once for each property, for each port. Resulting in hundreds of
executions.

We were doing this work twice in both `check_package_files()` and in
`read_port_dirs()`. This resulted in a runtime of around ~10 seconds on
my machine. Removing the duplicate work and allowing the other code path
to utilize the to use the cached properties brought the runtime down to
~5 seconds on my machine.
2022-01-17 11:17:15 +01:00
Ali Mohammad Pur 8d30e14d28 Meta: Ensure that all port patches are documented in the linter
This adds a list of ports without descriptions to filter out the
existing ports with unexplained ports, this list should *not* be
appended to!

It also adds a (for now) disabled check that ensures all ports have
patches made with (or compatible with) git.
2022-01-16 10:32:50 +03:30
Andreas Kling 57ac8ff1fd Meta: Update lint-ports.py for the SerenityPorts move 2021-08-30 20:49:37 +02:00
Linus Groh db06b106ae Meta: Fix error in lint-ports.py
The data structures here were changed from sets to dicts at some point,
with the sets now having different names - this would crash trying to
subtract two dicts.
2021-05-07 20:08:45 +01:00
Andreas Kling 7ae7170d61 Everywhere: "file name" => "filename" 2021-04-29 22:16:18 +02:00
Gunnar Beutner 4aaf6386ae Meta: Only allow sha256 and sig for auth_type in ports 2021-04-25 13:30:18 +02:00
Gunnar Beutner b3db01e20e Ports: Detect more types of errors in the AvailablePorts.md file
This adds support for detecting incorrect version numbers and links
in the ports list.

Also, unlike before it doesn't parse the package.sh script but executes
it instead which allows us to detect syntax errors.
2021-04-23 16:11:48 +02:00
Gunnar Beutner 2d62cf8b79 Ports: Update the lint-ports.py script to ignore missing auth_type for SerenityOS repositories 2021-04-20 17:04:51 +02:00
Brendan Coles bb6bb7bc5e Meta: lint-ports: Check package files for required properties 2021-04-16 21:14:00 +02:00
Peter Elliott 938924f36d Meta: Add install-ports CMake target
install-ports copys the necessary files from Ports/ to /usr/Ports. Also
refactor the compiler and destiation variables from .port_include.sh
into .hosted_defs.sh. .hosted_defs.sh does not exists when ports are
built in serenity
2021-04-12 14:06:24 +02:00
Andreas Kling 251018676f Everywhere: Update references from ReadMe.md => README.md 2021-04-11 10:52:25 +02:00
Brendan Coles 666aeecaa2 Meta: Resolve some pylint violations in Python lint scripts
Resolves:

* all: consider-using-sys-exit
* all: wrong-import-order
* all: TODO: Require that a few keys are set? (fixme)
* some: missing-function-docstring
* some: line-too-long
2021-04-02 23:07:58 +02:00
Andreas Kling 4ac286903d Meta: Add Ports/build_installed.sh to the lint-ports ignore list 2021-02-15 07:51:40 +01:00
Ben Wiederhake ad4d9eaaf9 Meta: Lint AvailablePorts.md
As requested by popular demand ;)
https://github.com/SerenityOS/serenity/pull/5325#discussion_r575657614
2021-02-15 07:41:16 +01:00