Re: Duplicity & /etc/daily.local

2019-05-20 Thread trondd
On Mon, May 20, 2019 5:50 pm, Noth wrote:
> Hi misc@,
>
>
>  Â I'm trying to run daily backups to a sftp server for various VMs and
> devices on my network, and want to use /etc/daily.local for this. I'm
> calling this script from the daily.local file:
>
> env 'GNUPG="/usr/local/bin/gpg" PASSPHRASE="mypassword"'
> /root/duplicity-hostname.sh
>
> but unfortunately duplicity can't find gnupg
>

I don't use duplicity anymore but is the GNUPG environment variable even a
thing?  Their manpage doesn't mention it but does specifiy a --ggp-binary
commandline argument.

http://duplicity.nongnu.org/duplicity.1.html

You'll also need to be sure gpg is looking in the right place for the
keyrings.



Re: octeon: make syspatch copy /bsd to real boot directory

2019-05-20 Thread gwes
A few corrections to the previous diff, sorry
Index: Makefile.octeon
===
RCS file: /cvs/src/sys/arch/octeon/conf/Makefile.octeon,v
retrieving revision 1.49
diff -u -p -r1.49 Makefile.octeon
--- Makefile.octeon 9 Feb 2018 03:59:15 -   1.49
+++ Makefile.octeon 20 May 2019 21:50:55 -
@@ -28,6 +28,14 @@ S!=  cd ../../../..; pwd
 _machdir?= $S/arch/${_mach}
 _archdir?= $S/arch/${_arch}
 
+# as long as there is no boot program which loads from ufs,
+# we must copy any kernels to the FAT filesystem where the
+# manufacturer provided finds it
+# this script assumes a valid partition and filesystem exist
+
+BOOTROOTDIR?=  /mnt/
+BOOTROOTDEV?=  /dev/sd0i
+
 INCLUDES=  -nostdinc -I$S -I${.OBJDIR} -I$S/arch
 CPPFLAGS=  ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
 CWARNFLAGS=-Werror -Wall -Wimplicit-function-declaration \
@@ -139,6 +147,7 @@ vers.o: ${SYSTEM_DEP:Ngap.o}
 clean:
rm -f *bsd *bsd.gdb *.[dio] [a-z]*.s assym.* \
gap.link ld.script lorder makegap.sh param.c
+   [[ -z ${BOOTROOTDIR} ]] || umount -f ${BOOTROOtDEV}
 
 cleandir: clean
rm -f Makefile *.h ioconf.c options machine ${_mach} vers.c
@@ -154,14 +163,28 @@ context.o cp0access.o exception.o locore
 lcore_access.o lcore_ddb.o lcore_float.o tlbhandler.o: assym.h
 mips64r2.o: assym.h
 
-hardlink-obsd:
+hardlink-obsd: mount_bootroot
[[ ! -f /bsd ]] || cmp -s bsd /bsd || ln -f /bsd /obsd
+   [[ -z ${BOOTROOTDIR} && ! -f ${BOOTROOTDIR}/bsd ]] || \
+   cmp -s bsd ${BOOTROOTDIR}/bsd || \
+   ln -f ${BOOTROOTDIR}/bsd ${BOOTROOTDIR}/obsd
 
-newinstall:
+newinstall:mount_bootroot
umask 077 && cp bsd /nbsd && mv /nbsd /bsd && \
sha256 -h /var/db/kernel.SHA256 /bsd
+   [[ -z ${BOOTROOTDIR} ]] || \
+   cp /bsd ${BOOTROOTDIR}/nbsd && \
+   mv ${BOOTROOTDIR}/nbsd ${BOOTROOTDIR}/bsd
+
+mount_bootroot:
+   [[ -z ${BOOTROOTDIR} ]] || \
+   mount ${BOOTROOTDEV} /mnt
+
+umount_bootroot:
+   [[ -z ${BOOTROOTDIR} ]] || \
+   umount -f ${BOOTROOTDEV}
 
-install: update-link hardlink-obsd newinstall
+install: update-link hardlink-obsd newinstall umount_bootroot
 
 # pull in the dependency information
 .ifnmake clean



Duplicity & /etc/daily.local

2019-05-20 Thread Noth

Hi misc@,


  I'm trying to run daily backups to a sftp server for various VMs and 
devices on my network, and want to use /etc/daily.local for this. I'm 
calling this script from the daily.local file:


env 'GNUPG="/usr/local/bin/gpg" PASSPHRASE="mypassword"' 
/root/duplicity-hostname.sh


but unfortunately duplicity can't find gnupg and errors out with this 
error message:


Traceback (innermost last):
  File "/usr/local/bin/duplicity", line 1562, in 
with_tempdir(main)
  File "/usr/local/bin/duplicity", line 1548, in with_tempdir
