Commit Graph

237 Commits

Author SHA1 Message Date
espie 3f2e002cf0 register EXTRACT_FILES as well 2023-08-31 13:49:22 +00:00
espie 8775a88e13 document sufx in _distfiles, add n to the view.
add infrastructure to save MOD* values.
2023-08-22 14:59:46 +00:00
espie da9e6ab375 documentation should match reality 2023-08-21 11:35:19 +00:00
espie c581ab1d2c fix thinko 2023-08-21 10:10:01 +00:00
espie b6f7e25201 support for DISTFILES/SUPDISTFILES/PATCHFILES.sufx and MASTER_SITES.sufx
note that only the non suffixed versions end up in the main ports view.
2023-08-14 17:36:43 +00:00
espie e7ca584707 typo 2023-08-14 09:21:36 +00:00
espie 73a357a27d somehow I forgot about patchfiles in the manpage. 2023-08-08 11:12:06 +00:00
espie 3a00fabd0f use v5.36 2023-06-16 06:04:01 +00:00
espie fb35d399c7 use v5.36 2023-06-16 04:54:20 +00:00
espie 711b71c755 use v5.36 2023-06-16 04:17:56 +00:00
espie f7a765cfff use v5.36
tighten restrictions on IS NULL constructor
2023-06-15 14:33:13 +00:00
espie d503056b9e start moving to use v5.36 2023-06-15 12:53:07 +00:00
sthen 2e8b030b2e Support USE_NOBTCFI in ports to add -z nobtcfi to linker command lines and
record this information in the sqlports db.  ok kn@ tb@

OpenBSD is starting to support branch target identification on amd64 and
arm64 (part of the features on Apple m2, and on Intel 11th gen/newer CPUs
with "control-flow enhancement technology").

On amd64 it is currently being enabled/disabled in snapshot kernels at
various times while we gain more information about which software in
ports is working/not.

This works by placing certain opcodes at legitimate targets of branch
instructions (which are ignored on earlier CPUs as they are NOPs there)
and trapping if an indirect call/jump is attempted to a location which
does not contain such an opcode. This makes it harder for an attacker
to jump to a location containing code of their choosing.

For more details on the Intel implementatios See chapter 17 of SDM vol.1
https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html

Our system compilers on amd64/arm64 add the required opcodes at valid
targets, but some code in ports is built with a compiler which does not
do that, also some ports have asm code which has not had the required
instructions added at those points yet (i.e. endbr64 on amd64).
In those cases, the whole binary can be annotated with a segment type
PT_OPENBSD_NOBTCFI as an indicator to the kernel not to enforce branch
target control flow integrity for the produced binary.

The relevant compiler options to enable (default on OpenBSD)/disable are:

