Re: OpenBSD 6.x and wxallowed
Hi, On Mon, Oct 21, 2019 at 09:57:24AM +0100, Stuart Henderson wrote: > > $ grep -rHI USE_WXNEEDED /usr/ports/ | wc > > 64 2013827 > > This ignores ports where USE_WXNEEDED is set by a module, this is a better > number: > > $ sqlite3 /usr/local/share/sqlports "select count(fullpkgpath) from ports > where use_wxneeded='1'" > 130 Ports (or any programs in general) built with lang/ghc don't even have USE_WXNEEDED but still contain binaries with a OPENBSD_WXNEED section (xmonad, darcs, ...). (I'm currently working on killing wxneeded for Haskell) Ciao, Kili
Re: stack pointer checking
Hi, On Thu, Jan 11, 2018 at 08:39:25PM -0700, Theo de Raadt wrote: > I'm asking for some feedback to discover what ports this breaks, we'd > like to know. Those would be ports which try to (unconvenionally) > create their stacks in malloc()'d memory or inside another > datastructure. Most of them are probably easily fixed ... For lang/ghc, a bundled and patched version of libgmp aborts with this. Still investigating, but this shouldn't stop you from putting the MAP_STACK diff in. Ciao, Kili
at(1) job files have to belong to group crontab
Hi, since 2017/06/07, spooled at(1) files have to be owned by group crontab, and at(1) makes sure that this is the case for newly created at(1) jobs. However, if you create an at(1) job while still running OpenBSD-6.1 and then update to OpenBSD-6.2 *before* that at(1) job had been run, it will be dropped. Example (that's what I ran into this day): Existing at(1) job, created on OpenBSD-6.1 (note the group 'polly' which would be 'crontab' with the new at(1)): -rwx-- 1 polly polly 358 Oct 3 12:01 1508148000.c Message from /var/cron/log today (after updating to OpenBSD-6.2 a couple of days ago): Oct 16 12:00:01 dead-parrot cron[46001]: (polly) WRONG FILE GROUP (1508148000.c) I'm not sure wether anyone except me is scheduling at(1) jobs far enough in the future to cross an update. But in case anyone else does, would this addition to the upgrade faq help? Index: upgrade62.html === RCS file: /cvs/www/faq/upgrade62.html,v retrieving revision 1.4 diff -u -p -r1.4 upgrade62.html --- upgrade62.html 7 Oct 2017 21:06:39 - 1.4 +++ upgrade62.html 16 Oct 2017 21:35:06 - @@ -102,6 +102,15 @@ to the stable b resize /usr/obj. If you build your own releases on the amd64 or i386 platforms, you need to make sure that you have at least 3G available on /usr/obj. + + + adjust group ownership of existing at(1) jobs. + The https://man.openbsd.org/OpenBSD-6.2/cron;>cron(8) daemon + requires at(1) files in the spool to be owned by group crontab. + + + # chgrp -R crontab /var/cron/atjobs Ciao, Kili
Re: unneeded var breaks build in xenocara/driver/xf86-video-mach64
Hi, On Wed, May 27, 2015 at 04:55:39PM +, Christian Weisgerber wrote: someone will hit this soon enough if they haven't already, but building xerocara after recent import gave the following error: What's recent? Update to xf86-video-mach64 6.9.5 was four days ago and I've built xenocara since then without any problems. I just ran into the same problem, with the trees updated this afternoon. /usr/xenocara/driver/xf86-video-mach64/src/atipreinit.c: In function 'ATIPreInit': /usr/xenocara/driver/xf86-video-mach64/src/atipreinit.c:703: error: 'pInt10Info' undeclared (first use in this function) That is only reached if TV_OUT is defined... but TV_OUT is *not* defined in the build. I've #define TV_OUT 1 in /usr/xobj/driver/xf86-video-mach64/config.h, and my build log shows checking whether to include TV Out support... yes for xf86-video-mach64. Full build log at https://openbsd.dead-parrot.de/build.log, and config.log at https://openbsd.dead-parrot.de/config.log. Ciao, Kili ps: yes, /usr/xobj completely wiped out before the build.
Re: unneeded var breaks build in xenocara/driver/xf86-video-mach64
Hi, On Wed, May 27, 2015 at 08:56:01PM +0200, Matthias Kilian wrote: I just ran into the same problem, with the trees updated this afternoon. /usr/xenocara/driver/xf86-video-mach64/src/atipreinit.c: In function 'ATIPreInit': /usr/xenocara/driver/xf86-video-mach64/src/atipreinit.c:703: error: 'pInt10Info' undeclared (first use in this function) That is only reached if TV_OUT is defined... but TV_OUT is *not* defined in the build. I've #define TV_OUT 1 in /usr/xobj/driver/xf86-video-mach64/config.h, and my build log shows checking whether to include TV Out support... yes for xf86-video-mach64. Neither the OP nor me mentioned that it happens specifically on i386. Looks like TV Out is automagically enabled for i386. From /usr/xenocara/driver/xf86-video-mach64/configure.ac: ATIMISC_CPIO=no ATIMISC_DGA=yes ATIMISC_TV_OUT=no case $host_cpu in i*86) ATIMISC_TV_OUT=yes ATIMISC_CPIO=yes ;; x86_64|amd64|alpha|ia64) ATIMISC_CPIO=yes ;; sparc) ATIMISC_DGA=no ;; *) ;; esac I'll give this a try Index: configure.ac === RCS file: /cvs/xenocara/driver/xf86-video-mach64/configure.ac,v retrieving revision 1.6 diff -u -p -r1.6 configure.ac --- configure.ac23 May 2015 15:26:41 - 1.6 +++ configure.ac27 May 2015 19:22:15 - @@ -126,7 +126,6 @@ ATIMISC_TV_OUT=no case $host_cpu in i*86) -ATIMISC_TV_OUT=yes ATIMISC_CPIO=yes ;; x86_64|amd64|alpha|ia64) Ciao, Kili
Re: ksh global PWD env variable
On Sun, Jul 21, 2013 at 10:01:33PM +0200, Alexander Hall wrote: I for one don't see a general interest in knowing ones parents potentially faked wd. You can find out your wd by saner means. All shells (including our pdksh) seem to do this already, but also peek at PWD in the environment at startup (and do some sanity checks) to set their own value of PWD. I've the impression that all those other shells are exporting PWD by default is to propagate the logical path instead of the physical path to sub-shells. (See the physical option in sh(1) or the description of PWD in POSIX) Personally, I don't want such magical tracking of the logical path propagated to invoked scripts or sub-shells. Ciao, Kili
Re: ksh global PWD env variable
On Sun, Jul 21, 2013 at 10:51:17PM +0200, Joerg Sonnenberger wrote: On Sun, Jul 21, 2013 at 10:01:33PM +0200, Alexander Hall wrote: I for one don't see a general interest in knowing ones parents potentially faked wd. You can find out your wd by saner means. There is no way to find the logical path without help from the shell. But if anything relies on the logical path, isn't something broken? Ciao, Kili
(just kidding) acpitz(4) man page tweak
Index: acpitz.4 === RCS file: /cvs/src/share/man/man4/acpitz.4,v retrieving revision 1.5 diff -u -p -r1.5 acpitz.4 --- acpitz.431 May 2007 19:19:48 - 1.5 +++ acpitz.43 May 2013 20:01:51 - @@ -54,3 +54,8 @@ The .Nm driver was written by .An Can Erkin Acar Aq cana...@openbsd.org . +.Sh BUGS +The +.Nm +driver does not advise users to quit smoking nor does it keep the +machine environment free from dust.
Re: PATCH: merge.c white space cleanup
On Mon, Jan 28, 2013 at 08:45:19PM +0100, Marc Espie wrote: Otoh this file is quite bad. It makes my vim light up all red. That's why you should stick to vi and not the emacs-in-a-vi-disguise bloatware known as vim. Lol. Give me a vi with multiple windows, and with visual, and I will consider changing editors. vi with visual sounds like a tautology to me ;-) Ciao, Kili
Re: ##@!#@# gnu tools
On Thu, Nov 15, 2012 at 05:53:52PM +0100, Reyk Floeter wrote: External people seem to ask weird questions. I just had to dig into autoconf/auto* because it seems to be a must have for a portable project. Here's a simple configure replacement you could use for such projects: #!/bin/sh foo() { ed -s $0 - 'EOF' /^echo/,/^foo$/d w q EOF exit } echo Just edit the Makefile. foo echo Please do not run this script again. foo echo I told you, didn't I? foo echo STOP IT! Or I'll destroy myself. foo rm -f -- $0 Of course, the very first message is only necessary if there actually *are* some system dependend things that can't be easily set by just passing some variable assignments to make(1). Ciao, Kili ps: while we are about annoyances -- I thought about a little project (suitable for ports category education which would - remove a random file when run without arguments. - remove a few random files when run with -?. - remove a lot of random files when run with --help. This would be clearly documented in the man page of it.
Re: awk(1) error messages fix
On Tue, Jan 17, 2012 at 02:46:21PM +0100, Martin Pelikan wrote: Here's one copy-paste error in awk(1). CVS log mentions some upstream; anyone have idea what that is? They may be interested... As I just wrote in private, those parts aren't in bwk's upstream code, so there's no point sending the diff to bwk. The diff itself looks fine, anyway. Ciao, Kili Index: run.c === RCS file: /cvs/src/usr.bin/awk/run.c,v retrieving revision 1.33 diff -u -p -r1.33 run.c --- run.c 28 Sep 2011 19:27:18 - 1.33 +++ run.c 17 Jan 2012 13:42:19 - @@ -1546,7 +1546,7 @@ Cell *bltin(Node **a, int n)/* builtin break; case FXOR: if (nextarg == 0) { - WARNING(or requires two arguments; returning 0); + WARNING(xor requires two arguments; returning 0); u = 0; break; } @@ -1557,7 +1557,7 @@ Cell *bltin(Node **a, int n)/* builtin break; case FLSHIFT: if (nextarg == 0) { - WARNING(or requires two arguments; returning 0); + WARNING(lshift requires two arguments; returning 0); u = 0; break; } @@ -1568,7 +1568,7 @@ Cell *bltin(Node **a, int n)/* builtin break; case FRSHIFT: if (nextarg == 0) { - WARNING(or requires two arguments; returning 0); + WARNING(rshift requires two arguments; returning 0); u = 0; break; }
Re: tar -J for xz
On Tue, Oct 04, 2011 at 09:43:53PM +0200, Antoine Jacoutot wrote: this diff adds a -J flag to tar that calls xz for compress/decompress. Requires you to install the xz package on your system. No way. Base never depends on external things. Well pval added support for bzip2 years ago in a similar way... And i don't see the point in all those special flags for special (de)compression tools, not even for gzip. gzip -cd bla.tgz | tar tf - Same for other tools. Why add flags to tar for this?
Re: grep \words\
On Sun, Jul 17, 2011 at 09:50:05PM +0200, Matthias Kilian wrote: Then those ports should be fixed. There seem to be more GNUisms in (recent?) GNU grep that are picked up by projects, for example the use of \s and \S in pxltoraster Oops, that was GNU sed, not grep.
Re: sdn allocation and umass(4)
On Fri, Jun 24, 2011 at 08:34:15PM +0200, Christopher Zimmermann wrote: By the way, is there a way to mount umass(4) devices without looking at dmesg for the number of the sdn device? hotplugd(8) That's not what I thought about, but even better - hotplugd the BSD way. If you just need the disknames without looking at the dmesg output, just use sysctl hw.disknames ;-) Ciao, Kili
Re: pkg_add interactive prompts
On Tue, May 17, 2011 at 11:00:01PM +0200, frantisek holop wrote: (my rationale for removing the option 0: None is that i have asked for the package, so why would i choose None? i can always ctrl-c out if i have changed my mind...) AFAIK, ambiguous packages can also happen during updates (pkg_add -ui), for example if an updated package has a new dependency on another package that's available in different flavors. You don't want to hit ^C in this case, because pkg_add -ui can take a long time, especially when the number of installed packages is huge and the update is run over a slow link. Apart from this, I like the idea. Ciao, Kili
Re: ncurses 5.7 update and define USE_SIGWINCH
Hi, On Fri, Apr 22, 2011 at 08:55:35PM +0100, Mikolaj Kucharski wrote: Ok. What options do I have to fix net/ekg? Compare it with mutt or irssi (they aren't affected by USE_SIGWINCH define) and leave libcurses as it is or is there any way to bring back behaviour from ncurses 5.2 to 5.7? You may have a look at www/snownews, from 2008-09-12 22:07. Martynas and I hacked a little bit (installing our own signal handler). This had been merged upstream to snownews later. Ciao, Kili
Re: [PATCH] Fix for kernel crash with udav(4) device
On Sun, Mar 20, 2011 at 04:07:33PM -0400, Loganaden Velvindron wrote: With input from mk, we improved the diff. Testing is very much appreciated. [...] I can't comment on the code (it isn't my area, but, worse, i'm still too short of time), but at least a make build over nfs now finished without any problems. Ciao, Kili Index: src/sys/dev/usb/if_udav.c === RCS file: /cvs/src/sys/dev/usb/if_udav.c,v retrieving revision 1.54 diff -u -p -r1.54 if_udav.c --- src/sys/dev/usb/if_udav.c 20 Mar 2011 17:58:26 - 1.54 +++ src/sys/dev/usb/if_udav.c 20 Mar 2011 19:58:51 - @@ -1128,18 +1128,25 @@ udav_rxeof(usbd_xfer_handle xfer, usbd_p usbd_get_xfer_status(xfer, NULL, NULL, total_len, NULL); + if (total_len UDAV_RX_HDRLEN) { + ifp-if_ierrors++; + goto done; + } + h = (struct udav_rx_hdr *)c-udav_buf; total_len = UGETW(h-length) - ETHER_CRC_LEN; - DPRINTF((%s: RX Status: 0x%02x\n, h-pktstat)); + DPRINTF((%s: RX Status: 0x%02x\n, sc-sc_dev.dv_xname, h-pktstat)); if (h-pktstat UDAV_RSR_LCS) { ifp-if_collisions++; goto done; } + /* RX status may still be correct but total_len is bogus */ if (total_len sizeof(struct ether_header) || - h-pktstat UDAV_RSR_ERR) { + h-pktstat UDAV_RSR_ERR || + total_len UDAV_BUFSZ ) { ifp-if_ierrors++; goto done; } Index: src/sys/dev/usb/if_udavreg.h === RCS file: /cvs/src/sys/dev/usb/if_udavreg.h,v retrieving revision 1.11 diff -u -p -r1.11 if_udavreg.h --- src/sys/dev/usb/if_udavreg.h 6 Dec 2010 04:41:39 - 1.11 +++ src/sys/dev/usb/if_udavreg.h 20 Mar 2011 19:58:51 - @@ -200,6 +200,6 @@ struct udav_rx_hdr { #define UDAV_RX_HDRLEN sizeof(struct udav_rx_hdr) /* Packet length */ -#define UDAV_MAX_MTU1536 /* XXX: max frame size is unknown */ +#define UDAV_MAX_MTU1522 /* According to datasheet */ #define UDAV_MIN_FRAME_LEN 60 #define UDAV_BUFSZ UDAV_MAX_MTU + UDAV_RX_HDRLEN -- Password: You speak an infinite deal of nothing -- sudo(8), OpenBSD
Re: [PATCH] frame length validation for USB ethernet adapters
Hi, On Wed, Mar 16, 2011 at 04:58:19PM -0400, Loganaden Velvindron wrote: After my experience with udav(4), I took a look at other USB adapters. The diff makes all of them more consistent by checking the frame length returned and validating it. Since I don't own any of those adapters, I must rely on you people to test them. The diff is wrong unless successful reports are heard from users. Of course, if the adapters are broken after applying the diff, I'll do my best to track down the problem. FYI: I just noticed (about 10 minutes ago, after bringing my zaurus up to date) that the recent if_udav patch breaks nfs client functionality. No time to debug it yet, though :-( Ciao, Kili
Re: Make expr(1) 64-bit capable and radix-aware
On Sat, Jan 15, 2011 at 03:35:43PM -0500, Ted Unangst wrote: On Sat, Jan 15, 2011 at 3:30 PM, Otto Moerbeek o...@drijf.net wrote: Ehum, running the risk of looking like a complete fool I've got to ask, is there actually a ksh builtin version of expr? I did actually double check that prior to digging into this, with whence expr, and now after reading your comment I've skimmed the man page for ksh as well without finding any reference to a builtin expr. What am I missing? You are right, I was confused. x=$(expr $a + $b) should give the same result as x=$((a + b)) So it's perfectly ok to demand expr(1) and ksh(1) compatibility. although making $(()) handle 64-bit may also be a nice addition. I've an old diff (from december 2008) around, but IIRC i wasn't happy with it, because it could break existing shell scripts (MAILCHECK and TMOUT come into mind). Ciao, Kili
Re: fold -b1 segmentation fault
On Thu, Oct 21, 2010 at 05:57:24PM +0100, Jason McIntyre wrote: in case anyone's interested, and as reported in a recent freebsd pr: $ fold -b1 Segmentation fault (core dumped) no fix is provided. Holy ugliness... Here are two diffs, pick your choice. Either drop the (attempt) to implemented obsolete syntax (like `fold -42') completely: Index: fold.c === RCS file: /cvs/src/usr.bin/fold/fold.c,v retrieving revision 1.12 diff -u -p -r1.12 fold.c --- fold.c 27 Oct 2009 23:59:38 - 1.12 +++ fold.c 21 Oct 2010 18:49:08 - @@ -52,12 +52,10 @@ main(int argc, char *argv[]) { int ch; int width; - char *p; - char *w; const char *errstr; - width = -1; - while ((ch = getopt(argc, argv, 0123456789bsw:)) != -1) + width = DEFLINEWIDTH; + while ((ch = getopt(argc, argv, bsw:)) != -1) switch (ch) { case 'b': count_bytes = 1; @@ -71,21 +69,6 @@ main(int argc, char *argv[]) errx(1, illegal width value, %s: %s, errstr, optarg); break; - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - if (width == -1) { - p = argv[optind - 1]; - if (p[0] == '-' p[1] == ch !p[2]) - w = ++p; - else - w = argv[optind] + 1; - - width = strtonum(w, 1, INT_MAX, errstr); - if (errstr != NULL) - errx(1, illegal width value, %s: %s, - errstr, optarg); - } - break; default: (void)fprintf(stderr, usage: fold [-bs] [-w width] [file ...]\n); @@ -93,9 +76,6 @@ main(int argc, char *argv[]) } argv += optind; argc -= optind; - - if (width == -1) - width = DEFLINEWIDTH; if (!*argv) fold(width); Or as an alternative keep the obsolete syntax but do not segfault if it's mixed with normal options (like -b1 or -s1): Index: fold.c === RCS file: /cvs/src/usr.bin/fold/fold.c,v retrieving revision 1.12 diff -u -p -r1.12 fold.c --- fold.c 27 Oct 2009 23:59:38 - 1.12 +++ fold.c 21 Oct 2010 18:47:40 - @@ -53,7 +53,6 @@ main(int argc, char *argv[]) int ch; int width; char *p; - char *w; const char *errstr; width = -1; @@ -75,12 +74,14 @@ main(int argc, char *argv[]) case '5': case '6': case '7': case '8': case '9': if (width == -1) { p = argv[optind - 1]; - if (p[0] == '-' p[1] == ch !p[2]) - w = ++p; - else - w = argv[optind] + 1; - - width = strtonum(w, 1, INT_MAX, errstr); + if (p[0] != '-' || p[1] != ch || p[2]) + p = argv[optind]; + if (p == NULL || p[0] != '-' || p[1] != ch) { + (void)fprintf(stderr, + usage: fold [-bs] [-w width] [file ...]\n); + exit(1); + } + width = strtonum(p + 1, 1, INT_MAX, errstr); if (errstr != NULL) errx(1, illegal width value, %s: %s, errstr, optarg); Ciao, Kili
Re: infrastructure/build/out-of-date unusable with '@option always-update'
On Mon, Jan 25, 2010 at 10:44:26AM -0500, RD Thrush wrote: ${PORTSDIR}/infrastructure/build/out-of-date generates unusable data for a port with a packing list containing '@option always-update'. The following patch fixes the problem (which appears to be fallout from the recent pkg_add improvements): [...] Here's a diff that actually applies (no tabs expanded) and that uses $plist-has('always-update') instead of defined $plist-{'always-update'} Ciao, Kili Index: out-of-date === RCS file: /cvs/ports/infrastructure/build/out-of-date,v retrieving revision 1.17 diff -u -p -r1.17 out-of-date --- out-of-date 2 Jan 2010 12:54:22 - 1.17 +++ out-of-date 27 Jan 2010 10:46:16 - @@ -45,7 +45,7 @@ sub collect_installed print STDERR Package $name has no valid packing-list\n; next; } - + my $subdir = $plist-{extrainfo}-{subdir}; $subdir =~ s/mystuff\///; $subdir =~ s/\/usr\/ports\///; @@ -53,9 +53,13 @@ sub collect_installed $pkg-{$subdir}-{name} = $name; $pkg-{$subdir}-{stem} = $stem; $pkg-{$subdir}-{version} = $version; - my $sig = $plist-signature; - if (ref($sig)) { $sig = $sig-string; } - $pkg-{$subdir}-{signature} = $sig; + if ($plist-has('always-update')) { + $pkg-{$subdir}-{signature} = 'always-update'; + } else { + my $sig = $plist-signature; + if (ref($sig)) { $sig = $sig-string; } + $pkg-{$subdir}-{signature} = $sig; + } } return $pkg; }