Saturday, October 20, 2012

How to use three Open Build Service Source Services to simplify the packaging


I think this might be served up from a dyndns home system, so am capturing it here.  On the hunt for OBS info.

this puzzle part relates to obs2obs copy and tag creation.

http://saigkill.homelinux.net/entry/2011/07/15/how-to-use-three-open-build-service-source-services-to-simplify-the-packaging

This is a short HowTo about using the OBS Source Services.
Sometimes a packager has a package who changes the Sourcecode very often. So the packager has to choose: On the first hand he can checkout the code from git or svn makes a tar.gz or bz2 from it or he can use the Source Services from the Buildservice. But how to do that?
In the following Example i'm using calligra from the KDE:Active Repository.
First of all i have uploaded the needed specs and *.changes files and all optional Sources. Then i'm going to the "Sources" Tab.In my case it looks like:

There we have two ranges. The first is called "Source Services" and the second "Source Files". If you are creating an new package this range is empty.
In my case i have filled the "Source Files" Range with my files. All my uploaded Files are in Section (2) from the Image. The Files in Section (3) will be automaticly created by the Source Services. But in your case this is empty Range.
But let us show the "Source Service" Section:

If you go to (1) "Add Service for Source Processing" you see this:

In this Overview you can choose your wanted Source Processor. In my case i choosed: tar_scm, recompress and update_sources.
If you choose tar_scm you can fill out a little form. It looks like:

In the field "url" you can add the full git adress. In my case it is "git://anongit.kde.org/calligra". Other Repositories like "git://anongit.kde.org/scratch/cschumac/polka.git" are possible too. In the field "scm" you can choose the Version Control System like git, svn, hg and bzr.
In the Standardform the field "versionprefix" isn't available. But it works.
The Source Services recompress and update_sources coming out without any configuration and working out of the box. So the OBS works like:
  1. fetch the data from scm
  2. recompress the *.tar to *.tar.gz
  3. make a temp spec file with changed versiontag (used that from the source)
  4. make a build
My Problem was now that i got a File like %{name}-%{gitversion} so it looks like calligra-1234567.tar.gz But my goal was to get calligra-2.3.90.git1234567.tar.gz. So i must set the versionprefix.
For doing that you must edit the file "_service". You can just click on it and choose "Edit File". The File itself is a simple XML File, so it is human readable. :-)
That's my file content:

<services>
  <service name="tar_scm"><param name="url">git://anongit.kde.org/calligra</param><param name="scm">git</param>
<param name="versionprefix">2.3.80.git</param></service>
<service name="recompress"><param name="file">*.tar</param><param name="compression">gz</param></service><service name="set_version"/></services>  
The _services file is the control file for all services in that package. For adding the parameter "versionprefix" i've added the marked line.
After that i got my prefered format.
The Source Services are a mighty. You can download a special file and use it, or you can check the checksum with md5. I can see in this Source Services a very good potencial.
If you want to read more about that, just go to doc.openSUSE.org.
ATM it looks for me, that if you must start the services manually daily, if you want to update the sources. But all in all you can save time if you use that great tools.
If you liked this short intro or not, i'm happy about comments and trachbacks ;-)

Tuesday, October 16, 2012

vmware serial ports (on guests)

utility for configuring or connecting to ports

http://communities.vmware.com/message/1741943

quote:

As far as I could gather, there is/was no easy way to do what I wanted to do.  That said, I was able to cobble together a solution.

First of all, VMware sells an additional license called the "Remote Virtual Serial Port Concentrator" license (for way too much money, IMO) per ESXi server, which is what allows one to pipe a virtual machine's serial port out to a telnet port, using a telnet daemon running on the ESXi server.  Paying the money and getting this license was the first step.  Thankfully, VMware's turnaround was quick enough after we paid the money, that we were able to install these permanent licenses before the temporary, evaluation licenses expired.

The next step was to dynamically configure this serial port for my virtual machines.  I could find no VMware-supplied API's, so I hacked my own perl script.  I've attached it in case others find it useful, warts and all.  I put in lots of comments since I was learning how to do this and I'm sure there's extra junk in there that's not needed, but it's working for me.  Use at your own risk.

Friday, October 12, 2012

stupid solaris 10 tricks

installation:  use the automatic installer for the install

http://blogs.vmware.com/guestosguide/

networking:  on vmware esxi eventually the e1000 works  Install the vmware tools for solaris.

didn't use this but here is networking link for vmware vmxnet
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2009199

desktop:   use cde.  it still works.
    /usr/dt/bin/Xsession is used to create the session.  use it with vncserver to get rid of the horrid twc desktop (at least there is a default, not a crash, but still.)

nfs mounts:  nfs version 3 should be max for this place.  many of the nfs servers don't support the version 4 authentication and will say "not owner" when you do mounts.  Ubuntu supports 4, readynas does not.

nfs partitions:
http://www.ogre.com/node/64

paths:  very few paths are set up.  Add /usr/X11/bin and /usr/openwin/bin to the path somewhere, or vncserver won't work (and probably a lot else).

useradd -m -d /export/home/<account> creates an account with a home directory.  /home is off limits.  useradd doesn't add on the user name so you have to supply it with this command.  after this use passwd.

if you mess up usermod will let you change some things.

Probably more to it with the kerberos stuff, and roleadd, rolemod, etc.

http://docs.oracle.com/cd/E23824_01/html/821-1451/gkhqx.html#SYSADV1adduser-1

ssh logins for root from remote:
# /etc/ssh/sshd_config with PermitRootLogin yes to replace PermitRootLogin no 
# svcadm restart svc:/network/ssh:default

https://blogs.oracle.com/sunrise/entry/enable_ssh_root_login_in

bash tuning:  for lack of a better way, copy over .bashrc and .profile from linux if they contain the bash setup stuff.  .profile should be merged, and .bashrc probably doesn't exist.  Add path stuff above to .profile