Re: Removal of old libraries
Amit Kulkarni wrote on 11/08/16 07:22: On Tue, Nov 8, 2016 at 12:53 AM, Clint Pachl wrote: Ax0n wrote on 09/03/16 13:12: I've got a Toshiba NB305 netbook that's been my daily-use laptop for more than 6 years now. The last fresh install I did was OpenBSD 4.9-RELEASE in early May 2011. I've been quite happy with how it works, and I've been doing bsd.rd upgrades and M:Tier binary updates ever since. There is a lot of seemingly unused cruft in /usr/local/lib -- stuff with an atime of my last level 0 dump several months ago. Looks like pkg_add -u left a bunch of stuff behind. Is there a recommended way to clean this stuff up, or should I just start chopping away with something like: find /usr/local/lib -type f -atime +90 | doas xargs rm (after a new level 0 dump, obviously...) Ax0n wrote on 09/03/16 13:12: I've got a Toshiba NB305 netbook that's been my daily-use laptop for more than 6 years now. The last fresh install I did was OpenBSD 4.9-RELEASE in early May 2011. I've been quite happy with how it works, and I've been doing bsd.rd upgrades and M:Tier binary updates ever since. There is a lot of seemingly unused cruft in /usr/local/lib -- stuff with an atime of my last level 0 dump several months ago. Looks like pkg_add -u left a bunch of stuff behind. Is there a recommended way to clean this stuff up, or should I just start chopping away with something like: find /usr/local/lib -type f -atime +90 | doas xargs rm (after a new level 0 dump, obviously...) I've been removing the old system during the upgrade script since 4.9, coincidentally. I haven't had a problem yet while upgrading two production servers and my two laptops, from release to release. After selecting the OS sets during the upgrade, but before hitting ENTER, type ! at the “Set name(s)?� prompt to enter a shell. Then run: `cd /mnt && rm -rf bin sbin usr/!(local) && exit`. Then just hit enter and continue running the upgrade script. WARNING: this will wipe out your system, so if the upgrade fails for some reason, you are TOTALLY SCREWED! I periodically (every few releases) clean out /usr/local. First, get a list of manually installed packages using `pkg_info -m`. Then uninstall everything. It is interesting to see what gets left behind. If any garbage is left over, remove it. Then reinstall from your generated list. I don't do this very often anymore as `pkg_delete -a` seems to clean up quite well. As insurance, I take level 0 dumps just before upgrading or cleaning /usr/local. Also, one of my laptops is a spare that has all the same software installed as the production servers and my main laptop. So this laptop is a test run if you will. If there are quirks, my main laptop is my second chance to make sure I know what the hell I'm doing before finally upgrading my two production systems. Also, just a public announcement, test your restore-from-backup process once in awhile. I've always thought about sharing this process, but always thought it is probably not the best advice. Clint, pkg_add sysclean This will restore your system as close to a new install as possible. What you are doing is quite dangerous. But the very next step in the upgrade blows away the system by overwriting it anyway. Right? What could happen? What if following the normal procedure of untaring the OS sets on top of the existing system fails midway? Then you have an inconsistent system too. I'd rather start with a clean slate and build on top of that than chip away at an existing, running system, which others have recommended via the sysclean package (I haven't looked at the code so I don't know what it does, but I wouldn't trust it until I inspected the code). I have all my OS sets and packages stored on a local server along with my level 0 dumps, which I've never needed by the way. If the worst happens, I just PXE boot the ramdisk image and do a quick restore of the system to where it was just before the upgrade. I've always liked the clean install process, and this modified process gets me close without actually doing a clean install. I've done this for 11 releases now with 4 systems without any problems. Just thought I'd share, but with the warnings I provided earlier. This behavior of mine may stem from my days as a hard-real-time embedded systems engineer where we had to get rid of every single byte that did not matter. I used to count the assembly instructions and add up all the clock cycles for each hardware interrupt routine to make sure we would never stall/slow the system. I just like minimal I guess.
Re: Laptop Recommendations?
Thanks for all the support everyone. I'm weighing my options. -Nate On Sat, Nov 12, 2016 at 04:20:15PM -0500, Donald Allen wrote: > On Sat, Nov 12, 2016 at 3:06 PM, Mihai Popescu wrote: > > > Folks, pay attention, please! The OP asked about a laptop. > > Pansonic Thoughbook is not a laptop! It's a real desktop. > > > es> I think the folks *are* paying attention. For example: > > https://www.amazon.com/Panasonic-Toughbook-Notebook-Silver-CF-54A0001CM/dp/B00V8KG91A/ref=sr_1_6?ie=UTF8&qid=1478980140&sr=8-6&keywords=toughbook+cf-54 > > > > > Thanks.
Re: Running OpenSMTPD at home behind a cloud proxy
On Sun, Nov 13, 2016 at 10:51:22PM +0100, Joris Vanhecke wrote: > Hey all, > > I'd like to pull my emails out of the cloud and run them on a local > server (pcengines APU2 looks good). > My ISP blocks tcp ports below 1024 and sending email from a residential > (dynamic) IP might mark my email as spam. > > Right now I'm thinking of renting a cheap VPS and using it as a proxy > for my home server which would use a dynamic DNS. > I don't really want a copy of the email on the VPS so I was planning to > use relayd or socat to route incoming traffic to my local OpenSMTPD > server. > > But I don't really see a way to proxy outgoing connections from smtpd... > > Any ideas? What about to have paused remote delivery on cloud proxy (and deliver on request initiated from home server) and paused remote delivery on home mail server as well and unpause the queue when you do tcp port forwardning to cloud host as well. Or just run VPN between cloud host and home host. If either of them won't be available your mail will stay in queue. j.
Re: Running OpenSMTPD at home behind a cloud proxy
On 14/11/16 07:51, Joris Vanhecke wrote: > Right now I'm thinking of renting a cheap VPS and using it as a proxy > for my home server which would use a dynamic DNS. > I don't really want a copy of the email on the VPS so I was planning to > use relayd or socat to route incoming traffic to my local OpenSMTPD > server. > > But I don't really see a way to proxy outgoing connections from smtpd... socat could do the job… provided you've got something to daemonise it. (e.g. supervisord) Another one to look at would be xinetd (isn't in ports, so that'll have to be hand compiled/installed) which amongst other things, can proxy a service. Something like: > service https_port_forward > { > flags = IPv6 # Use AF_INET6 as the protocol family > disable = no # Enable this service > type = UNLISTED# Not listed in standard system file > socket_type = stream # Use "stream" socket (aka TCP) > protocol = tcp # Protocol used by the service > user = nobody # Run proxy as user 'nobody' > wait = no # Do not wait for close, spawn a thread instead > redirect = yourhost.dynamicdns.service 65025 # Your OpenSMTPD server port > only_from = ::/0 0.0.0.0/0 # Allow world + dog > port = 25 # Listen on port 25 > } The 'yourhost.dynamicdns.service' could also be an entry in /etc/hosts too, since it's only the VPS that needs to know about it. I used something similar to work-around OpenVPN being unable to listen to a dual-stack TCP socket for port-sharing with HTTPS. https://stuartl.longlandclan.id.au/blog/2016/11/06/dual-stack-openvpn-port-sharing-with-https/ nginx also has a SMTP proxy feature: https://www.nginx.com/resources/admin-guide/mail-proxy/ Or you can go the whole hog and have your host VPN in to the VPS and have the VPS do firewall-level port forwarding, which side-steps what the ISP might do nicely. Hadn't heard of relayd though, I might have a look at it. -- Stuart Longland (aka Redhatter, VK4MSL) I haven't lost my mind... ...it's backed up on a tape somewhere.
Running OpenSMTPD at home behind a cloud proxy
Hey all, I'd like to pull my emails out of the cloud and run them on a local server (pcengines APU2 looks good). My ISP blocks tcp ports below 1024 and sending email from a residential (dynamic) IP might mark my email as spam. Right now I'm thinking of renting a cheap VPS and using it as a proxy for my home server which would use a dynamic DNS. I don't really want a copy of the email on the VPS so I was planning to use relayd or socat to route incoming traffic to my local OpenSMTPD server. But I don't really see a way to proxy outgoing connections from smtpd... Any ideas? Thanks, Joris
Re: OpenBSD 6.0 and emacs.
| Since going to 6.0 emacs-24.5p5-gtk2 has randomly and infrequently been non | responsive and consuming one CPU. Be very careful with this, you may run out of CPUs and who knows, this beast can randomly and quite frequently bite from your RAMs and SSDs ... in a non responsive feelings about your screams. | The only way to stop is a kill -9. This is on a 32 system, and the only thing | strange I did was to use gsettings-desktop-schemas-3.20.0p1 to stop the errors on | emacs initial load You mean to stop what? Eating all your computer? Ah, I see it, you are taliking about system 32 type. Yep, well known type, it looks like it is preffered by emacs. What again? Emacs called for help on gsettings-desktop-schemas? Bloody hell! Oh, this is the initial meal, only. Sorry, I mean load. I see it now. | Is this a known problem, and if not any ideas on how to track the problem down. Well, I don't know about "known problem", but I would try to put some salt on the remaining CPUs. Who knows, maybe emacs is not for salty things. Please, please, do not send your dmesg, 32 syste type is well known around here. Do not send some commands outputs, emacs is by itself explanatory.
Re: Mount HDD USB on 6.0 Stable: Fail
On Sun, 13 Nov 2016, Stephane HUC "CIOTBSD" wrote: > $ disklabel sd1 > # /dev/rsd1c: > type: SCSI > disk: SCSI disk > label: 3AS > duid: > flags: > bytes/sector: 512 > sectors/track: 63 > tracks/cylinder: 255 > sectors/cylinder: 16065 > cylinders: 38913 > total sectors: 625142448 > boundstart: 0 > boundend: 625142448 > drivedata: 0 > > 16 partitions: > #size offset fstype [fsize bsize cpg] > c:6251424480 unused > i:625139712 2048 MSDOS ^^^ Now that I've read your mail carefully... Why is your disk of type "MSDOS"? It should be "NTFS". Here's the output of disklabel for a ntfs formatted pendrive I have here: ---8<--- # /dev/rsd2c: type: SCSI disk: SCSI disk label: TS4GJFV30 duid: flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 498 total sectors: 8011774 boundstart: 0 boundend: 8011774 drivedata: 0 16 partitions: #size offset fstype [fsize bsize cpg] c: 80117740 unused i: 8009726 2048NTFS ---8<--- Ciao! David
Re: Mount HDD USB on 6.0 Stable: Fail
On 11/13/16 21:32, Mihai Popescu wrote: > Why don't you run hotplug-diskmount directly in a terminal an see what > is the message, if any? > As: # /usr/local/libexec/hotplug-diskmount cleanup 3AS # /usr/local/libexec/hotplug-diskmount attach 3AS # ls -al /vol/ total 16 drwxr-xr-x 4 root wheel 512 Nov 13 21:47 . drwxr-xr-x 14 root wheel 512 Nov 6 18:19 .. drwx-- 2 root wheel 512 Nov 13 21:47 .db drwx-- 2 my_userid wheel 512 Nov 13 21:47 3AS # ls -al /vol/3AS/ total 8 drwx-- 2 my_userid wheel 512 Nov 13 21:47 . drwxr-xr-x 4 root wheel 512 Nov 13 21:47 .. # -- ~ " Fully Basic System Distinguish Life! " ~ " Libre as a BSD " +=<<< Stephane HUC as PengouinPdt or CIOTBSD b...@stephane-huc.net
Re: Mount HDD USB on 6.0 Stable: Fail
Why don't you run hotplug-diskmount directly in a terminal an see what is the message, if any?
OpenBSD 6.0 and emacs.
Since going to 6.0 emacs-24.5p5-gtk2 has randomly and infrequently been non responsive and consuming one CPU. The only way to stop is a kill -9. This is on a 32 system, and the only thing strange I did was to use gsettings-desktop-schemas-3.20.0p1 to stop the errors on emacs initial load Is this a known problem, and if not any ideas on how to track the problem down.
Re: Mount HDD USB on 6.0 Stable: Fail
Not anyway! It's installed ;) $ pkg_info -Q ntfs ntfs_3g-2016.2.22 (installed) On 11/13/16 18:44, David Coppa wrote: > On Sun, Nov 13, 2016 at 5:16 PM, Stephane HUC "CIOTBSD" > wrote: >> Hi, all >> >> I attempt to mount an external HDD, on my OBSD 6.0 stable. >> For this, i use 'hotplug-diskmount' in version 1.0.2 downloaded on this url: >> >> https://bitbucket.org/alex_vatchenko/hotplug-diskmount/get/HOTPLUG_DISKMOUNT_1_0_2_RELEASE.tar.gz >> >> Because, this version seems to support NTFS. >> (see, official info on the webpage project: >> http://www.bsdua.org/hotplug-diskmount.html) >> >> I configured /etc/rc.conf.local as: >> $ egrep "hotplug" /etc/rc.conf.local >> >> hotplugd_flags= >> >> After adding Fuse package, i make and install: >> $ pkg_info -Q fuse >> enblend-enfuse-4.0p4 >> exfat-fuse-1.2.4 (installed) >> fuse-1.1.1p0 (installed) >> fuse-utils-1.1.1p1 (installed) >> fuse-zip-0.4.0 (installed) >> libconfuse-2.7p3 >> py-defusedxml-0.4.1p0 >> sshfs-fuse-2.5 (installed) > You're probably missing ntfs_3g: > > # pkg_add ntfs_3g > quirks-2.270 signed on 2016-11-12T12:50:18Z > ntfs_3g-2016.2.22: ok > > Install it, and retry. > > Ciao! > David -- ~ " Fully Basic System Distinguish Life! " ~ " Libre as a BSD " +=<<< Stephane HUC as PengouinPdt or CIOTBSD b...@stephane-huc.net
Re: Mount HDD USB on 6.0 Stable: Fail
On Sun, Nov 13, 2016 at 5:16 PM, Stephane HUC "CIOTBSD" wrote: > Hi, all > > I attempt to mount an external HDD, on my OBSD 6.0 stable. > For this, i use 'hotplug-diskmount' in version 1.0.2 downloaded on this url: > > https://bitbucket.org/alex_vatchenko/hotplug-diskmount/get/HOTPLUG_DISKMOUNT_1_0_2_RELEASE.tar.gz > > Because, this version seems to support NTFS. > (see, official info on the webpage project: > http://www.bsdua.org/hotplug-diskmount.html) > > I configured /etc/rc.conf.local as: > $ egrep "hotplug" /etc/rc.conf.local > > hotplugd_flags= > > After adding Fuse package, i make and install: > $ pkg_info -Q fuse > enblend-enfuse-4.0p4 > exfat-fuse-1.2.4 (installed) > fuse-1.1.1p0 (installed) > fuse-utils-1.1.1p1 (installed) > fuse-zip-0.4.0 (installed) > libconfuse-2.7p3 > py-defusedxml-0.4.1p0 > sshfs-fuse-2.5 (installed) You're probably missing ntfs_3g: # pkg_add ntfs_3g quirks-2.270 signed on 2016-11-12T12:50:18Z ntfs_3g-2016.2.22: ok Install it, and retry. Ciao! David
Mount HDD USB on 6.0 Stable: Fail
Hi, all I attempt to mount an external HDD, on my OBSD 6.0 stable. For this, i use 'hotplug-diskmount' in version 1.0.2 downloaded on this url: https://bitbucket.org/alex_vatchenko/hotplug-diskmount/get/HOTPLUG_DISKMOUNT_1_0_2_RELEASE.tar.gz Because, this version seems to support NTFS. (see, official info on the webpage project: http://www.bsdua.org/hotplug-diskmount.html) I configured /etc/rc.conf.local as: $ egrep "hotplug" /etc/rc.conf.local hotplugd_flags= After adding Fuse package, i make and install: $ pkg_info -Q fuse enblend-enfuse-4.0p4 exfat-fuse-1.2.4 (installed) fuse-1.1.1p0 (installed) fuse-utils-1.1.1p1 (installed) fuse-zip-0.4.0 (installed) libconfuse-2.7p3 py-defusedxml-0.4.1p0 sshfs-fuse-2.5 (installed) $ make cc -O2 -pipe-c hotplug-diskmount.c hotplug-diskmount.c: In function 'do_mount': hotplug-diskmount.c:355: warning: passing argument 2 of 'execv' from incompatible pointer type hotplug-diskmount.c: In function 'do_fsck': hotplug-diskmount.c:388: warning: passing argument 2 of 'execv' from incompatible pointer type hotplug-diskmount.c: In function 'do_ntfs3g': hotplug-diskmount.c:434: warning: passing argument 2 of 'execv' from incompatible pointer type hotplug-diskmount.c: In function 'get_ntfs3g_label': hotplug-diskmount.c:469: warning: passing argument 2 of 'execv' from incompatible pointer type cc -o hotplug-diskmount hotplug-diskmount.o # make install install -c -S -s -o root -g bin -m 555 hotplug-diskmount /usr/local/libexec/hotplug-diskmount install -c -o root -g bin -m 444 hotplug-diskmount.8 /usr/share/man/man8/hotplug-diskmount.8 I initialize hotplug-diskmount: # /usr/local/libexec/hotplug-diskmount init And, set enable and active this: # rcctl enable hotplugd # rcctl start hotplugd The file /etc/hotplug/attach contains: #!/bin/sh # # /etc/hotplug/{attach,detach} DEVCLASS=$1 DEVNAME=$2 LOGIN="my_user" case "${DEVCLASS}" in 2) /usr/local/libexec/hotplug-diskmount attach -u "$LOGIN" -m 0700 "$DEVNAME" ;; esac Thoses rights are: $ ls -al /etc/hotplug/attach -rwxr-xr-x 1 root wheel 212 Nov 6 12:52 /etc/hotplug/attach* OK?! When i attempt to mount NTFS USB HDD, it fails. # dmesg (...) umass0 at uhub0 port 2 configuration 1 interface 0 "JMicron USB to ATA/ATAPI bridge" rev 2.00/1.00 addr 6 umass0: using SCSI over Bulk-Only scsibus4 at umass0: 2 targets, initiator 0 sd1 at scsibus4 targ 1 lun 0: SCSI2 0/direct fixed serial.152d232951A8 sd1: 305245MB, 512 bytes/sector, 625142448 sectors $ disklabel sd1 # /dev/rsd1c: type: SCSI disk: SCSI disk label: 3AS duid: flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 38913 total sectors: 625142448 boundstart: 0 boundend: 625142448 drivedata: 0 16 partitions: #size offset fstype [fsize bsize cpg] c:6251424480 unused i:625139712 2048 MSDOS $ mount | egrep "sd1" $ $ ls -al /vol/ total 16 drwxr-xr-x 4 root wheel 512 Nov 13 16:05 ./ drwxr-xr-x 14 root wheel 512 Nov 6 18:19 ../ drwx-- 2 root wheel 512 Nov 13 16:05 .db/ drwx-- 2 my_userid wheel 512 Nov 13 16:05 3AS/ $ ls -al /vol/3AS/ total 8 drwx-- 2 zou wheel 512 Nov 13 16:05 ./ drwxr-xr-x 4 root wheel 512 Nov 13 16:05 ../ Nothing, it's displaying. If, i wrote: # mount /dev/sd1i usb/ mount_msdos: /dev/sd1i on /home/zou/usb: not an MSDOS filesystem Normal, it's really NTFS! When i use mount_ntfs: # mount_ntfs /dev/sd1i usb/ $ ls -al usb/ total 150472 -rwxr-xr-x 1 my_userid my_userid 2560 Jan 1 1601 $AttrDef* -rwxr-xr-x 1 my_userid my_userid 0 Mar 16 2015 $BadClus* -rwxr-xr-x 1 my_userid my_userid 9767808 Jan 1 1601 $Bitmap* -rwxr-xr-x 1 my_userid my_userid 8192 Mar 16 2015 $Boot* drwxr-xr-x 1 my_userid my_userid 0 Mar 16 2015 $Extend/ -rwxr-xr-x 1 my_userid my_userid 67108864 Mar 16 2015 $LogFile* -rwxr-xr-x 1 my_userid my_userid 4096 Mar 16 2015 $MFTMirr* drwxr-xr-x 1 my_userid my_userid 0 Nov 9 09:49 $RECYCLE.BIN/ -rwxr-xr-x 1 my_userid my_userid 0 Mar 16 2015 $Secure* -rwxr-xr-x 1 my_userid my_userid131072 Jan 1 1601 $UpCase* -rwxr-xr-x 1 my_userid my_userid 0 Mar 16 2015 $Volume* drwxr-xr-x 1 my_userid my_userid 0 Jan 1 1601 ./ drwxr-xr-x 37 my_userid my_userid 1536 Nov 13 15:48 ../ -rwxr-xr-x 1 my_userid my_userid21 Nov 2 05:50 .cm0013* drwxr-xr-x 1 my_userid my_userid 0 Oct 18 10:36 Data/ -rwxr-xr-x 1 my_userid my_userid 7260 Nov 2 05:50 DataMigrationScript Sirius to Sirius.bat* drwxr-xr-x 1 my_userid my_userid 0 Oct 28 13:01 Documentation/ drwxr-xr-x 1 my_userid my_userid 0 Oct 21 12:59 Drivers/ drwxr-xr-x 1 my_userid my_userid 0 Nov 2 05:00 FBSD/ -rwxr-xr-x 1 my_userid my_userid 1488 Nov 2 05:50 Licence Evaluation.spi* drwxr-xr-x 1 my_u