DeVO's thoughts

서마이의 생각들을 담는 곳입니다…

There are cases where we were only given a binary RPMs.
And sometimes you may want to just have a look at the contents of the RPM.
Unfortunately, without SRPM, there are very limited things that you can do.

For example, using less, you can see some good information on the rpm;
# less <package name>.rpm

And if you want to actually, look at the files in rpm you can use rpm2cpio;
# rpm2cpio <package name>.rpm | cpio -id

This would ‘un-tar’ the files in to the current directory.

However, you still needs SPEC files and proper SOURCE to rebuild the package :)

There has been a lot of cases, where there has been issues with timekeeping for linux guests on KVM/Xen/VMware.

The best thing that Red Hat recommends its customer is to setup NTP and get it to automatically fix it.
But, there are also kernel options that you can pass to make it more reliable.

The original information is from VMWare’s knowledge base article

Here are Red Hat Enterprise Linux Related information;

32bit Kernels

Linux Flavor Version Kernel Parameters Notes
RHEL
RHEL 5.4
No additional kernel parameters required.
See the note below about the optional use of divider=10.
RHEL 5.3 divider=10 clocksource=acpi_pm
RHEL 5.2 divider=10 clocksource=acpi_pm
RHEL 5.1 divider=10 clocksource=acpi_pm
RHEL 5.0 clocksource=acpi_pm
RHEL 4.8 clock=pmtmr divider=10
RHEL 4.7 clock=pmtmr divider=10
RHEL 4.6 clock=pmtmr
RHEL 4.5 clock=pmtmr
RHEL 4.4 clock=pmtmr
RHEL 4.3 clock=pmtmr
RHEL 4.2 clock=pmtmr
RHEL 4.1 clock=pmtmr
RHEL 4.0 clock=pmtmr
RHEL 3 (All updates) No additional kernel parameters required.

64bit Kernels

Linux Flavor
Version
Kernel Parameters
Notes
RHEL
RHEL 5.4
No additional kernel parameters required.
See the note below about the optional use of divider=10.
RHEL 5.3 notsc divider=10
RHEL 5.2
notsc divider=10
RHEL 5.1 with RHSA-2007:0993-13
notsc divider=10
RHEL 5.1 without RHSA-2007:0993-13
notsc
RHEL 5.0
No additional kernel parameters required.
RHEL 4.8 notsc divider=10
RHEL 4.7
notsc divider=10
RHEL 4.6
notsc
RHEL 4.5
notsc
RHEL 4.4
notsc
RHEL 4.3
notsc
RHEL 4.2
notsc
RHEL 4.1
Does not support notsc . Avoid using if possible.
RHEL 4.0
Does not support notsc . Avoid using if possible.
RHEL 3 Update 9 with RHSA-2008-0973
disable_lost_ticks
RHEL 3 through Update 8 Has no workaround for lost tick overcompensation. Avoid using if possible.

Background info:
I am working at a site that requires JDK to be deployed by Red Hat Satellite Automatically. So I have resigned the package and try to deploy, and it will fail with following error msg;
warning: jdk-1.6.0_18-fcs.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID XXXXXXXX

To Check which version of RPM was used to sign rpm;

# rpm -q --qf '%{RPMVERSION}' -p jdk-1.6.0_18-fcs.x86_64.rpm
3.0.6

Question: Can you resign a binary rpm that was built with rpm 3.0.x?

Short Answer: You are in bad luck!
Well, it will let you, but it doesn’t mean that it can be used. You can’t do it, this is due to the fact that 3.0.x is so long ago, and technical feature has been added to RPM and due to that, it won’t work properly.

Long Answer:

There is a deep design issue underlying this mess.

RPM has been mired between header+payload and header-only signatures for many
years now.

In order to preserve header+payload MD5 as a universal invariant independent of
what is implemented in rpm when resigning, the legacy header which is part
of the header+payload MD5 digest cannot be changed.

In order to support header-only signatures on an immutable region,
markers are added to the header to identify the immutable header-only region
blob that is signed.

The conclusion is that header-only signature/digest should not be attempted
when resigning legacy packages. Any other scheme will either add Yet Another
Package format special case, or otherwise change the invariant header+payload
MD5 digest.