fn()
  File "/usr/local/bin/duplicity", line 1387, in main
action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/local/lib/python2.7/site-packages/duplicity/commandline.py", line 
1088, in ProcessCommandLine
globals.gpg_profile = gpg.GPGProfile()
  File "/usr/local/lib/python2.7/site-packages/duplicity/gpg.py", line 92, in 
__init__
self.gpg_version = self.get_gpg_version(globals.gpg_binary)
  File "/usr/local/lib/python2.7/site-packages/duplicity/gpg.py", line 107, in 
get_gpg_version
res = gnupg.run(["--version"], create_fhs=["stdout"])
  File "/usr/local/lib/python2.7/site-packages/duplicity/gpginterface.py", line 
374, in run
create_fhs, attach_fhs)
  File "/usr/local/lib/python2.7/site-packages/duplicity/gpginterface.py", line 
423, in _attach_fork_exec
self._as_child(process, gnupg_commands, args)
  File "/usr/local/lib/python2.7/site-packages/duplicity/gpginterface.py", line 
462, in _as_child
os.execvp(command[0], command)
  File "/usr/local/lib/python2.7/os.py", line 346, in execvp
_execvpe(file, args)
  File "/usr/local/lib/python2.7/os.py", line 382, in _execvpe
func(fullname, *argrest)
 OSError: [Errno 2] No such file or directory

GPGError: failed to determine gnupg version of None from


duplicity-hostname.sh content:

#!/bin/ksh
PASSPHRASE=mypassword
/usr/local/bin/duplicity incremental /var sftp://user@backuphost:/hostname/var
/usr/local/bin/duplicity incremental /etc sftp://user@backuphost:/hostname/etc
/usr/local/bin/duplicity incremental /root sftp://user@backuphost:/hostname/root

Can daily.local even handle this or is the environment too limited?

Cheers,

Noth



octeon: make syspatch copy /bsd to real boot directory

2019-05-20 Thread gwes
Install on octeon correctly copies /bsd to the MSDOS filesystem
where the manufacturer's boot program finds it

It appears that syspatch doesn't. If so, fixing this is important
because as it stands security patches won't actually be installed
in running systems.

This is an * untested * * conceptual * patch. My only octeon
system is my firewall. Another can be purchased if consensus is
that this should be tested here.

I haven't looked for update-link yet

geoff steckel

Index: Makefile.octeon
===
RCS file: /cvs/src/sys/arch/octeon/conf/Makefile.octeon,v
retrieving revision 1.49
diff -u -p -r1.49 Makefile.octeon
--- Makefile.octeon 9 Feb 2018 03:59:15 -   1.49
+++ Makefile.octeon 20 May 2019 17:40:17 -
@@ -28,6 +28,14 @@ S!=  cd ../../../..; pwd
 _machdir?= $S/arch/${_mach}
 _archdir?= $S/arch/${_arch}
 
+# as long as there is no boot program which loads from ufs,
+# we must copy any kernels to the FAT filesystem where the
+# manufacturer provided finds it
+# this script assumes a valid partition and filesystem exist
+
+BOOTROOTDIR?=  /mnt/
+BOOTROOTDEV?=  /dev/sd0i
+
 INCLUDES=  -nostdinc -I$S -I${.OBJDIR} -I$S/arch
 CPPFLAGS=  ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
 CWARNFLAGS=-Werror -Wall -Wimplicit-function-declaration \
@@ -154,12 +162,22 @@ context.o cp0access.o exception.o locore
 lcore_access.o lcore_ddb.o lcore_float.o tlbhandler.o: assym.h
 mips64r2.o: assym.h
 
-hardlink-obsd:
+hardlink-obsd: mount_bootroot
[[ ! -f /bsd ]] || cmp -s bsd /bsd || ln -f /bsd /obsd
+   [[ -z $BOOTROOTDIR && ! -f $BOOTROOTDIR/bsd ]] || \
+   cmp -s bsd $BOOTROOTDIR/bsd || \
+   ln -f $BOOTROOTDIR/bsd $BOOTROOTDIR/obsd
 
-newinstall:
+newinstall:mount_bootroot
umask 077 && cp bsd /nbsd && mv /nbsd /bsd && \
sha256 -h /var/db/kernel.SHA256 /bsd
+   [[ -z $BOOTROOTDIR ]] || \
+   cp /bsd $BOOTROOTDIR/nbsd && \
+   mv $BOOTROOTDIR/nbsd $BOOTROOTDIR/bsd
+
+mount_bootroot:
+   [[ -z $BOOTROOTDIR ]] || \
+   mount -t $BOOTROOTDEV /mnt
 
 install: update-link hardlink-obsd newinstall
 



