Re: programming in Assembly
Many thanks! Yes, a static binary is perfectly fine at this time :) A couple of follow-up questions, if y'all would please indulge me: 1. Now that I am reminded of this handy new `readelf` tool, I go running it on the new static executable I just generated. ``` $ cat exit.s # repeating for your convenience # https://web.archive.org/web/20120509101207/http://lucifer.phiral.net/openbsdasm.htm .section ".note.openbsd.ident", "a" .p2align 2 .long 0x8 .long 0x4 .long 0x1 .ascii "OpenBSD\0" .long 0x .p2align 2 .section .text .globl _start _start: xorl %eax, %eax pushl %eax # exit status pushl %eax # extra long for C ABI movl $1, %eax # exit syscall int $0x80 $ as exit.s -o exit.o $ ld exit.o -static -o exit $ ./exit $ echo $? 0 # success! $ readelf -l ./exit Elf file type is DYN (Shared object file) ... ``` Why is the file type showing up as a shared object file in spite of it being a statically compiled binary? 2. I tried running the above file in a 64-bit OpenBSD, and got a couple of reasonable looking errors: ``` $ uname -a OpenBSD x.my.domain 5.9 GENERIC#1761 amd64 $ as exit.s -o exit.o exit.s: Assembler messages: exit.s:17: Error: suffix or operands invalid for `push' exit.s:18: Error: suffix or operands invalid for `push' ``` In response I tried some ham-handed modifications, basically replacing the registers with 64-bit variants, and letting the assembler figure out operand-size suffixes. ``` $ cat exit64.s .section ".note.openbsd.ident", "a" .p2align 2 .long 0x8 .long 0x4 .long 0x1 .ascii "OpenBSD\0" .long 0x .p2align 2 .section .text .globl _start _start: xor %rax, %rax push %rax # exit status push %rax # extra long for C ABI mov $1, %rax # exit syscall int $0x80 ``` Could you please point me at why this fails? ``` $ as exit64.s -o exit64.o $ ld exit64.o -static -o exit64 $ ./exit64 zsh: bus error (core dumped) ./exit64 ```
Re: programming in Assembly
On Fri, 14 Apr 2017, Kartik Agaram wrote: > I'm trying out a simple Assembly program on a freshly installed "OpenBSD > openbsd 6.1 GENERIC#291 i386": > > --- begin exit.s ... > --- end > > This program assembles and links without error. However when I try to > run it, I get this: > > $ as exit.s -o exit.o > $ ld exit.o -o exit > $ ./exit > zsh: abort ./exit > > The identical program runs on 32-bit Linux. > > Any Assembly programmers in the house know what's up? You need to decide what sort of executable you're trying to generate: static or dynamic? By default ld generates a dynamic executables, but if you do that you need to pass other options to set the interpreter. As is: $ readelf -l exit Elf file type is DYN (Shared object file) Entry point 0x1b4 There are 8 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x34 0x0034 0x0034 0x00180 0x00180 R E 0x4 INTERP 0x001000 0x2000 0x2000 0x00013 0x00013 R 0x1 [Requesting program interpreter: /usr/lib/libc.so.1] LOAD 0x00 0x 0x 0x001bf 0x001bf R E 0x1000 LOAD 0x001000 0x2000 0x2000 0x000f2 0x000f2 R 0x1000 LOAD 0x001f94 0x20001f94 0x20001f94 0x0006c 0x0006c RW 0x1000 DYNAMIC0x001f94 0x20001f94 0x20001f94 0x00060 0x00060 RW 0x4 NOTE 0x001014 0x2014 0x2014 0x00018 0x00018 R 0x4 GNU_RELRO 0x001f94 0x20001f94 0x20001f94 0x0006c 0x0006c R 0x1 ... The GNU ld default interpreter of /usr/lib/libc.so.1 isn't supported on OpenBSD: we expect you to tell ld to record a real interpreter like /usr/libexec/ld.so, or build static executables with -static. $ ld exit.o -o exit -static $ ./exit $ Note that by default OpenBSD marks executables as PIE (position independent executable) which places constraints on how code generates and uses addresses. You'll need to link with the -nopie option if you can't meet that requirement. Philip Guenther
vmm(4) - Virtual Machine owner and (re)starting VMs?
First: Great work, everyone. Tons of ground got covered. vmm seems to not be respecting the "owner" directive until after I shut the VMs down. It's completely plausible I'm doing something wrong. I haven't messed with vmm in -CURRENT since mid-January. I'm using 6.1-RELEASE right now. On the host end, I have dhcpd listening on vether0 and the most basic of pf NAT configured. Honestly, I'm okay running these as root. This is just my personal laptop with some VMs for testing Apache/MySQL apps and new snapshots. Using doas(8) I can connect to any of the consoles. Also, is there a way to re-start a defined VM by its vm.conf definition without restarting vmd, and/or start up a VM that's marked as disabled in vm.conf? Log and dmesg follows. $ id uid=1000(axon) gid=1000(axon) groups=1000(axon), 0(wheel) $ vmctl status ID PID VCPUS MAXMEM CURMEM TTYOWNER NAME 2 4096 1128M122M ttyp1 root OBSDSnap64.vm 1 12592 1128M128M ttyp0 root OBSD61.vm $ vmctl console 1 cu: open("/dev/ttyp0"): Permission denied $ cat /etc/vm.conf # bridge0 for VMs, NAT and dhcpd switch "local" { add vether0 up } # OpenBSD 6.1 vm "OBSD61.vm" { owner axon memory 128M disk "/home/axon/vmm/obsd61.img" interface { switch "local" lladdr fe:e1:ba:d0:eb:ab } } # OpenBSD amd64 Snapshot vm "OBSDSnap64.vm" { owner axon memory 128M disk "/home/axon/vmm/obsd-snap64.img" interface { switch "local" lladdr fe:e1:ba:d0:eb:ac } } $ ssh 10.13.37.200 axon@10.13.37.200's password: Last login: Fri Apr 14 22:11:40 2017 from 10.13.37.1 OpenBSD 6.1 (GENERIC) #19: Sat Apr 1 13:42:46 MDT 2017 Welcome to OpenBSD: The proactively secure Unix-like operating system. Please use the sendbug(1) utility to report bugs in the system. Before reporting a bug, please try to reproduce it with the latest version of the code. With bug reports, please try to ensure that enough information to reproduce the problem is enclosed, and if a known fix for it exists, include that as well. $ doas halt -p Connection to 10.13.37.200 closed by remote host. Connection to 10.13.37.200 closed. $ vmctl status # after waiting 30 seconds or so for the VM to clean up... ID PID VCPUS MAXMEM CURMEM TTYOWNER NAME 2 4096 1128M122M ttyp1 root OBSDSnap64.vm - - 1128M - - axon OBSD61.vm ## Now I'm the proud owner of a halted vm. :D $ doas vmctl console 2 Connected to /dev/ttyp1 (speed 9600) OpenBSD/amd64 (deepthought.labs.h-i-r.net) (tty00) login: [EOT] $ dmesg OpenBSD 6.1 (GENERIC.MP) #20: Sat Apr 1 13:45:56 MDT 2017 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP RTC BIOS diagnostic error 80 real mem = 8227655680 (7846MB) avail mem = 7973625856 (7604MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe9d90 (47 entries) bios0: vendor Acer version "V1.07" date 11/07/2011 bios0: Acer Aspire 5733Z acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP ASF! HPET APIC MCFG SLIC BOOT ASPT DMAR SSDT SSDT SSDT acpi0: wakeup devices AZAL(S3) P0P1(S4) EHC1(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) USB6(S3) USB7(S3) RP01(S4) PEG5(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz, 2527.84 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX ,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LO NG,LAHF,PERF,ITSC,SENSOR,ARAT cpu0: 256KB 64b/line 8-way L2 cache cpu0: TSC frequency 2527838640 Hz cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 133MHz cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz, 2527.44 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX ,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LO NG,LAHF,PERF,ITSC,SENSOR,ARAT cpu1: 256KB 64b/line 8-way L2 cache cpu1: smt 1, core 0, package 0 cpu2 at mainbus0: apid 4 (application processor) cpu2: Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz, 2527.44 MHz cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX ,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LO NG,LAHF,PERF,ITSC,SENSOR,ARAT cpu2: 256KB
programming in Assembly
I'm trying out a simple Assembly program on a freshly installed "OpenBSD openbsd 6.1 GENERIC#291 i386": --- begin exit.s # https://web.archive.org/web/20120509101207/http://lucifer.phiral.net/openbsdasm.htm # # $ as exit.s -o exit.o && ld exit.o -o exit && ./exit .section ".note.openbsd.ident", "a" .p2align 2 .long 0x8 .long 0x4 .long 0x1 .ascii "OpenBSD\0" .long 0x .p2align 2 .section .text .globl _start _start: xorl %eax, %eax pushl %eax # exit status pushl %eax # extra long for C ABI movl $1, %eax # exit syscall int $0x80 --- end This program assembles and links without error. However when I try to run it, I get this: $ as exit.s -o exit.o $ ld exit.o -o exit $ ./exit zsh: abort ./exit The identical program runs on 32-bit Linux. Any Assembly programmers in the house know what's up? Thanks, Kartik http://akkartik.name/about
Re: 6.1 on pcengines apu2
Shoot, that was the old dmesg. Here's the upgraded one: OpenBSD 6.1 (GENERIC.MP) #20: Sat Apr 1 13:45:56 MDT 2017 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 1996152832 (1903MB) avail mem = 1931038720 (1841MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x77fb7020 (7 entries) bios0: vendor coreboot version "88a4f96" date 03/07/2016 bios0: PC Engines apu2 acpi0 at bios0: rev 2 acpi0: sleep states S0 S1 S2 S3 S4 S5 acpi0: tables DSDT FACP SSDT APIC HEST SSDT SSDT HPET acpi0: wakeup devices PWRB(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) PBR8(S4) UOH1(S3) UOH3(S3) UOH5(S3) XHC0(S4) acpitimer0 at acpi0: 3579545 Hz, 32 bits acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: AMD GX-412TC SOC, 998.42 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPC NT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPI CSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,ITSC,BMI1 cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 16-way L2 cache cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative cpu0: TSC frequency 998419620 Hz cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 99MHz cpu0: mwait min=64, max=64, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: AMD GX-412TC SOC, 998.11 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPC NT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPI CSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,ITSC,BMI1 cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 16-way L2 cache cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative cpu1: smt 0, core 1, package 0 cpu2 at mainbus0: apid 2 (application processor) cpu2: AMD GX-412TC SOC, 998.11 MHz cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPC NT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPI CSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,ITSC,BMI1 cpu2: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 16-way L2 cache cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu2: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative cpu2: smt 0, core 2, package 0 cpu3 at mainbus0: apid 3 (application processor) cpu3: AMD GX-412TC SOC, 998.11 MHz cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPC NT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPI CSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,ITSC,BMI1 cpu3: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 16-way L2 cache cpu3: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu3: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative cpu3: smt 0, core 3, package 0 ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins ioapic1 at mainbus0: apid 5 pa 0xfec2, version 21, 32 pins acpihpet0 at acpi0: 14318180 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (PBR4) acpiprt2 at acpi0: bus 1 (PBR5) acpiprt3 at acpi0: bus 2 (PBR6) acpiprt4 at acpi0: bus 3 (PBR7) acpiprt5 at acpi0: bus -1 (PBR8) acpicpu0 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS acpicpu1 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS acpicpu2 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS acpicpu3 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS acpibtn0 at acpi0: PWRB "PNP0501" at acpi0 not configured cpu0: 998 MHz: speeds: 1000 800 600 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "AMD AMD64 16h Root Complex" rev 0x00 pchb1 at pci0 dev 2 function 0 "AMD AMD64 16h Host" rev 0x00 ppb0 at pci0 dev 2 function 2 "AMD AMD64 16h PCIE" rev 0x00: msi pci1 at ppb0 bus 1 em0 at pci1 dev 0 function 0 "Intel I211" rev 0x03: msi, address 00:0d:b9:43:19:88 ppb1 at pci0 dev 2 function 3 "AMD AMD64 16h PCIE" rev 0x00: msi pci2 at ppb1 bus 2 em1 at pci2 dev 0 function 0 "Intel I211" rev 0x03: msi, address 00:0d:b9:43:19:89 ppb2 at pci0 dev 2 function 4 "AMD AMD64 16h PCIE" rev 0x00: msi pci3 at ppb2 bus 3 em2 at pci3 dev 0 function 0 "Intel I211" rev 0x03: msi, address 00:0d:b9:43:19:8a "AMD CCP" rev 0x00 at pci0 dev 8 function 0 not configured xhci0
thinkpad x220 with OpenBSD 6.1
This e-mail is complementary to the one i sent at dm...@openbsd.org. After the completion of the installation process, everything works except: -screen brightness controlled by the keyboard -suspend/resume when i close the lid Both minor issues were resolved when i suspended the laptop from the command line (zzz). Now everything works. Thank you OpenBSD team.
Re: building release without noperm?
> On 04/14/17 09:21, Theo de Raadt wrote: > >> AFAICS there is no way to build a release without upgrading the base > >> system first, i.e. you have to have root privileges. > >> > >> To keep things simple, I wonder if it would be possible to use these > >> privileges to avoid the noperm partition? No, it isn't. > > noperm is now so well established, we have already forgotten the various > > tricks to during the transition, even moreso since there wasn't one > > transition it was done in steps. > > > > ??? > > I would have guessed a simple > > if test "x$USER" != "xroot"; then > echo "error: noperm partition wanted" > exit 1 > fi > > would do. There are such tests at the beginning of 'make release', so if you got as far in 'make release' as you indicate below, your noperm setup is fine: $ sed -n 246,259p /usr/src/etc/Makefile do-release: @if [[ `id -u` -ne 0 ]]; then \ echo $@ must be called by root >&2; \ false; \ fi @destmp=`df -P ${DESTDIR} | awk 'END { print $$6 }'`; \ if ! mount | grep -q " $${destmp} .*noperm"; then \ echo ${DESTDIR} must be on a noperm filesystem >&2; \ false; \ fi; \ if [[ `stat -f '%Su %Lp' $${destmp}` != '${BUILDUSER} 700' ]]; then \ echo $${destmp} must have owner BUILDUSER and mode 700 >&2; \ false; \ fi > bash-4.4# export DESTDIR=/dest; export RELEASEDIR=/export/releasedir > bash-4.4# cd /usr/src/etc && make release > sh /usr/src/sys/conf/newvers.sh > touch: version: Permission denied > /usr/src/sys/conf/newvers.sh[84]: cannot create version: Permission denied > *** Error 1 in /usr/src/sys/arch/amd64/compile/GENERIC.MP (Makefile:897 > 'vers.o') > *** Error 1 in . (Makefile:20 'bsd.mp') > *** Error 1 in . (Makefile:267 'release-sets') > *** Error 1 in . (Makefile:260 'do-release') > *** Error 1 in /usr/src/etc (Makefile:244 'release') This indicates permission problems below /usr/obj (nothing to do with noperm). What is the output of # ls -al /usr/obj /usr/obj/sys/arch/amd64/compile/{,GENERIC.MP/vers*} > There are stable snapshots? Good thing, I will check. There aren't. But you may want to check out syspatch(8) http://man.openbsd.org/syspatch
Re: xenodm and .kshrc
Hi Paolo, Check before you post - it *is* in /etc/skel/.Xdefaults[0] :^) [0] http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/etc/skel/dot.Xdefaults?rev=1.3&content-type=text/plain Regards, Raf On Fri, Apr 14, 2017 at 10:19:44AM BST, Paolo Aglialoro wrote: > Wouldn't the inclusion of this config (e.g. in skel) account for sane > defaults? > > On Fri, Apr 14, 2017 at 7:01 AM, Theo Buehler wrote: > > > On Fri, Apr 14, 2017 at 11:45:05AM +0800, Adam Steen wrote: > > > Hi > > > > > > I used to start X using startx and when opening terminal my .kshrc > > > would get run, > > > > > > but now i have switched to xenodm, my .kshrc is not being executed. > > > > > > my .profile has "export ENV=$HOME/.kshrc" > > > > > > what i am i missing? > > > > Assuming that you use xterm: does your .Xdefaults contain > > > > XTerm*loginShell: true > > > > I removed the following somewhat outdated section from the FAQ because > > by default it does: > > > > https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/www/ > > faq/faq8.html?rev=1.308&content-type=text/html#ksh > > > > See also this post: > > > > https://marc.info/?l=openbsd-misc&m=142829426523976&w=2 > > > > and the other posts in that thread.
Re: xenodm and .kshrc
Wouldn't the inclusion of this config (e.g. in skel) account for sane defaults? On Fri, Apr 14, 2017 at 7:01 AM, Theo Buehler wrote: > On Fri, Apr 14, 2017 at 11:45:05AM +0800, Adam Steen wrote: > > Hi > > > > I used to start X using startx and when opening terminal my .kshrc > > would get run, > > > > but now i have switched to xenodm, my .kshrc is not being executed. > > > > my .profile has "export ENV=$HOME/.kshrc" > > > > what i am i missing? > > Assuming that you use xterm: does your .Xdefaults contain > > XTerm*loginShell: true > > I removed the following somewhat outdated section from the FAQ because > by default it does: > > https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/www/ > faq/faq8.html?rev=1.308&content-type=text/html#ksh > > See also this post: > > https://marc.info/?l=openbsd-misc&m=142829426523976&w=2 > > and the other posts in that thread.
Re: building release without noperm?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 04/14/17 09:21, Theo de Raadt wrote: >> AFAICS there is no way to build a release without upgrading the base system >> first, i.e. you have to have root privileges. >> >> To keep things simple, I wonder if it would be possible to use these >> privileges to avoid the noperm partition? > > noperm is now so well established, we have already forgotten the various > tricks to during the transition, even moreso since there wasn't one > transition it was done in steps. > ??? I would have guessed a simple if test "x$USER" != "xroot"; then echo "error: noperm partition wanted" exit 1 fi would do. Using noperm to build stable I got bash-4.4# mount /dev/sd0a on / type ffs (local) /dev/sd0e on /export type ffs (local, nodev, nosuid) mfs:73715 on /dest type mfs (asynchronous, local, nodev, noexec, noperm, size=3145728 512-blocks) bash-4.4# export DESTDIR=/dest; export RELEASEDIR=/export/releasedir bash-4.4# cd /usr/src/etc && make release : : cc -g -Werror -Wall -Wimplicit-function-declaration -Wno-uninitialized -Wno-pointer-sign -Wframe-larger-than=2047 -mcmodel=kernel -mno-red-zone -mno-sse2 -mno-sse -mno-3dnow -mno-mmx -msoft-float -fno-omit-frame-pointer -ffreestanding -fno-pie -O2 -pipe -nostdinc -I/usr/src/sys - -I/usr/src/sys/arch/amd64/compile/GENERIC.MP/obj -I/usr/src/sys/arch -DDDB -DDIAGNOSTIC -DKTRACE -DACCOUNTING -DKMEMSTATS -DPTRACE -DCRYPTO -DSYSVMSG -DSYSVSEM -DSYSVSHM -DUVM_SWAP_ENCRYPT -DFFS -DFFS2 -DFFS_SOFTUPDATES -DUFS_DIRHASH -DQUOTA -DEXT2FS -DMFS -DNFSCLIENT -DNFSSERVER -DCD9660 -DUDF - -DMSDOSFS -DFIFO -DFUSE -DSOCKET_SPLICE -DTCP_SACK -DTCP_ECN -DTCP_SIGNATURE -DART -DINET6 -DIPSEC -DPPP_BSDCOMP -DPPP_DEFLATE -DPIPEX -DMROUTING -DMPLS -DBOOT_CONFIG -DUSER_PCICONF -DAPERTURE -DMTRR -DNTFS -DHIBERNATE -DPCIVERBOSE -DUSBVERBOSE -DWSDISPLAY_COMPAT_USL -DWSDISPLAY_COMPAT_RAWKBD - -DWSDISPLAY_DEFAULTSCREENS="6" -DX86EMU -DONEWIREVERBOSE -DMULTIPROCESSOR -DMAXUSERS=80 -D_KERNEL -MD -MP -c /usr/src/sys/conf/swapgeneric.c sh /usr/src/sys/conf/newvers.sh touch: version: Permission denied /usr/src/sys/conf/newvers.sh[84]: cannot create version: Permission denied *** Error 1 in /usr/src/sys/arch/amd64/compile/GENERIC.MP (Makefile:897 'vers.o') *** Error 1 in . (Makefile:20 'bsd.mp') *** Error 1 in . (Makefile:267 'release-sets') *** Error 1 in . (Makefile:260 'do-release') *** Error 1 in /usr/src/etc (Makefile:244 'release') > As we've said before, use a snapshot to jump over such changes. There are stable snapshots? Good thing, I will check. Thanx very much, keep on your good work Harri -BEGIN PGP SIGNATURE- iQEzBAEBCAAdFiEEH2V614LbR/u1O+a1Cp4qnmbTgcsFAljwf+gACgkQCp4qnmbT gct1bAf9H0p2cfaq2yfREf+7qWUtPblUHtaiCNifB7h9OlIVCE7svAuiMPiDrgwc 3AOTB8lJUN5AETqnyiLKZSLqpGek354aG0jwDzMQ0pte1v0sU0rCmjmw7WgZsmsF 63Jn9cU1jx7MgnH1AVWtpDXvInIuwoOg+7HryGphrejDo2WBiddsJuU8vx/I+o8u GzhhHpp3V27HGZhZa417H+fwESI3KMuEhJRKSzOYsWSkl84qUXnovCvDgctFZdcu n7ojlnjlTTFK54p5Bd6cEiDD5XhV0jtOLhxe4FT4tGA8wraplX3TD/fADNAvClja 39yHJ7Q0TARQYGHCVegs8pieURRknQ== =cbl4 -END PGP SIGNATURE-
Re: building release without noperm?
> AFAICS there is no way to build a release without upgrading > the base system first, i.e. you have to have root privileges. > > To keep things simple, I wonder if it would be possible to use > these privileges to avoid the noperm partition? noperm is now so well established, we have already forgotten the various tricks to during the transition, even moreso since there wasn't one transition it was done in steps. As we've said before, use a snapshot to jump over such changes.
building release without noperm?
Hi folks, AFAICS there is no way to build a release without upgrading the base system first, i.e. you have to have root privileges. To keep things simple, I wonder if it would be possible to use these privileges to avoid the noperm partition? Regards Harri