Jump to content

Phil Edwards

Members
  • Posts

    40
  • Joined

  • Last visited

Everything posted by Phil Edwards

  1. I can't see any obvious way to edit the title of this topic to add '[solved]'. Prior to the 'new look' on the board, you just had to edit your original post, but that doesn't give me an option to change the topic title any more...
  2. I've built several RPMs for previous versions of Mandriva up to and including 2008.1. I've recently upgraded to 2009.1 and I'm having a minor problem building an RPM which I can't seem to resolve. The package being built is a python-sybase module to allow access to Sybase and MS-SQL databases from a Python script. My spec file looks like this: %define name python-sybase %define version 0.39 %define release 1 %define pyver %(python -c "import sys; print '%s.%s' % sys.version_info[0:2]") Name: %{name} Summary: Python Sybase RDBMS access module Version: %{version} Release: %{release} Source0: http://downloads.sourceforge.net/python-sybase/python-sybase-%{version}.tar.bz2 Source1: http://python-sybase.sourceforge.net/download/python-sybase-docs-%{version}.tar.bz2 Patch1: python-sybase-%{version}.patch URL: http://python-sybase.sourceforge.net/ Group: Development/Python BuildRoot: %{_tmppath}/%{name}-buildroot License: BSD-Style license Requires: python >= %{pyver} BuildRequires: libfreetds-devel, libfreetds0, libltdl-devel, libunixODBC-devel, libpython%{pyver}-devel, python-setuptools, python-pkg-resources, latex2html %description Provides a Python interface to the Sybase relational database system. The Sybase package supports all of the Python Database API, version 2.0 with extensions. %prep [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %setup -n python-sybase-%{version} %setup -D -T -a 1 %patch1 -p1 %build python setup.py build_ext -D HAVE_FREETDS -U WANT_BULKCOPY #builddir is [/home/phile/rpm/BUILD] #buildroot is [/home/phile/rpm/BUILDROOT/python-sybase-0.39-1.i386] #_datadir is [/usr/share] #_defaultdocdir is [%_datadir/doc] %install python setup.py install --root=$RPM_BUILD_ROOT %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root,0755) %doc doc/sybase/* doc/sybase/icons/* ChangeLog LICENCE TODO /usr/lib/python%{pyver}/site-packages/* %changelog * Tue Sep 15 2009 Phil Edwards <phil@linux2000.com> 0.39-1pke - Initial RPM build for Mandriva 2009.1 I have the following entries in my ~/.rpmmacros file: %_topdir %(echo $HOME)/rpm %_tmppath %(echo $HOME)/rpm/tmp # If you want your packages to be GPG signed automatically, add these three lines # replacing 'Mandrivalinux' with your GPG name. You may also use rpm --resign # to sign the packages later. %_signature gpg %_gpg_name Phil Edwards %_gpg_path ~/.gnupg # Add your name and e-mail into the %packager field below. You may also want to # also replace vendor with yourself. %packager Phil Edwards <phil@linux2000.com> %distribution Mandriva Linux %vendor Mandriva # If you want your packages to have your own distsuffix instead of mdv, add it # here like this %distsuffix pke %debug_package %{nil} The package builds correctly with no errors. When the resulting RPM files get written, my distsuffix parameter is being ignored: [phile@mdv2009-1:/home/phile/rpm/RPMS/i586] $ ls -l total 216 -rw-r--r-- 1 phile phile 102711 2009-09-16 09:15 python-sybase-0.39-1.i586.rpm The name I am expecting to see for my package is python-sybase-0.39-1pke.i586.rpm - I can make this happen by changing the '%define release' line in the spec file, but I have always been able to set this in my .rpmmacros file in the past. Has something changed in the way rpmbuild works in 2009.1 or have I made some stupid mistake? :-)
  3. I knew it would be something simple. Thanks, Greg.
  4. I have a Mandriva 2008.1 server hosted with the ISP that I work for. I have taken the vanilla postfix source RPM, patched it to include support for sqlite3 lookup maps and built/installed the resulting custom package. This all works as expected. The problem that I now face is how to tell urpmi to ignore any further postfix updates that are released, since installing an updated Mandriva RPM would break the sqlite3 functionality that I have added. In RedHat Enterprise 5.x, which uses yum as its package manager, this is trivial to achieve - I would simply add 'exclude=postfix' to the config file for my updates repository. Is there a way to do the same with urpmi? I've looked through the man pages but not found an answer.
  5. Well, according to bugzilla, Frederic owned up to breaking it, Olivier has tested the fix, now we're just waiting for somebody to push the updated package out so the mirrors can pick it up. Guess I'll just have to sit and wait...
  6. For quite a while now, every time I fire up my MDV2008.1 machine, the update manager (i.e. /usr/bin/mdkapplet) tells me that there is a newer version of the Evolution mail client available, but it can't be installed due to a missing dependency. Running an update from the command line confirms this: [phile@localhost:/home/phile] $ sudo urpmi --auto --auto-select --update Some requested packages cannot be installed: evolution-2.22.3.1-1.1mdv2008.1.i586 (due to unsatisfied libgpilotdconduit.so.2) evolution-exchange-2.22.3-1.1mdv2008.1.i586 (due to unsatisfied libgpilotdconduit.so.2) [phile@localhost:/home/phile] $ rpm -q --whatprovides libgpilotdconduit no package provides libgpilotdconduit Based on past experience, this sort of error generally tends to be due to the repository mirror that I'm using being a bit out of date and it usually sorts itself out within a couple of days. I've been getting this message for the best part of 2 weeks and it shows no signs of going away. Other updates have been installed as normal during this period. Has anybody else come across this and figured out a fix for it?
  7. Yikes! Package manager is now furiously downloading and installing no less than 137 RPMs for me. Thank $DEITY for fast Internet connections.
  8. Wot he said - xfce4 is a lovely desktop environment and it's lean enough to work well on the most modest of hardware. In fact, I think I'll install it and use it for a while to see how I get on with it for everyday tasks. I've upgraded my laptop to 2009.0 and I'm happier with it now than I was to start with - just a case of getting used to the KDE4 way of doing things.
  9. Not if you're going to continue using the Orinoco card. :-( The orinoco_cs driver has no WPA/WPA2 support at all - it's quite an old card now (I have one at home that is effectively useless to me) and it's unlikely that anyone is going to want to rewrite the driver just for WPA. I'd suggest that your best option would be to get a newer card - a search on here should turn up some posts showing which cards people have had success with. I've got a Dell Latitude D830 laptop which came with a Broadcom internal wireless card with non-existent Linux support. I bought a pair of Intel 3945ABG cards from e-bay and fitted one of those instead. Job done.
  10. Barking slightly up the wrong tree, methinks... :D Instead of restricting access to the files using the mount command, you should look at setting the permissions on the files so that they match up with what you want, i.e. for all files to be read/write for root but read only for everyone else. Starting off with 'cd /path/to/the/files/in/question', you should then: find . -type f | xargs chown root:root find . -type f | xargs chmod 644 The first command finds all normal files, i.e. it ignores directory entries, symbolic links, etc and changes the file owner and group to root. The second command finds all normal files and makes them read/write for the owner (root) and read-only for everyone else.
  11. Some things that are worth pointing out: There is a user group called 'wheel' that will be present on every Mandriva install. There is also the 'sudo' utility which allows certain commands to be run as root by ordinary users. This is configured by running 'visudo' as root. One approach to your scripting problem would be: 1. Add all of the users that need to be able to use your script into the 'wheel' group 2. Use 'visudo' and uncomment the line which allows members of the 'wheel' group to run any command without having to enter the root password 3. At the start of your script have something like this: CHK=`id|grep wheel` if [ "$CHK" = "" ]; then echo -e "Insufficient privileges to run this script - contact your system administrator" exit 0 fi This allows you to restrict script execution to members of the wheel group. It's not best practice in terms of security to give a bunch of users free rein over your system, which is essentially what I'm suggesting here that you do! :unsure: A better solution would be to have a read through the man pages for the sudo and visudo commands and see if you can work out how to add a group of your own and have the members of that group restricted to running only a limited number of commands, i.e. only the commands that are executred inside your script.
  12. Thanks Lardy and sorry for the late reply. That didn't get rid of it unfortunately. Next time I log in to my machine, I'll take a look at what processes are running and see if that gives me a clue as to where it's coming from.
  13. I feel embarrassed at having to ask this, as it's something I should either know or at least be able to find out by myself... I installed 2008.1 on my new laptop about 6 weeks ago. Last week, I realized that I hadn't copied my GPG keys over from my previous install. I retrieved the keys (I have 1 for personal use, 1 for work use) etc from my pre-upgrade backup and checked to make sure I could sign and encrypt plain text files with the keys. Ever since then, whenever I log in to KDE, I get prompted for the passphrase for my personal GPG key. Where does this get launched from and how can I switch it off? I've trawled around in the startup scripts that I think are relevant, but I can't find anywhere that the prompt might be getting generated.
  14. Well, here's a can of worms... I have a script which I have used for 2 or 3 years which generates an ISO image file for burning to a CD. Since I upgraded to Mandriva 2008, I couldn't figure out why none of my CD's were readable on a Windows machine any more. The image appears to be okay and is mountable under Linux using a loopback mount, but trying to access it on a Windows box gives an error message saying "The file or directory is corrupted and unreadable". The problem turns out to be a little more bizarre than you might think. After some sort of tantrum took place between the Debian developers/maintainers and Jörg Schilling - the author of the original cdrtools package - about whose licence was GPL compliant and lots of (IMHO) pretty childish mud slinging by both parties, the Debian guys created a fork of cdrtools and released under GPL v2. The snag is that they forked a really old version, and the genisoimage program which replaces the original mkisofs has a major bug which results in corrupted ISO images when trying to write Joliet-compatible discs, i.e. discs that you want to use on a Windows machine, which probably accounts for a good 80% of the discs that people burn in the first place. I'm all in favour of the principles of free and open-source software, but this seems to me to be a serious case of shooting oneself in the foot by the Debian developers. It gets worse, though, because not only Mandriva, but also SuSE, OpenSuSE, Fedora and of course Debian are now distributing a broken version of code that's worked perfectly well for at least 2 years for all their users. I can't see the sense in it, it sucks, and now the only option I have now is to go and download Jörg Schillings version of the code and compile it, which totally defeats the object of what the Debian jihadists seem to have been trying to achieve. Before anybody asks, I've checked and there is no fix available for this from the 'new' cdrtools developers. If there is any sense in this situation, I'm blowed if I can see it... [moved from Software by Greg2]
  15. When I had mdv2007 installed, I was using kbluetoothd and a couple of custom scripts which would automatically check my Nokia mobile for new images and/or videos whenever the bluetooth dongle got plugged in on the laptop. This could all be configured from an item called 'Bluetooth Services' under 'Internet & Network' in the KDE control centre. On the 'Device Discovery' tab, it was possible to configure so-called 'discovery jobs' which KDE would launch automatically whenever a specified bluetooth device was detected. This was all provided by the kdebluetooth-1.0-0.beta1.8mdv2007.0 package. Now that I've installed mdv2008 instead, this option is no longer present in the control centre. The corresponding package in 2008 is kdebluetooth-1.0-0.beta8.5mdv2008.0, but this doesn't include the kbluetoothd binary. I've checked the latest kdebluetooth source tarball on SF and this no longer has kbluetoothd either, so it looks like it's something the developers have removed. I'd really like to have this feature back again. Does anyone know of anything which might provide similar functionality, or a feature in mdv2008 which does the same thing?
  16. Posting this here in the hope that it may be of some help to others... I've done a fresh install of Mandriva 2008 on my Dell Latitude D800 laptop. I also run VMWare workstation 6.02 with XP Pro as a guest instance. The problems I had following the install were: 1. CPU clock speed was being throttled back to 600 MHz and would not go back up again to 1700MHz afterwards. If the CPU got throttled to a higher value, say 1000MHz, it would happily speed up again when the load increased, but as soon as it hit the 600 MHz minimum, it got stuck there. 2. Due to problem (1) above, the clock on my VMWare guest instance was going completely nuts every time the CPU speed was throttled back. It would vary from too slow to too fast, but would always be out by several tens of minutes in either direction. I wasn't hugely surprised, because Mandriva 2008 is not currently one of the host OS versions which is officially supported by VMWare WS6, but I found a way to resolve both issues. I fixed problem (1) by editing /etc/sysconfig/cpufreq and uncommenting the following lines: GOVERNOR=performance MIN_FREQ=1700000 MAX_FREQ=1700000 I fixed problem (2) by editing /etc/vmware/config and adding the following lines: host.cpukHz = 1700000 host.noTSC = TRUE ptsc.noTSC = TRUE My CPU now stays permanently pegged at its maximum speed, which is nice, and the clock in my WinXP guest instance keeps perfect time again. Peace and love, as they say... :D
  17. There's your problem - workstation v6.0.1 does not support Mandriva 2008 as the host OS. See here for details: http://www.vmware.com/support/ws6/doc/releasenotes_ws6.html :-( I run workstation 6.0.1 on my Dell Latitude D800 laptop with Mandriva 2007.0 as the host OS and it works like a dream with both XP Pro and Vista guest instances. VMWare are normally fairly quick to roll in support for new distros, so I'm guessing that you will probably see Mandriva 2008 on the supported list when version 6.1 is released.
  18. Cool, glad to hear you've got it up and running.
  19. Just to ensure I understand your setup, eth0 is connected to your cable modem and eth1 to your internal LAN, right? If not, just transpose eth0 and eth1 in what I've got below... Also, to clarify this 'gateway' concept that seems to be confusing a few people. Forget about whether individual NICs have their own gateways or not - for 99.9% of what you would want to do with a Linux box, this is irrelevant. All you're interested in is the default gateway address. In a nutshell, this tells Linux which of the networks it is connected to has the most machines. In the majority of cases, the network with the most machines will be the Internet itself, so you should set the default gateway to be the IP address of your cable modem. Note that this will be the LAN-side address rather than the Internet facing IP that your service provider assigns to you when your modem connects to them. In most cases you can even forget about having to do that, since it is handled for you when all the DHCP stuff happens. As I've already said in another post on here tonight, try to invest some time in learning to admin Linux from the command line rather than using the GUI tools, nice though they are. So, assuming eth0 and eth1 are connected as described above, open a terminal session and get root privileges by typing 'su -' and entering your root password when prompted. Type 'cd /etc/sysconfig/network-scripts' - this is the place where the config details for your network cards are ultimately stored, regardless of which tool you use to maintain them. Using your favourite text editor, ensure you have this in a file called 'ifcfg-eth0': DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes TYPE=Ethernet Save that file and then ensure that you have this in a file called 'ifcfg-eth1': DEVICE=eth1 BOOTPROTO=static IPADDR=192.168.5.10 NETMASK=255.255.255.0 NETWORK=192.168.5.0 ONBOOT=yes TYPE=Ethernet Save that file too. Now do 'cd /etc/sysconfig' and edit a file called 'network'. You should ensure that it just has this line in it: NETWORKING=yes Save that file and ensure that your cable modem is connected to your ISP. Last of all, do 'urpmi dhclient' to make sure you have the dhcp tools installed. I'd be surprised if you didn't, but best to make sure! You should now find that if you type 'service network restart', you'll get your internet connection going out on eth0 and your LAN connection on eth1. Try pinging www.google.com - this will prove that you have a functional internet connection using your service providers DNS servers, which would have been configured by the dhcp stuff. Then try a ping of something on your internal LAN to ensure that works. Post some more details here if that doesn't work. Good luck! :-)
  20. You don't need to have bind installed just to run a box as a web and/or mail server. The only exception to this would be if you were talking about ISP-style traffic levels, in which case a local cacheing-only DNS server would help with performance. If your project deadlines will allow it, I'd also recommend learning to set up Apache and Postfix/Exim/Sendmail, (shudder) or whatever your preferred MTA is, without resorting to webmin. It will be more work, but you'll be glad of the extra skills later in your sysadmin career! :-)
  21. I happen to know just the bit of software you're looking for - it's called perdition and can be found at: http://www.vergenet.net/linux/perdition/ What you'd need to do would be to have 2 NICs in the Linux box, which I'm guessing you've probably already got. Perdition can listen for incoming IMAP and/or POP3 connections on the internet facing connection and proxy them off to the Exchange server which will be reachable via an RFC1918 private IP on the second NIC. It's a bit of a fiddle to install, since there are a couple of bizarre libraries that it needs which have to be compiled from source tarballs. Just to give you some idea of how good perdition is, I work for an ISP in the UK - our mail platform handles POP3 and IMAP connections for almost 150,000 mailboxes and last time I looked, our traffic levels were peaking during the day at around 2,500 POP3/IMAP connections per minute. This is with an out-of-the-box install of perdition, no performance tweaking at all.
  22. Well, believe it or not, if all you want to do is string a whole bunch of MPG videos together one after the other, the only tools you need are a terminal session and the 'cat' command. As an example, if you have 5 MPG videos you want to put together, you can do this: cp smallvid1.mpg bigvid.mpg cat smallvid2.mpg >> bigvid.mpg cat smallvid3.mpg >> bigvid.mpg cat smallvid4.mpg >> bigvid.mpg cat smallvid5.mpg >> bigvid.mpg If you then play bigvid.mpg using your favourite multimedia app, you'll have all 5 one after the other.
  23. Unless this is a machine where several users log on at the same time, it's probably safe to dispense with the modem locking altogether. It's been a while since I used dialup, but I seem to remember there is a 'nolock' option you can specify somewhere in kppp - it might be worth giving this a try.
×
×
  • Create New...