Re: command to strip suffix in .sh script
On 06/02/2010 04:30, Matthew Seaman wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/06/2010 09:24:01, Matthias Apitz wrote: El dÃa Wednesday, June 02, 2010 a las 04:15:22PM +0800, Aiza escribió: I have this code [snip] $ echo 'archivename-201006021514.34.tar.gz' | sed 's/-.*$//' archive_name=${fromarchive%-*} Thanks Matthew, that's really neat. It took me a long time to find the correct google incantation to find the documentation for that. ( bourne shell pattern-matching notation ) Sure is nice to learn something new everyday. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: I can't execute a script in crontab
On 05/18/2010 14:52, Yavuz Maþlak wrote: I use freebsd7.2 I wish to send a file using crontab as periodic. I have a script to send the file. When I am root, I can execute my script, but I can't execute the script using crontab. How can I run it ? cat myscript /usr/bin/scp -i /root/.ssh/id_rsa.pub /root/cpfile When using scp's -i (identity) switch, you should specify the private key file, not the public key file. Perhaps this is the problem you are having. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Experiencing blank @pkgdep entries
Hi, I tried to do some port maintenance, specifically, updating python and its ports to 2.6. I used the instructions in UPDATING for portmaster: 20090608: AFFECTS: users of lang/python* and py-* AUTHOR: m...@freebsd.org The default version of Python has been changed from 2.5.x to 2.6.x. ... # portmaster -o lang/python26 lang/python25 I did not retain 2.5 as the default, so I did not create the make.conf variable entry, nor did I run the 'portupgrade -R python' command (I deduced the portupgrade -R command was for those who wish to retain 2.5, was that correct?). Anyway, I ran: # cd /usr/ports/lang/python make upgrade-site-packages -DUSE_PORTMASTER Aside: From memory, I saw some complaints about libtool15/22 pass by. Must one follow the UPDATING's timeline in reverse when doing an upgrade that might touch many files? I.e. should I have run the libtool/libtldl upgrade before python's? To continue: It chugged along (while annoyingly asking me about deleting distfiles) until it hung on a fetch (net issues). I hit CTRL-C and reran the above make command. It continued and ended after a while with a status report of quite a few update failures with 'uninstall errors'. These were due to pkg_delete or 'make deinstall' dumping core on blank @pkgdep lines in various ports' +CONTENTS files. These blank pkgdep entries weren't there before I started the upgrade process, as evidenced by my current backup of the /var/db/pkg database, which has no blank entries in any +CONTENTS files. I got a nice command line from the net somewhere: grep -E '^@(pkgdep|name)[[:space:]]*$' /var/db/pkg/*/+CONTENTS I don't believe hitting CTRL-C during the fetch could have caused ALL these blank @pkgdep lines. There were upwards of 50 ports with this problem after running the make commands. Is this a know problem? I've only seen a couple of threads and they were one-off's (i.e. one port affected only). I restored from backup, but I'd still like to upgrade python. Hopefully, I can achieve this without corrupting my port databases. Anyone have any information or comments? Thanks a lot! Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
geli disk marked as dirty on normal shutdown/reboot
Hi List, # uname -a FreeBSD the.palaceofretention.ca 7.1-RELEASE-p6 FreeBSD 7.1-RELEASE-p6 #0: Tue Jun 9 16:26:47 UTC 2009 r...@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 I have a geli backed ufs file system: ===fstab=== # ad14.eli esata /dev/ufs/E1TB /edisks/esata0 ufs rw,noauto2 2 I use a passphrase to attach it: # geli attach ad14 Enter passphrase: ** The provider shows up as ad14.eli as expected. The file system on it has a label of E1TB (as seen above). The command: # mount /dev/ufs/E1TB usually works fine. The problem is that if I restart the system normally, the file system on the provider ad14.eli, when reattached, is marked as dirty and I get the usual operation not permitted error. I have to run: # fsck -t ufs /dev/ad14.eli before I can mount it again. This is repeatable and occurs for more than just the one geli provider I use in this example. Am I missing something with respect to properly attaching a geli device? Do I need the '-d' option to detach at last close? Thanks for any help. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: geli disk marked as dirty on normal shutdown/reboot
Polytropon wrote: On Mon, 31 Aug 2009 21:22:14 -0500, Adam Vande More amvandem...@gmail.com wrote: Usually I just umount before close. I don't get the need to fsck then. Does this mean you observe the same behaviour? I.e. a geli-backed file system mounted and listed in the fstab is not properly unmounted at shutdown? You could add the umount command to /etc/rc.shutdown.local so the system would automatically umount the partition, even if you reboot. It is my understanding that file systems listed in the /etc/fstab file are unmounted at system shutdown. Is this correct? If not, that would be a pretty big WTF?, if you ask me. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: geli authentication algo and newfs weirdness
Vinny wrote: Hello Everyone, I've been reading up on geli and decided I wanted to use data authentication. This involves the -a switch on the geli init command. Here's what I've found: = No authentication (the disk size is correct @ 152G): the/root{143}~# geli init da1 Enter new passphrase: Reenter new passphrase: the/root{144}~# geli attach da1 Enter passphrase: the/root{147}~# newfs -N /dev/da1.eli /dev/da1.eli: 152627.8MB (312581804 sectors) block size 16384, fragment size 2048 using 831 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. super-block backups (for fsck -b #) at: 160, 376512, 752864, ... the/root{148}~# newfs /dev/da1.eli /dev/da1.eli: 152627.8MB (312581804 sectors) block size 16384, fragment size 2048 using 831 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. super-block backups (for fsck -b #) at: 160, 376512, 752864, 1129216, ... = With hmac/sha256 (or any other) authentication (small disk size 76G) : the/root{156}~# geli init -a hmac/sha256 /dev/da1 Enter new passphrase: Reenter new passphrase: the/root{157}~# the/root{157}~# geli attach da1 Enter passphrase: the/root{159}~# newfs -N /dev/da1.eli /dev/da1.eli: 76313.9MB (156290900 sectors) block size 16384, fragment size 2048 using 416 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. super-block backups (for fsck -b #) at: 160, 376512, 752864, ... the/root{163}~# newfs /dev/da1.eli /dev/da1.eli: 76313.9MB (156290900 sectors) block size 16384, fragment size 2048 using 416 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. newfs: can't read old UFS1 superblock: read error from block device: Invalid argument the/root{110}~# geli dump -v da1 Metadata on da1: magic: GEOM::ELI version: 3 flags: 0x10 ealgo: AES-CBC keylen: 128 aalgo: HMAC/SHA256 provsize: 160041885696 sectorsize: 512 keys: 0x01 iterations: 67988 Salt: c708 = Anyone know what I've done wrong? Is data authentication working? Thanks! Vinny The eventual solution came from Richard Farr. A few messages later and here are the results: I Wrote; Hello Richard and Thanks! Sorry for my late reply. Richard Farr wrote: Hi Vinny, I had this problem as well when trying to initialize a disk with GELI and create slices/partitions/fs. I believe the problem is caused because the sectors of the newly created GELI device still have whatever data was in them from before the geli init command. Therefore, this data will not have the correct mac inside of the sector. It looks like newfs attempts to read from some of these unitialized sectors - causing a mac verification failure and a read error. In order to fix this, simply attach the geli device and then use dd to write to all sectors of the device to update them with a correct mac: dd if=/dev/random of=/dev/da1.eli bs=8M Once this is done newfs should work like a charm. Indeed, the results follow, but I'd like to thank you for the solution. I had habitually used dd on the raw device before running geli init. That is, dd if=/dev/random of=/dev/da2 bs=1m Then I'd init it. Didn't occur to me that doing that on the da2.eli device would solve the newfs problem. The results: the/root{120}~# geli init -a hmac/sha256 /dev/da2 Enter new passphrase: Reenter new passphrase: the/root{121}~# geli attach da2 Enter passphrase: the/root{122}~# newfs -N /dev/da2.eli /dev/da2.eli: 977.0MB (2000876 sectors) block size 16384, fragment size 2048 using 6 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. super-block backups (for fsck -b #) at: 160, 376512, 752864, 1129216, 1505568, 1881920 the/root{123}~# newfs /dev/da2.eli /dev/da2.eli: 977.0MB (2000876 sectors) block size 16384, fragment size 2048 using 6 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. newfs: can't read old UFS1 superblock: read error from block device: Invalid argument the/root{124}~# dd if=/dev/random of=/dev/da2.eli bs=1m load: 1.15 cmd: dd 96350 [physwr] 0.00u 30.56s 9% 1668k 747+0 records in 746+0 records out 782237696 bytes transferred in 322.992946 secs (2421841 bytes/sec) dd: /dev/da2.eli: short write on character device dd: /dev/da2.eli: end of device 977+0 records in 976+1 records out 1024450048 bytes transferred in 422.242968 secs (2426210 bytes/sec) the/root{125}~# newfs -N /dev/da2.eli /dev/da2.eli: 977.0MB (2000876 sectors) block size 16384, fragment size 2048 using 6 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. super-block backups (for fsck -b #) at: 160, 376512, 752864, 1129216, 1505568, 1881920 the/root{126}~# newfs /dev/da2.eli /dev/da2.eli: 977.0MB (2000876 sectors) block size 16384, fragment size 2048 using 6 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. super-block backups (for fsck -b #) at: 160, 376512, 752864, 1129216, 1505568, 1881920 Success! Vinny
Re: Suggestions for PII 400 boot failure
Chris Pratt wrote: On Nov 20, 2008, at 4:31 PM, Vinny wrote: Hi, A friend of mine is trying out FreeBSD and ran into a booting problem. Here is his message: Well, that's discouraging. I have put together an old PII 400 with three 20GB drives and a CDROM that I'd like to run BSD on. Half a GB of RAM I figured would be respectable. Downloaded the ISO files, burned CDs of them and when I try to run them it starts to boot and then freezes tighter than a muskrat's arse. Three lines coming on the screen and it ends with Starting the_ and just hangs. He might want to try downloading the floppy set and booting from there. I think that is what I did on an old Dell 200 I'm using as a bridging firewall at home. This is a pathetically old machine and won't boot the ISO (I found it when cleaning out my rental, left to throw away by the renter), but it works great once you finally get the system on it. It's on 6.2 but I imagine 7.0 will be fine. Thanks everyone for your help, Here is a message from my friend: Well, it's been a long day but I've had some success on the BSD front. I went to a couple of used/recycling/salvage places today looking for a PIII or low-end P4 motherboard and processor. I didn't see anything that was very interesting so toodled on home and had a cup of tea. I decided since the system was essentially running fine (without an OS) that I'd give the floppy disk install a bit of a run. So I downloaded all the floppy disk image files and fdimage.exe (the utility to convert them) and created all the necessary floppy disks. I did a simple install, paritioned the drives and created a user and administrator account along with some basic network settings. It seemed to connect to the internet just fine during boot up and when I ran ping against google.ca I was receiving back valid addressing information so it appears that that is all working fine. So I ran /usr/sbin/sysinstall from the root directory to try to customize the installation a bit better. I adjusted the media type to an ftp server as opposed to CDROM and POOF... Bob Shurunkel... BSD is now downloading an X-Windows interface from the internet as we (or I in this case) speak. I suspect there's going to be a bit of a learning curve here but I'm looking forward to it. It could have been much simpler if I would have been able to install from CD to being with but there definitely is a workaround which, in itself, pleases me. Will keep you posted. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Suggestions for PII 400 boot failure
Hi, A friend of mine is trying out FreeBSD and ran into a booting problem. Here is his message: Well, that's discouraging. I have put together an old PII 400 with three 20GB drives and a CDROM that I'd like to run BSD on. Half a GB of RAM I figured would be respectable. Downloaded the ISO files, burned CDs of them and when I try to run them it starts to boot and then freezes tighter than a muskrat's arse. Three lines coming on the screen and it ends with Starting the_ and just hangs. I've got a PIII 1000 here that I use as a file server and the boot disks run fine on that. Just won't boot off the PII 400. Weird. Really, really weird. I tried five different CDROMs in case it was the actual drive but same thing. I tried using version 6.3 instead of release 7.0 and same thing. That system doesn't like BSD/Linux whatever. I use GParted as a partition manager all the time which is bootable and same thing on that machine. It just don't like booting to that OS. Any suggestions? Thanks Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ScreenCapturing tool for FreeBSD-7.0 Release
dhaneshk k wrote: HI all ; Can anyone recommend a working screencapturing tool such as XvidCap for FreeBSD-7.0 , I installed XvidCap but its not working any other tools OR Solutions for doing screen Capturing .. It will be useful for demo presentations alot.. Thanks in advance I've used Ksnapshot (part of KDE) very successfully in X. On the console, vidcontrol is an option along with the various scr2txt, scr2png utilities. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: geli and soft-updates
Fabian Keil wrote: Oliver Peter [EMAIL PROTECTED] wrote: On Sat, Sep 20, 2008 at 09:45:29PM -0400, Vinny wrote: ... [...] I'm using ZFS on geli on my production server with 2 SATA2 disks. Just create and attach the geli devices in /dev and then create a zpool i.e. with # zpool create crypt /dev/ad3.eli /dev/ad6.eli Works splendid. I'm using ZFS on three geli encrypted slices, the only problem I ran into was: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/117158 zpool scrub causes panic if geli vdevs detach on last close Thanks for your feedback. I'm going to give it another try. I used to run ZFS on top of geli but I had kernel panics. I changed the providers to normal non-geli disks but still had panics. I found out later that the panics were kernel memory related (kmem_malloc) since ZFS wants a lot. I increased two of the kernel memory parameters and haven't seen a panic again. vm.kmem_size: 512M vm.kmem_size_max: 512M I guess I'll have to try the geli disks again now that the memory has been increased. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: geli authentication algo and newfs weirdness
Wojciech Puchar wrote: the/root{156}~# geli init -a hmac/sha256 /dev/da1 Enter new passphrase: Reenter new passphrase: the/root{157}~# the/root{157}~# geli attach da1 Enter passphrase: check what is default (and possibly minimum) sector size for hmac/sha256 fragment size of UFS can't be less ___ From the geli dump output I supplied, it looks like the sector size is 512. the/root{110}~# geli dump -v da1 Metadata on da1: [...] aalgo: HMAC/SHA256 provsize: 160041885696 sectorsize: 512 newfs is using a fragment size of 2048, it also only sees half of the disk--76G instead of 152G the/root{163}~# newfs /dev/da1.eli /dev/da1.eli: 76313.9MB (156290900 sectors) block size 16384, fragment size 2048 using 416 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. newfs: can't read old UFS1 superblock: read error from block device: Invalid argument Any other ideas? Without the authentication, geli provider sector size is 4096. Should I specify a fragment size of 512 with newfs -f 512? Thanks for your help. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: geli and soft-updates
Wojciech Puchar wrote: I'm wondering if soft-updates on UFS2 should be enabled on a geli provided disk, da1.eli, for example. That is, same as without geli. geli device behaves like normal disk/partition, just it's encrypted. Wojciech, Thanks for your answer. I was wondering what the current state of opinion was for using soft-updates on top of a geli provider. From what I've read, disk write caching reduces the effectiveness of soft-updates. I was curious if geli with authentication would obsolete soft-updates or not. I may be mis-understanding soft-updates. P.S. Anyone running ZFS on multiple geli providers? as above. Does that mean you are/aren't or have/haven't run ZFS on top of, say, 3 geli encrypted disks? I'm curious as to whether there are many people who have tried it, and use it. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
geli and soft-updates
Hi, I'm wondering if soft-updates on UFS2 should be enabled on a geli provided disk, da1.eli, for example. That is, should I use -U: newfs -U /dev/da1.eli or not use -U? newfs /dev/da1.eli Will -U help with crash corruption protection on a geli provider? Does my question make sense? Thanks for your experiences/expertise. Vinny P.S. Anyone running ZFS on multiple geli providers? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
geli authentication algo and newfs weirdness
Hello Everyone, I've been reading up on geli and decided I wanted to use data authentication. This involves the -a switch on the geli init command. Here's what I've found: = No authentication (the disk size is correct @ 152G): the/root{143}~# geli init da1 Enter new passphrase: Reenter new passphrase: the/root{144}~# geli attach da1 Enter passphrase: the/root{147}~# newfs -N /dev/da1.eli /dev/da1.eli: 152627.8MB (312581804 sectors) block size 16384, fragment size 2048 using 831 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. super-block backups (for fsck -b #) at: 160, 376512, 752864, ... the/root{148}~# newfs /dev/da1.eli /dev/da1.eli: 152627.8MB (312581804 sectors) block size 16384, fragment size 2048 using 831 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. super-block backups (for fsck -b #) at: 160, 376512, 752864, 1129216, ... = With hmac/sha256 (or any other) authentication (small disk size 76G) : the/root{156}~# geli init -a hmac/sha256 /dev/da1 Enter new passphrase: Reenter new passphrase: the/root{157}~# the/root{157}~# geli attach da1 Enter passphrase: the/root{159}~# newfs -N /dev/da1.eli /dev/da1.eli: 76313.9MB (156290900 sectors) block size 16384, fragment size 2048 using 416 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. super-block backups (for fsck -b #) at: 160, 376512, 752864, ... the/root{163}~# newfs /dev/da1.eli /dev/da1.eli: 76313.9MB (156290900 sectors) block size 16384, fragment size 2048 using 416 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. newfs: can't read old UFS1 superblock: read error from block device: Invalid argument the/root{110}~# geli dump -v da1 Metadata on da1: magic: GEOM::ELI version: 3 flags: 0x10 ealgo: AES-CBC keylen: 128 aalgo: HMAC/SHA256 provsize: 160041885696 sectorsize: 512 keys: 0x01 iterations: 67988 Salt: c708 = Anyone know what I've done wrong? Is data authentication working? Thanks! Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: OO 2.4.1 package problem
Ghirai wrote: Alright, installed from ports, and it's working as it should. And it only took about 4 hours. I'm glad to hear that the port worked for you. Four hours is pretty good, I remember my old system took 11 hours, once. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: disk writer utility
Oliver Fromme wrote: Dánielisz László wrote: What is your favorite disk writer utility? (under X) cdrecord for CDs, growisofs for DVDs. (in an xterm) I quite like K3B. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: OO 2.4.1 package problem
Hi Ghirai, I installed OOo_2.4.1_FreeBSD70Intel_install_en-US.tbz, along with the required deps, as well as diablo-jre-freebsd7.i386.1.6.0.07.02.tbz. Now i'm getting this error: [EMAIL PROTECTED] /usr/home/ghirai]$ openoffice.org-2.4.1 javaldx: Could not find a Java Runtime Environment! The application cannot be started. The component manager is not available. Segmentation fault (core dumped) I ran into this error using the package you mention. It turned out to be a problem with javaldx not recognizing the FreeBSD Foundation as a provider of a Java run-time. I had to fix it by updating my ports tree and building OOo from source. Hopefully, this is possible on your system. I read about it in the openoffice at freebsd mailing list. The new source has the javaldx fix. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
How did references to libc.so.7 get in my 6.3 ports?
) libgstaudio-0.10.so.0 = /usr/local/lib/libgstaudio-0.10.so.0 (0x28b5f000) libgstbase-0.10.so.0 = /usr/local/lib/libgstbase-0.10.so.0 (0x28b76000) libgstinterfaces-0.10.so.0 = /usr/local/lib/libgstinterfaces-0.10.so.0 (0x28b9a000) libXxf86vm.so.1 = /usr/local/lib/libXxf86vm.so.1 (0x28ba3000) libdbus-glib-1.so.2 = /usr/local/lib/libdbus-glib-1.so.2 (0x28ba8000) libdbus-1.so.3 = /usr/local/lib/libdbus-1.so.3 (0x28bc2000) libXtst.so.6 = /usr/local/lib/libXtst.so.6 (0x28bf9000) libgstpbutils-0.10.so.0 = /usr/local/lib/libgstpbutils-0.10.so.0 (0x28bfe000) libgstreamer-0.10.so.0 = /usr/local/lib/libgstreamer-0.10.so.0 (0x28c08000) libgobject-2.0.so.0 = /usr/local/lib/libgobject-2.0.so.0 (0x28c9a000) libgmodule-2.0.so.0 = /usr/local/lib/libgmodule-2.0.so.0 (0x28cd4000) libgthread-2.0.so.0 = /usr/local/lib/libgthread-2.0.so.0 (0x28cd8000) libxml2.so.5 = /usr/local/lib/libxml2.so.5 (0x28cdd000) libz.so.3 = /lib/libz.so.3 (0x28dff000) libm.so.4 = /lib/libm.so.4 (0x28e1) libglib-2.0.so.0 = /usr/local/lib/libglib-2.0.so.0 (0x28e29000) libintl.so.8 = /usr/local/lib/libintl.so.8 (0x28ec8000) libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x28ed1000) libXrandr.so.2 = /usr/local/lib/libXrandr.so.2 (0x28fc6000) libXext.so.6 = /usr/local/lib/libXext.so.6 (0x28fcc000) libXrender.so.1 = /usr/local/lib/libXrender.so.1 (0x28fd9000) libX11.so.6 = /usr/local/lib/libX11.so.6 (0x28fe1000) libXau.so.6 = /usr/local/lib/libXau.so.6 (0x290c5000) libXdmcp.so.6 = /usr/local/lib/libXdmcp.so.6 (0x290c8000) librpcsvc.so.3 = /usr/lib/librpcsvc.so.3 (0x290cd000) libpthread.so.2 = /lib/libpthread.so.2 (0x290d5000) libc.so.6 = /lib/libc.so.6 (0x290f9000) libc.so.7 = not found (0x0) libicui18n.so.36 = /usr/local/lib/libicui18n.so.36 (0x291db000) libpcre.so.0 = /usr/local/lib/libpcre.so.0 (0x29301000) libgailutil.so.18 = /usr/local/lib/libgailutil.so.18 (0x29325000) libXcomposite.so.1 = /usr/local/lib/libXcomposite.so.1 (0x2932c000) libXdamage.so.1 = /usr/local/lib/libXdamage.so.1 (0x2932f000) libm.so.5 = not found (0x0) libc.so.7 = not found (0x0) libz.so.4 = not found (0x0) libm.so.5 = not found (0x0) libthr.so.3 = not found (0x0) libc.so.7 = not found (0x0) libz.so.4 = not found (0x0) libm.so.5 = not found (0x0) libthr.so.3 = not found (0x0) libc.so.7 = not found (0x0) libm.so.5 = not found (0x0) libc.so.7 = not found (0x0) libm.so.5 = not found (0x0) libz.so.4 = not found (0x0) libthr.so.3 = not found (0x0) libc.so.7 = not found (0x0) libz.so.4 = not found (0x0) libm.so.5 = not found (0x0) libthr.so.3 = not found (0x0) libc.so.7 = not found (0x0) libz.so.4 = not found (0x0) libm.so.5 = not found (0x0) libc.so.7 = not found (0x0) libm.so.5 = not found (0x0) libc.so.7 = not found (0x0) libthr.so.3 = not found (0x0) libc.so.7 = not found (0x0) libthr.so.3 = not found (0x0) libc.so.7 = not found (0x0) libthr.so.3 = not found (0x0) libc.so.7 = not found (0x0) libthr.so.3 = not found (0x0) libc.so.7 = not found (0x0) libc.so.7 = not found (0x0) libc.so.7 = not found (0x0) libthr.so.3 = not found (0x0) libc.so.7 = not found (0x0) libz.so.4 = not found (0x0) libm.so.5 = not found (0x0) libc.so.7 = not found (0x0) libc.so.7 = not found (0x0) libicuuc.so.36 = /usr/local/lib/libicuuc.so.36 (0x29332000) libicudata.so.36 = /usr/local/lib/libicudata.so.36 (0x29439000) libstdc++.so.5 = /usr/lib/libstdc++.so.5 (0x29de9000) Does anyone have any guidance on how to recover from this? Also, have any packages built on FreeBSD 7 been inadvertently placed in a 6.x repository? Am I missing something obvious? Other possible problem: Power cycle crash occurred a day or so earlier. The fsck processes did not required manual intervention on the next boot--is this an indication that no files were lost? Could I have lost some files (like libc.so.7, for instance) because of the crash? Thanks for helping, Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How did references to libc.so.7 get in my 6.3 ports?
E. J. Cerejo wrote: On Sun, 09 Mar 2008 20:12:45 -0400 Vinny [EMAIL PROTECTED] wrote: Hello Everyone, I was trying to use portupgrade on totem and ran into a problem with references for libc.so.7 failing to resolve. I have a libc.so.6, of course, seeing as libc.so.7 is for FreeBSD 7, isn't it? uname -a FreeBSD the.pal...ofretention.ca 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #0: Wed Jan 16 09:32:16 EST 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/THE i386 [snip] You updated the port that put libc.so.6 in your system, you need to find out which port it came from and then find out which which ports depend on it and rebuild them also and then the problem will be fixed. I use /usr/ports/sysutils/bsdadminscripts which tells me exactly which ports need to be rebuilt. Hi E. J., Is it true that a port put libc.so.6 in my system? I thought it was part of the base system (i.e. the world as in buildworld). I'm a bit (more) confused now. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How did references to libc.so.7 get in my 6.3 ports?
Vinny wrote: Hello Everyone, I was trying to use portupgrade on totem and ran into a problem with references for libc.so.7 failing to resolve. I have a libc.so.6, of course, seeing as libc.so.7 is for FreeBSD 7, isn't it? uname -a FreeBSD the.pal...ofretention.ca 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #0: Wed Jan 16 09:32:16 EST 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/THE i386 [snip] Well, am I embarrassed. I found an old setting in pkgtools.conf that I set some time ago when I was experimenting with something: PKG_SITES = [ 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-stable/', ] Since 7 is now stable, I get packages built on 7. D'oh. I'll just reset that to the default: pkg_site_mirror() Another self-inflicted problem solved. I just have to rebuild all the affected ports manually. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: python and Guile-gtk... [a bit OT]
Gary Kline wrote: [snip] I'd like help getting python to read from a file and display a steram of text on a textcanvas. I'll fiure out the buttons later. I'd appreciate any insights about regular gtk and guile-gtk. Or whichever GUI libraries have the best python interface. Hi Gary, I'm a big fan of wxPython, i.e. wxWidgets for python. Way cool and works on Windows as well (very cross-platform). Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
freebsd-update port uname/internal patch level mismatch
Hi, I noticed that using freebsd-update on a freshly installed 6.2-RELEASE system yielded the following mismatch: $ uname -vp FreeBSD 6.2-RELEASE-p4 #0: Thu Apr 26 17:55:55 UTC 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP i386 The results of running a freebsd-update fetch give: zcnew# freebsd-update fetch Looking up update.FreeBSD.org mirrors... 1 mirrors found. Fetching metadata signature from update1.FreeBSD.org... done. Fetching metadata index... done. Inspecting system... done. Preparing to download files... done. No updates needed to update system to 6.2-RELEASE-p8. So uname says -p4 and freebsd-update says -p8 I know -p8 is correct. The kernel was last patched in -p4 so maybe the uname information isn't updated if the kernel isn't updated...? If there is something I'm doing wrong, please let me know. Thank you. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Confusion on SSH and PAM
Replying to myself to fix my error. Vinny wrote: Rakhesh Sasidharan wrote: [snip] Here's another oddity I encountered today. If PermitRootLogin is set to forced-commands-only, my understanding is the SSHD will permit root logins if a command to be executed is given. But that doesn't seem to be the case in practice! I have keys setup for root to login, but instead of letting me in with those keys, SSHD ignores them, passes me to PAM for password prompting (three times) and the denies me out! Very strange. PermitRootLogin forced-commands-only This requires that a command be present in the authorized_keys file for a given key. For example, root's authorized_keys file might look like this for an rsync command: command=/root/.ssh/cron/validate-rsync,from=10.10.10.2,no-port-forwarding,no-X11-forwarding,no-agent-forwarding ssh-dss B3N_more_public_key_data comment The entire text above should be only one line in the file. The command shown in: command=/root/.ssh/cron/validate-rsync I.e. /root/.ssh/cron/validate-rsync This: must be the command submitted on the ssh command line, loosely: $ ssh -i private_key_matching_public_key_in_authorized_keys [EMAIL PROTECTED] \ /root/.ssh/cron/validate-rsync is incorrect. The command shown is the command that is executed when the root user is authenticated via the key in question. It does not need to appear on any ssh command line. The root user cannot otherwise login to the system using ssh unless further keys with corresponding commands exist. Sorry about the error. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Jails and freebsd-update
Boris Samorodov wrote: Seems that you are looking for sysutils/ezjail. WBR Thank you for the reference. That is a very nice port. I will definitely make use of it when I need multiple jails (3). I only need 2 at the moment. I did a little more digging and it seems that I can install a jail using the base system's install script. It's found on CD 1 (6.2-RELEASE-i386-disc1.iso): (cd0 mounted on /dvdrw) $ pwd /dvdrw/6.2-RELEASE/base $ ls -la total 42496 dr-xr-xr-x 2 root wheel 6144 Jan 12 2007 . dr-xr-xr-x 13 root wheel 2048 Jan 12 2007 .. -r--r--r-- 3 root wheel 1624 Jan 12 2007 CHECKSUM.MD5 -r--r--r-- 3 root wheel 2779 Jan 12 2007 CHECKSUM.SHA256 -r--r--r-- 3 root wheel 1425408 Jan 12 2007 base.aa -r--r--r-- 3 root wheel 1425408 Jan 12 2007 base.ab -r--r--r-- 3 root wheel 1425408 Jan 12 2007 base.ac -r--r--r-- 3 root wheel 1425408 Jan 12 2007 base.ad [snip] -r--r--r-- 3 root wheel 962020 Jan 12 2007 base.bd -r--r--r-- 3 root wheel 898 Jan 12 2007 base.inf -r--r--r-- 3 root wheel 1204896 Jan 12 2007 base.mtree -r-xr-xr-x 3 root wheel 427 Apr 30 2002 install.sh I can use the install.sh script in place of the make installworld/distribution commands for the jail. This makes it possible to update the jail using freebsd-update. I wonder if the ezjail port can be tweaked to add an option for installing via the 'base' as above, rather than its current methods. In any event, I set DESTDIR to /tmp/base, ran the install.sh script and a full base system was placed in /tmp/base. A few jail details (IP, devfs) later and I was able to run freebsd-update from within the jail and it updated the world to -p8. Note I had to edit the freebsd-updates.conf file (within the jail) and set the Components variable to world only. Caveats: The jail is a full system. This might not be desirable. Normally, one can control what gets placed in the base jail system using the various NO_* knobs in a make.conf file (i.e. you can choose to keep things like the toolchain, sendmail, and bind from being placed in the jail). A certain amount of work could be done to remove those subsystems individually after the fact, I suppose. I wonder where I can get a list of files for each NO_* knob? Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Confusion on SSH and PAM
Rakhesh Sasidharan wrote: [snip] Here's another oddity I encountered today. If PermitRootLogin is set to forced-commands-only, my understanding is the SSHD will permit root logins if a command to be executed is given. But that doesn't seem to be the case in practice! I have keys setup for root to login, but instead of letting me in with those keys, SSHD ignores them, passes me to PAM for password prompting (three times) and the denies me out! Very strange. PermitRootLogin forced-commands-only This requires that a command be present in the authorized_keys file for a given key. For example, root's authorized_keys file might look like this for an rsync command: command=/root/.ssh/cron/validate-rsync,from=10.10.10.2,no-port-forwarding,no-X11-forwarding,no-agent-forwarding ssh-dss B3N_more_public_key_data comment The entire text above should be only one line in the file. The command shown in: command=/root/.ssh/cron/validate-rsync I.e. /root/.ssh/cron/validate-rsync must be the command submitted on the ssh command line, loosely: $ ssh -i private_key_matching_public_key_in_authorized_keys [EMAIL PROTECTED] \ /root/.ssh/cron/validate-rsync The root user cannot otherwise login to the system using ssh unless further keys with corresponding commands exist. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: courier-authlib problems.
Tankko wrote: I upgraded one of my servers to courier-authlib-base-0.60.0 from .59 and I am now getting the following errors in my mail log: Oct 8 18:21:47 myserver.net authdaemond: Shared object libauthvchkpw.so not found, required by authdaemond Oct 8 18:21:47 myserver.net authdaemond: Installing libauthpam Oct 8 18:21:47 myserver.net authdaemond: Installation complete: authpam Oct 8 18:21:47 myserver.net authdaemond: Installing libauthldap Oct 8 18:21:47 myserver.net authdaemond: Shared object libauthldap.so not found, required by authdaemond Oct 8 18:21:47 myserver.net authdaemond: Installing libauthmysql Oct 8 18:21:47 myserver.net authdaemond: Shared object libauthmysql.so not found, required by authdaemond Oct 8 18:21:47 myserver.net authdaemond: Installing libauthpgsql Oct 8 18:21:47 myserver.net authdaemond: Shared object libauthpgsql.so not found, required by authdaemond I run courier-imap. Each of the courier-authlib-* ports needs to be updated as well. I use courier-authlib and in /var/db/pkg I see: zc{109}/var/db/pkg# ls -dla cour* drwxr-xr-x 2 root 512 Apr 23 23:55 courier-authlib-base-0.58_1/ drwxr-xr-x 2 root 512 Feb 22 2006 courier-authlib-ldap-0.58_1/ drwxr-xr-x 2 root 512 Feb 22 2006 courier-authlib-mysql-0.58_1/ drwxr-xr-x 2 root 512 Feb 22 2006 courier-authlib-pgsql-0.58_1/ drwxr-xr-x 2 root 512 Feb 22 2006 courier-authlib-userdb-0.58_1/ I'm fairly certain they all need to be upgraded together and share the same version. and Oct 8 18:11:33 myserver.net imapd-ssl: couriertls: connect: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number Oct 8 18:12:07 myserver.net imapd-ssl: couriertls: connect: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number Not sure about the SSL error but it may be related to mismatched courier* components. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Jails and freebsd-update
Hi All, I'm setting up a server for mail and web. I want to put each in their own jail on a host system. I have installed 6.2-Release on the host and successfully used freebsd-update to grab up to -p8. So far so good. Now, I was going to install the jails using the standard way (man jail): JAIL=/path/to/jail cd /usr/src mkdir -p $JAIL make world DESTDIR=$JAIL make distribution DESTDIR=$JAIL and so forth. But then it occurred to me that freebsd-update says it only works on installations that haven't been built from source. My question then is how can I use freebsd-update with jails? Thanks for any help. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Trying to move /usr
Michael S wrote: I reverted to the old /usr. What I had done: Initially I set up the newly installed drive (da2) to have only one partition (da2s1d) which I chose to be /user (note the e). I tarred /usr to a file in /user tar -cf /user/usr.tar /tar and extracted the file tar -xf usr.tar I had the whole structure of /usr underneath /user/usr And then cd usr mv * .. to have everything under /user After thinking about that mv command, I have come to the conclusion that /dev/da2s1d does not in fact contain a /usr directory structure and if mounted will be empty. Why? Note /dev/ad8s1e is an empty partition (a new disk, if you will on my system that I will in this demonstration). Also, I'll use user and usrdemo as the names of the user and usr directories that Michael is using, respectively. I don't want to overwrite my own usr directory needlessly. Observe: Create a mount point and mount the disk t# cd / t# mkdir user t# mount -t ufs /dev/ad8s1e /user t# pwd /user t# mkdir -p usrdemo/path Check our partition (there is a dot (.)after the df command, look closely): t# df . Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad8s1e5076306 467014 0%/user Create a file for no reason. t# touch usrdemo/path/file.txt t# cd / t# ls -laR /user total 6 drwxrwxrwt 3 root wheel 512 Aug 20 22:05 . drwxr-xr-x 26 root wheel 1024 Aug 20 21:59 .. drwxr-xr-x 3 root wheel 512 Aug 20 22:05 usrdemo /user/usrdemo: total 6 drwxr-xr-x 3 root wheel 512 Aug 20 22:05 . drwxrwxrwt 3 root wheel 512 Aug 20 22:05 .. drwxr-xr-x 2 root wheel 512 Aug 20 22:05 path /user/usrdemo/path: total 4 drwxr-xr-x 2 root wheel 512 Aug 20 22:05 . drwxr-xr-x 3 root wheel 512 Aug 20 22:05 .. -rw-r--r-- 1 root wheel0 Aug 20 22:05 file.txt t# cd /user Let's look at what file system we're on again: t# df . Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad8s1e5076306 467014 0%/user Still on the new drive. Now that we're in the /user directory let us try, as Michael says to have everything under /user. Right idea, but mv is not the tool in this case: The next command causes much trouble: t# mv * .. will in fact move the contents of /user to the parent directory which is in fact /, the root of the file system. There is nothing left in /user: t# pwd /user t# ls -la total 4 drwxrwxrwt 2 root wheel 512 Aug 20 22:06 . drwxr-xr-x 27 root wheel 512 Aug 20 22:06 .. If we change directory to the .. directory target (the same target as the mv command) we'll see the usrdemo directory. t# cd .. t# ls .cshrc compat lib procusb .profiledev libexec rescue usr .snap distmedia rootusrdemo COPYRIGHT dvdrom mnd sbinvar bin entropy mnt sdvd bootetc usersys cdrom homeportabletmp If we change to it and check our file system: t# cd usrdemo/path/ t# ls file.txt t# df . Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad4s1a507630 99704 36731621%/ We find it now sitting as a directory the / root partition! In Michael's case it would be sitting on the old /usr partition. Definitely not what we wanted. So what has happened is that the mv * command with Michael's usr directory actually overwrote the current /usr directory with the contents of the tar archive. Seems like a no-op but there could be symbolic link issues, i.e. /usr/home - /home. I hope that is semi-coherent. What you probably want to do to replace a /usr partition is something like this: cd / mkdir user mount -t ufs /dev/da2s1d /user cd /usr pax -rw -pe . /user pax is like tar. -rw means to read (r) from the source (.) and write (w) to the destination (/user). -pe means to preserve everything (permissions, ownership etc). Having done that, you now have a duplicate usr directory structure under /user i.e. /user/bin /user/lib and so on. Now you can switch the fstab entries like you planned, reboot, and you should have replaced /usr with the new drive. Hope this helps, although you may have some issues in the future due to any unintended consequences of the tar/mv command combination. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
gtk-recordmydesktop fails to build - no port either
Hello Everyone, I can't find gtk-recordmydesktop (or qt-recordmydesktop) in the ports tree even though recordmydesktop is there and installs. I tried to download the tarball for gtk-recordmydesktop and install it. Here are the results: t/mv{152}~/dl/gtk-recordmydesktop-0.3.5: ls AUTHORS Makefile.am config.guessconfigure mkinstalldirs COPYING Makefile.in config.log configure.acpo ChangeLog NEWSconfig.rpathinstall-sh py-compile INSTALL README config.status m4 src Makefileaclocal.m4 config.sub missing t/mv{153}~/dl/gtk-recordmydesktop-0.3.5: ./configure --prefix=/usr/local checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes configure: Storing library files in /usr/local/lib prefix set to /usr/local configure: Storing data files in ${prefix}/share configure: Storing configuration files in /usr/local/etc configure: Using localstatedir /usr/local/var checking for a Python interpreter with version = 2.3... python checking for python... /usr/local/bin/python checking for python version... 2.4 checking for python platform... freebsd6 checking for python script directory... ${prefix}/lib/python2.4/site-packages checking for python extension module directory... ${exec_prefix}/lib/python2.4/site-packages configure: Using pythondir /usr/local/lib/python2.4/site-packages checking for style of include used by make... GNU checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... none checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking build system type... i386-unknown-freebsd6.2 checking host system type... i386-unknown-freebsd6.2 checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking for LC_MESSAGES... yes checking libintl.h usability... no checking libintl.h presence... no checking for libintl.h... no checking for pkg-config... /usr/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PYGTK... yes configure: Using pygtk installed in /usr/local/lib/python2.4/site-packages checking for GTK... yes configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating src/rmdConfig.py config.status: creating src/gtk-recordMyDesktop config.status: creating po/Makefile.in config.status: creating m4/Makefile config.status: executing depfiles commands config.status: executing default-1 commands t/mv{154}~/dl/gtk-recordmydesktop-0.3.5: make Making all in src Making all in po Error expanding embedded variable. *** Error code 1 Stop in /usr/home/mv/dl/gtk-recordmydesktop-0.3.5. Anyone have any ideas? I tried gmake and imake - no joy. Thanks Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: make package-recursive
Nejc ©koberne wrote: Hello, I would like to create a custom set of packages, so that they will be installable to my other FreeBSD boxen. As I understand, I have to use 'make package-recursive', but I have some problems with it: 1. Is there a way to tell 'make package-recursive' not to _install_ package, but only build it? It is annonying and time-consuming to deinstall every package after it is installed. [snip] Not quite what you want but this little python script will build packages of all currently installed ports. (Watch out for any wrapping of code) === 8 == #!/usr/bin/env python # make_packages.py # # Script to create packages for currently installed ports/packages. # Will build packages in the current working directory so a # 'cd /usr/ports/packages/All' command would be useful before running it. # # Usage: script make_packages.log make_packages.py /var/db/pkg/* # # needed modules import sys, os pkg_create = /usr/sbin/pkg_create print '===' dash_b = '-b' for name in sys.argv[1:]: #print :: , name pkg_name = name.split('/')[-1] print Installed package:, pkg_name # run pkg_create command, capture errors but don't stop print Command: , pkg_create, dash_b, pkg_name status = os.spawnv(os.P_WAIT, pkg_create, [pkg_create, dash_b, pkg_name]) print Status:, status == 8 === Enjoy. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Python script to create packages, sane?
Hi Everyone, OBuname: FreeBSD 6.1-RELEASE-p3 #0: Tue Aug 22 22:42:18 EDT 2006 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/THE i386 I'm been working with and learning the ports and packages system. I enjoy the challenge because this stuff can get awfully vexing every now and then. I just finished running 'portmanager -u -f -l' after several days (with a little 'portmanager -u -f -l --resume' every now and then). I have this nicely up-to-date large (450+) set of ports installed. It cost a lot in terms of time. So I want to take all these installed ports and build packages out of them. Enter the following python program: == 8 === #!/usr/bin/env python # make_package.py # # Script to create packages for currently installed ports/packages. # Uses pkg_create with the -b option. # It will build packages in the current working directory so a # 'cd /usr/ports/packages/All' command would be useful before # running it. # # Usage: script make_package.log make_package.py /var/db/pkg/* # # needed modules import sys, os pkg_create = /usr/sbin/pkg_create print '===' dash_b = '-b' for name in sys.argv[1:]: #print :: , name pkg_name = name.split('/')[-1] print Installed package:, pkg_name # run pkg_create command, capture errors but don't stop print Command: , pkg_create, dash_b, pkg_name status = os.spawnv(os.P_WAIT, pkg_create, [pkg_create, dash_b, pkg_name]) print Status:, status == 8 === The results of running it are encouraging: # cd /usr/ports/packages/All # script make_packages.log Script started, output file is make_packages.log # ~/bin/make_packages.py /var/db/pkg/* === Installed package: GraphicsMagick-1.1.7 Command: /usr/sbin/pkg_create -b GraphicsMagick-1.1.7 Status: 0 Installed package: ImageMagick-6.2.9.8 Command: /usr/sbin/pkg_create -b ImageMagick-6.2.9.8 Status: 0 [... and so on for 450+ ports. only 3 errors below] Installed package: pkgdb.db Command: /usr/sbin/pkg_create -b pkgdb.db pkg_create: can't change directory to '/var/db/pkg/pkgdb.db'! Status: 1 [of course] Installed package: xorg-libraries-6.9.0 Command: /usr/sbin/pkg_create -b xorg-libraries-6.9.0 tar: lib/libGL.a: Cannot stat: No such file or directory pkg_create: make_dist: tar command failed with code 256 Status: 2 Installed package: xorg-server-6.9.0_5 Command: /usr/sbin/pkg_create -b xorg-server-6.9.0_5 tar: lib/modules/extensions/libGLcore.so: Cannot stat: No such file or directory pkg_create: make_dist: tar command failed with code 256 Status: 2 [...] == I've seen the last few types of errors with package creation before. I was using both portupgrade and 'make package' commands when I encountered such errors. To fix them is to simply force re-installation of the port in question. No big deal. A brief directory listing shows fresh packages: /usr/ports/packages/All# ls -lat | more total 3019778 -rw-r--r-- 1 root ports 48352 Dec 30 02:21 make_packages.log -rw-r--r-- 1 root ports 13217116 Dec 30 02:21 zope-3.3.0.tgz drwxr-xr-x 2 root ports 29184 Dec 29 18:33 . -rw-r--r-- 1 root ports1410567 Dec 29 18:33 xorg-vfbserver-6.9.0_2.tgz -rw-r--r-- 1 root ports 176158 Dec 29 18:33 xterm-223.tgz -rw-r--r-- 1 root ports 423100 Dec 29 18:33 xvid-1.1.2,1.tgz [...] To make a long story short and actually ask a question, will building packages this way make proper packages? Am I doing something fundamentally wrong in this approach? I'd like to simply use the generated packages as a local repository for the other FreeBSD systems I use. Thanks for any comments. Vinny ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]