9047 Commits

Author SHA1 Message Date
Joshua Root 6002a04f8c mportsync: factor out common code for extraction
Use the code that was being used to extract rsynced tarballs for the
tarball over http/ftp case as well. It looks like this also fixes the
bug that in the latter case, files no longer present in the tarball
were never deleted from the extracted location. (This appears to have
been the case since the daily tarball feature was added.)
2026-05-21 20:59:09 +10:00
Joshua Root 4266d00ade tcllib: fix tar header reading bug
Upstream: https://core.tcl-lang.org/tcllib/info/b01462dff791ba84
2026-05-21 20:36:29 +10:00
Joshua Root c6ef6c89ac mportsync: ensure ports tree is owned by root
The unprivileged macports user should not be able to modify the ports.
2026-05-21 01:36:28 +10:00
Herby Gillot 1084984798 tests: consolidate duplicated test setup code and config files
Extract the shared boilerplate (macports init, tmp prefix setup,
mportinit, macports_worker_init) from 27 test files into a single
test_setup.tcl sourced by all unit test suites.  Merge the three
divergent copies of macports_worker_init into one consolidated
superset.  Fixes #73828.

Eliminate the duplicate sources.conf files in port1.0/tests/ and
package1.0/tests/ by having init_tmp_prefix derive the path from
top_srcdir, leaving a single copy in macports1.0/tests/.  Fixes
#73827.

Expose the test tclsh path as macports::autoconf::test_tclsh so
tests can reference it without recomputing the path from
top_srcdir.

Replace the hardcoded /tmp/macports-tests path in the integration
test infrastructure with a unique temporary directory created via
`file tempfile`, which respects TMPDIR and avoids collisions
between parallel or repeated runs.  Move macports.conf and
sources.conf content into static template files with @TEST_ROOT@
substitution so the config structure is visible on disk rather
than generated inline.

Install a ::tcltest::cleanupTestsHook in the integration test
library so the temporary directory is removed via cleanupTests
even if a test omits its trailing explicit `cleanup` call.

Fix tests/test/arch-test/test.tcl, which invoked ${bindir}/port
via `sh -c` but never had bindir defined anywhere, to run
port.tcl directly through the test interpreter.

Replace hardcoded /tmp paths in portutil.test with $pwd-relative
paths.

Fixes: https://trac.macports.org/ticket/73828
Fixes: https://trac.macports.org/ticket/73827

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-12 14:28:40 -04:00
Joshua Root ffdb12fff0 livecheck: ensure temp files are always cleaned up 2026-05-11 19:49:40 +10:00
Joshua Root 6d9edb07a8 Don't rely on env vars for curl in worker threads 2026-05-04 13:08:50 +10:00
Joshua Root 6d4444ab20 tcl: add gcc version check for __builtin_unreachable
https://core.tcl-lang.org/tcl/tktview/d0801e89aa4009ad7877a4d42413ce9f315f32d4
2026-05-01 22:49:47 +10:00
Joshua Root 9fa5676238 sysctl.c: remove trailing whitespace 2026-04-29 23:06:51 +10:00
Joshua Root 7f73b3e46d ReleaseProcess: remove macports-ci-files 2026-04-25 21:03:47 +10:00
Joshua Root 6bce7be7a3 mport_fetch_thread: improve main loop
Simplify by using lpop on queues. If a thread was not available, don't
try to get one for the next queue(s) before waiting.
2026-04-25 03:08:49 +10:00
Joshua Root f2d89a92ed Fix dlist_delete test 2026-04-25 02:45:26 +10:00
Joshua Root 881dd4baef Remove lpush
It's just a trivial alias for lappend.
2026-04-25 02:30:29 +10:00
Joshua Root 92a1557742 Use Tcl 9 lpop 2026-04-25 02:25:33 +10:00
Joshua Root 90748d4805 Use dict getwithdefault 2026-04-24 20:36:40 +10:00
Joshua Root 9adb66d46e Pass CPPFLAGS to compiler before CFLAGS 2026-04-24 19:41:37 +10:00
Joshua Root 65d109193c Use vwait -timeout 2026-04-24 19:10:44 +10:00
Joshua Root 7a99a59de6 Use Tcl 9 const 2026-04-24 14:55:04 +10:00
Herby Gillot 37202506ec selfupdate: make configure save file writable
Fixes: https://trac.macports.org/ticket/73899
2026-04-23 13:31:13 -04:00
Joshua Root 825c45b0ed Use kqueue notifier instead of CF 2026-04-23 16:10:01 +10:00
Joshua Root 985646a831 Set RELEASE_URL to 2.12.5 2026-04-23 15:07:04 +10:00
Joshua Root 664cd19423 2.12.5 release date 2026-04-22 18:37:25 +10:00
Joshua Root c2f833058e Delete stray file 2026-04-20 18:47:11 +10:00
Joshua Root aa4c60d68f action_target: limit batch size
Closes: https://trac.macports.org/ticket/73638
2026-04-19 16:08:21 +10:00
Herby Gillot bc1089e900 port: add 'prefix' action to display the configured prefix
Adds a new `port prefix` command that prints MacPorts' installation prefix on
stdout, unadorned, so it can be used directly in shell scripts.

Closes: https://trac.macports.org/ticket/72961
2026-04-18 15:58:50 -04:00
Herby Gillot d2354c700f make: skip autoconf regeneration for clean/distclean goals
GNU Make tries to remake any included makefile, so `include
Mk/macports.autoconf.mk` causes the top-level `Mk/macports.autoconf.mk:`
rule to fire. That rule depends on `config.status`, whose rule re-runs
`./config.status --recheck` (effectively `./configure`), and the
autoconf.mk recipe then runs `make clean` as a side effect.

The result: `make clean` and `make distclean` both trigger a configure
run before cleaning, which is wasteful and surprising.

Skip the regeneration rules entirely when the only goals on the command
line are clean or distclean. Any other goal (or the default build)
still picks up configuration changes as before.
2026-04-18 15:58:10 -04:00