And the right “fix” is to dump header+payload signatures entirely. There is a deep design issue underlying this mess.

RPM has been mired between header+payload and header-only signatures for many
years now.

In order to preserve header+payload MD5 as a universal invariant independent of
what is implemented in rpm when resigning, the legacy header which is part
of the header+payload MD5 digest cannot be changed.

In order to support header-only signatures on an immutable region,
markers are added to the header to identify the immutable header-only region
blob that is signed.

The conclusion is that header-only signature/digest should not be attempted
when resigning legacy packages. Any other scheme will either add Yet Another
Package format special case, or otherwise change the invariant header+payload
MD5 digest.

And the right “fix” is to dump header+payload signatures entirely.

There are other payload complications that need solving to preserve
header+paload md5 invariance (for true legacy compatibility) as well.
E.g. invariance assumes that zlib never changes what is written to
a resigned package for all rpm implementations.

I’d suggest that the one line patch to handle the region marker change
in the signature header, and living with the accurate (because legacy headers
are invariant all versions of rpm afaik) but mysterious (essential elements to
compute a header-only signature/digest are not present in the definition
of the header, perhaps something other than NOKEY to be returned)
Header V3 DSA signature: NOKEY, key ID 831ffbca
is the only sane path forward.

But feel free to do whatever you want, patches cheerfully accepted!

Above are the comments from Jeff Johnson in Red Hat’s Bugzilla #127113

So the fix?
Resign the pkg with rpm 3.0.x which is Red Hat 6.2 which I don’t think anyone would see it as an answer.

Then only option is ignoring GPG signature path…

I have to say that I wasn’t anywhere near when iPhone came out in Australia. There were couple of reasons for it. I bought the iPhone when I moved to a new team in the company. Then ever since, I haven’t let iPhone out of my sight.
As examples..
* I do my emails using iPhone
* I do my calendaring using iPhone
* All my contacts are in iPhone
* I haven’t touched my D80 for months
* I have the Bible in iPhone
* I do blogging using iPhone
the list goes on…

As an extra thing last week I went on a camping trip with my family guess what I took with me? iPhone!!! For fishing in nsw me and my friends needed licenses how did we get it? Using iPhone!!!! This is insane.

Just realized that WordPress2 for iPhone is out. This is a test post.

The Picture is of my son and his friend that I took around christmas using iPhone.