amd64: -fcf-protection=branch, -fcf-protection=none
arm64: -mbranch-protection=bti, -mbranch-protection=none
2023-06-12 10:06:29 +00:00
sthen 8944205b73 record USE_NOEXECONLY in sqlports 2023-01-09 17:09:55 +00:00
espie 96e9672cb6 remove shortcut that was resulting in bizarre warning when trying to
integrate empty files
2022-11-14 12:54:47 +00:00
naddy 7a958849ed drop RCS Ids 2022-03-11 18:31:17 +00:00
ajacoutot 32baf14873 Unbreak COMMENT-main and bump. 2021-11-23 07:10:49 +00:00
espie 737fb8bb76 zap a few PKGNAME-sub which are now default
(and also duplicated EPOCH-sub which make little sense in db/{v3,v4}
2021-11-22 13:55:54 +00:00
espie de8d34ed61 add FIX_CRLF_FILES to secondary tables 2021-02-25 23:26:30 +00:00
espie 4d7cd6c96a document DEBUG_* tables and views 2021-02-21 09:14:05 +00:00
espie ec88bfaedb finally add DEBUG_PACKAGES and DEBUG_CONFIGURE_ARGS to sqlports
not sure what I missed the last time as this is fundamentally trivial
2021-02-20 18:05:04 +00:00
espie c10c81e8a7 simplify my debug process by allowing to restart build from a given point 2021-01-29 10:28:30 +00:00
espie c0b8252709 add the date at which the db was generated into sqlports.
document Meta table, which I somehow forgot
2021-01-29 08:30:37 +00:00
espie b95f372d1d flesh out some more stuff in the manpage.
do a REV bump for once, since we don't actually change any real details
2020-07-07 10:53:27 +00:00
espie f652d789b5 move description of the schema to a manpage 2020-07-06 09:06:45 +00:00
espie d994b4272d flesh out a bit more stuff from DESCR 2020-07-05 12:28:13 +00:00
espie 2ae760cc0d seems that people don't expect this information to be in DESC, so start
converting it to mandoc, to be completed.
2020-07-05 12:23:24 +00:00
espie 2159135658 extend request a bit more so that verbose mode also shows type of dependency 2020-06-11 19:55:15 +00:00
espie a0cef780a2 verbose mode, now that I've figured it out again 2020-06-11 16:05:52 +00:00
espie f03a34da8b add a few options and a manpage to show-reverse-deps 2020-06-11 15:40:41 +00:00
espie 00fb740c85 handling of DEBUG_PACKAGES/DEBUG_CONFIGURE_ARGS is bogus
just ignore them for now
2020-05-19 08:50:55 +00:00
espie 2f0dce97ea likewise, don't try to use incomplete hash 2020-05-19 08:44:44 +00:00
espie ca77b7dcb1 parse errors in dump-vars will lead to $h being invalid, push past that
so that it properly errors out without a huge dump
2020-05-19 08:38:03 +00:00
espie 1d9534e98b allow SUBDIRLIST to leak through, in case robert@ wants to build
a partial db.

okay robert@
2019-11-26 11:32:17 +00:00
espie 2941d54083 add DEBUG_PACKAGES and DEBUG_CONFIGURE_ARGS
make sqlports strict by default (ignore PORTSDIR_PATH and look only in
PORTSDIR)
2019-11-11 20:44:39 +00:00
kn 870bcebea8 Say pkgpath not path in show-reverse-deps usage
Drop useless use of cat(1) and quote user input while here.

OK espie
2019-10-03 12:41:22 +00:00
espie 8a1ff3888e get things to work even if DESCR is not an absolute path. 2019-08-24 23:16:25 +00:00
espie 935e9f2b7c cleaner way to deal with paths, no functional change 2019-07-21 11:10:23 +00:00
espie 70d0d70b25 fix sqlports, bump to make sure 2019-07-20 23:12:47 +00:00
sthen 98e1189996 Add a belt-and-braces check for the number of lines output in the produced
ports-INDEX, error out if it's too small.
2019-07-18 06:35:43 +00:00
espie d45c8394c9 bye bye old PERMIT_* 2019-07-14 11:27:19 +00:00
sthen 9fe1e38b23 replace simple PERMIT_PACKAGE_CDROM=Yes with PERMIT_PACKAGE=Yes 2019-07-12 20:43:27 +00:00
espie 3ec73388de make sure to stop if scripts fail
as noticed by sthen@
2019-06-04 16:05:52 +00:00
espie 7271781869 phase out old PERMIT_* variables.
We won't be distributing CDROM anymore, so simplify to
just PERMIT_PACKAGE / PERMIT_DISTFILES

In particular, the new variables are shorter, so this makes
for better cosmetic sense in ports.

The "current" version allows for the old variables to die out
peacefully, at our leasure, and then I'll remove the old stubs.

As discussed with sthen@, various people agree, and deraadt@
is okay with the strategic change.

This does survive a bulk.

PLEASE NOTE: built packages require current pkg* tools.
In particular, the current version deals with
@comment pkgpath=* ftp=*
just fine, but the old one WILL COMPLAIN about missing cdrom info.

register-plist also doesn't care, adding/removing cdrom info
is a no-op for it. There is NO BUMP needed for the conversion.

For now, sqlports STILL carries the old variables. I'll deal
with their removal later.
2019-05-31 21:27:03 +00:00
espie 71a2ef4f62 Add a denormalized table that instantiates the main ports view.
So, Portsq is a snapshot of Ports... dirty but fast.

I had mixed feelings about this.
There's also a script to resync the table.

Grows the db by about 50% (+25MB)

Discussed with sthen@
2019-05-18 21:35:21 +00:00
espie 78fb9be676 create indices for all fullpkgpaths in secondary tables, this ought
to speed up some requests at least a little bit.
2019-05-17 20:41:54 +00:00
espie 9f70fcb4b8 Fix bug in argument order, strenghten argument parsing to avoid that.
Add a "meta" table that just contains a schema version and a hash.

So that some clients (e.g., portroach) can automatically figure out
whether a rebuild is required.
2019-03-15 11:29:53 +00:00
espie 86c6128347 slightly more correct subrequest (fullpkgpath is ordered "by accident")
I suspected this, confirmed after a discussion with Reda Dehak, from my
lab at work.
2019-03-11 13:29:21 +00:00
espie 4c1a6388c5 use "chained joins" to create canonical_depends with the Sql.pm framework
kill a bit of code.

adjust is now the only request "not in the mold", so just create it when
needed (so, late enough)

Add index creation (directly in create_schema), for now used for
canonical.
2019-01-22 16:55:22 +00:00
espie f70efd5390 rename a few methods and finish implementing chaining joins 2019-01-21 08:51:56 +00:00