Re: I want to use I2Pd on OpenBSD.

2019-05-20 Thread porting
I have an unofficial I2pd port for OpenBSD

gopher://gopher.operationalsecurity.es/5/Software/I2pd/i2pd_2.25.0.tar.gz

It is not very sophisticate but it works.



Re: USB sound card not playing

2019-05-20 Thread Patrick Harper
See Errata 6 of this paper:

https://www.mouser.com/pdfdocs/5chipset3400chipsetspecupdate.PDF

If you have a B2 stepping of the Intel 3400 chipset then the only way you can 
get around it is with a PCI(e) USB card with a good chipset.

-- 
  Patrick Harper
  paia...@fastmail.com

On Mon, 20 May 2019, at 03:23, Tuyosi T wrote:
> Hi, Alexandre Ratchov
> 
> this PC is old(about 10 yeas old)  hitachi server (HA-8000) .
> 
> 
> the full dmesg is
> 
> # dmesg
> OpenBSD 6.5-current (GENERIC.MP) #17: Sun May 12 00:53:38 MDT 2019
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 8564375552 (8167MB)
> avail mem = 8294731776 (7910MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xf0d90 (25 entries)
> bios0: vendor Phoenix Technologies LTD version "F4" date 10/18/2010
> bios0: HITACHI HA8000/TS10
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S1 S4 S5
> acpi0: tables DSDT FACP TCPA SSDT DMAR APIC SLIC MCFG HPET SPCR EINJ
> HEST BERT SSDT ERST
> acpi0: wakeup devices PEG_(S4) PEG2(S4) P0P3(S4) P0P5(S4) PEX1(S4)
> PEX3(S4) PEX4(S4) PEX5(S4) EHI1(S1) EHI2(S1) LAN_(S5) PCIB(S1)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2527.37 MHz, 06-1e-05
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,MELTDOWN
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 132MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2526.99 MHz, 06-1e-05
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,MELTDOWN
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2526.99 MHz, 06-1e-05
> cpu2: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,MELTDOWN
> cpu2: 256KB 64b/line 8-way L2 cache
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 6 (application processor)
> cpu3: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2526.99 MHz, 06-1e-05
> cpu3: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,MELTDOWN
> cpu3: 256KB 64b/line 8-way L2 cache
> cpu3: smt 0, core 3, package 0
> ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
> acpimcfg0 at acpi0
> acpimcfg0: addr 0xe000, bus 0-16
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus -1 (PEG_)
> acpiprt1 at acpi0: bus -1 (PEG2)
> acpiprt2 at acpi0: bus 1 (P0P3)
> acpiprt3 at acpi0: bus 2 (P0P5)
> acpiprt4 at acpi0: bus 0 (PCI0)
> acpiprt5 at acpi0: bus 5 (PEX1)
> acpiprt6 at acpi0: bus 9 (PEX3)
> acpiprt7 at acpi0: bus 11 (PEX4)
> acpiprt8 at acpi0: bus 13 (PEX5)
> acpicpu0 at acpi0: !C2(500@64 mwait.1@0x10), C1(1000@1 mwait.1), PSS
> acpicpu1 at acpi0: !C2(500@64 mwait.1@0x10), C1(1000@1 mwait.1), PSS
> acpicpu2 at acpi0: !C2(500@64 mwait.1@0x10), C1(1000@1 mwait.1), PSS
> acpicpu3 at acpi0: !C2(500@64 mwait.1@0x10), C1(1000@1 mwait.1), PSS
> acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
> acpicmos0 at acpi0
> "PNP0A05" at acpi0 not configured
> acpibtn0 at acpi0: PWRB
> ipmi at mainbus0 not configured
> cpu0: Enhanced SpeedStep 2527 MHz: speeds: 2395, 2394, 2261, 2128,
> 1995, 1862, 1729, 1596, 1463, 1330, 1197 MHz
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel Core DMI" rev 0x11
> ppb0 at pci0 dev 3 function 0 "Intel Core PCIE" rev 0x11: msi
> pci1 at ppb0 bus 1
> ppb1 at pci0 dev 5 function 0 "Intel Core PCIE" rev 0x11: msi
> pci2 at ppb1 bus 2
> mfi0 at pci2 dev 0 function 0 "Symbios Logic MegaRAID SAS2108 GEN2"
> rev 0x03: apic 1 int 16
> mfi0: "LSI MegaRAID SAS 9261-8i", firmware 12.11.0-0025, 512MB cache
> scsibus1 at mfi0: 64 targets
> sd0 at scsibus1 targ 0 lun 0:  SCSI3 0/direct
> fixed naa.600605b0017435e02467bacc093ad921
> sd0: 557952MB, 512 bytes/sector, 1142685696 sectors