For last few days the temperature has been around 35 degrees. The most unfortunate thing is that the house that we are living doesn’t have an air condition :( so for last few days my family had to go through rather sweaty experience. Yesterday was the peak of that and decided to run away to the Brighton beach and saw this wonderful sunset. This was just a view that blew all the heat and uncomfortableness away.

Red Hat is having an APAC tech summit in Singapore main focuses are on the virtualization technology, RHEV and Satellite (at least from infrastructure perspective). I am hoping to update as it goes.

Today, I bought a new HDD for my X200.
2.5″ Seagate 500G, it didn’t cost me much, about AUD117.50.

So while I was reinstalling Fedora 11 on my laptop, a colleague of mine asked a question,
“What is the CPU flag that tells the CPU is capable of 64bit?”
Hmm.. the question stumped me, so I started to google and found following site;

http://www.gentoo-wiki.info/Gentoo:/proc/cpuinfo

Also, To outline what those are;

flags

The flags line tells us what extra instructions the processor has to offer. This is a listing of flags with a short explanation of each. There is an even shorter explanation in the file /usr/include/asm/cpufeature.h.
<edit: For F11, the header is in “kernel-devel”, and located in “/usr/src/kernels/$(uname -r)/arch/x86/include/asm/cpufeature.h”>

Intel flags (This table is currently identical with /usr/include/asm/cpufeature.h. Hopefully some hardware god will share his wisdom and expand this table. )

Flag Description Common in processor types
fpu Onboard (x87) Floating Point Unit
vme Virtual Mode Extension
de Debugging Extensions
pse Page Size Extensions
tsc Time Stamp Counter: support for RDTSC and WRTSC instructions
msr Model-Specific Registers
pae Physical Address Extensions: ability to access 64GB of memory; only 4GB can be accessed at a time though
mce Machine Check Architecture
cx8 CMPXCHG8 instruction
apic Onboard Advanced Programmable Interrupt Controller
sep Sysenter/Sysexit Instructions; SYSENTER is used for jumps to kernel memory during system calls, and SYSEXIT is used for jumps back to the user code
mtrr Memory Type Range Registers
pge Page Global Enable
mca Machine Check Architecture
cmov CMOV instruction
pat Page Attribute Table
pse36 36-bit Page Size Extensions: allows to map 4 MB pages into the first 64GB RAM, used with PSE.
pn Processor Serial-Number; only available on Pentium 3
clflush CLFLUSH instruction
dtes Debug Trace Store
acpi ACPI via MSR
mmx MultiMedia Extension
fxsr FXSAVE and FXSTOR instructions
sse Streaming SIMD Extensions. Single instruction multiple data. Lets you do a bunch of the same operation on different pieces of input in a single clock tick.
sse2 Streaming SIMD Extensions-2. More of the same.
selfsnoop CPU self snoop
acc Automatic Clock Control
IA64 IA-64 processor Itanium.
ht HyperThreading. Introduces an imaginary second processor that doesn’t do much but lets you run threads in the same process a bit quicker.
nx No Execute bit. Prevents arbitrary code running via buffer overflows.
pni Prescott New Instructions aka. SSE3
vmx Intel Vanderpool hardware virtualization technology
svm AMD “Pacifica” hardware virtualization technology
lm “Long Mode,” which means the chip supports the AMD64 instruction set
tm “Thermal Monitor” Thermal throttling with IDLE instructions. Usually hardware controlled in response to CPU temperature.
tm2 “Thermal Monitor 2″ Decrease speed by reducing multipler and vcore.
est “Enhanced SpeedStep”

Finally I now have my hands on this phenomenon called “iPhone”.
Since I moved to the consulting group in the company, I had to give up my old number as well as the phone which gave me an opportunity to get a new phone and number. Of course I couldn’t pass the opportunity and bought the iPhone. I had to wait for 3 weeks. But I think it was worth it. I think I got everything setup except 2 things. One I have way too much crap contacts that was generated by the thunderbird + zindus. I wish there is a easier way to edit/delete these so far the cloest thing that found is ipcsuite but requires jailbreaking which I want to leave as the last thing that I want to do. The other thing is getting tethering working with Fedora 11. There are few articles that says it can be done over the Bluetooth however I am having issues with pairing iPhone with my laptop. My guess is something in F11′s bluez package in x86_64 is different from x86. An example is that there was no /etc/sysconfig/bluetooth. If that is the case my dilema is whether to keep the box in x86 and lose the capability to build x86_64 KVM/XEN guest machine but being able to connect Internet at customer’s site without another dongle to carry.

CORRECTION: After rebooting the machine.. TETHERING over Bluetooth WORKS!!!!!

In my ipod, there are a lot of CCMs (Contemporary Christian Music), about 80% of 10Gs are all CCMs.
This is something that I enjoy so much, and something that not a lot of people around me would understand.
But, This is one thing that I really enjoy day in and day out.
Also, this is a reason why I keep it closest to me day in and day out.

Today, after attending a service at a Korean Church in Hong Kong, I was lucky enough to find the Quarry Bay.
Well, I was just walking and walking with no reason..
I set down at a bench and this music started to play..

This is by a CCM group called “Tent of David”

http://www.ydfc.com/da/menu1.php

One thing I have desired of the LORD
That will I seek
That I may dwell in the house of the LORD
All the days of my life
To behold the beauty of the LORD
And to inquire in His temple
Just let me live

In the Beauty of Your holiness
This one thing I have desired
To be changed into Your purity
From glory to glory, forever with You

주께 구했던 한 가지 소망 기도하니
나의 사는 날 동안 주의 집에 거하며
주 아름다움 앙망하며
그 전에서 사모케 하소서
오 나의 주
거룩한 주의 아름다움
오직 한 가지 내 소망
주님 정결하게 하소서
영광에서 영광으로
영원히