Red Hat for the Clueless: RPM

By Ed Ed | Posted at 22:31

You probably know everything on your computer is just zeroes and ones, grouped together in eights and sixteens, and so forth. You might know a bunch of folks type out lines of instructions ("code") for computers which have to be converted into those ones and zeroes, in a process called compiling. You may have heard compiling stuff on Windows requires you to buy expensive software suites to do that sort of stuff. Maybe you know Open Source means the entire process from start to finish is wide open and free, and if you take a notion, you can compile your own software because it's all part of the package. This is why I recommended you install the Developer Workstation package profile. You can take all those instructions people write and make it into zeroes and ones yourself.

On RHEL, you have the option of going out and finding that code from the sources and learning how to use the common build scripts. I do it all the time. But it's a whole lot simpler chasing down all the extra piles of code you need if it comes pre-packaged. For RHEL, that means the RPM system. It's not just a way to add packages someone else built for you, but you can build the packages, because the source is also neatly packaged. We call them source RPMs or SRPMs. Whenever you see a package which ends in the combination ".src.rpm" you have an SRPM.

Depending on what we are trying to build, we can get our SRPMs from several different places. For RHEL, the primary source is the official RHEL 6 workstation repository. Occasionally I also have to check the server repository. These two are updated regularly when something is fixed, so check to get the version with the highest number, which may mean the last in a long string of digits, dots, dashes and underscores. A much wider variety of packages come from the Fedora repositories. If you understand Fedora is the playground development system for the serious RHEL working systems, then it's no surprise Fedora has more different kinds of stuff. You just have to be aware of which of the many versions of Fedora is closest to your version of RHEL. In this case, RHEL 6 is built largely from FC13, but parts of it appear to come from FC12. At any rate, if you don't find what you need on the RHEL repositories, your second look should be "FC13 Updates" and "FC13 Everything" in that order. You can find a list of mirrors here simply select the one closest to you. For each one, it's usually a matter of this layout on the servers:


In the case of CentOS and Scientific Linux, they will have their own mirrors and structure when 6.0 is finally released by each of them. They are built from RHEL 6 SRPMs, and the same FC13 SRPMs should work for things not included in the primary SRPM sets.

Today we are going to grab the package called "freetype," which is a standard item from RHEL, so go to the Workstation SRPMs and download that package. We can't install this from the browser, so prepare to do some commandline work. Just as a reminder, in Linux, all commands are case-sensitive. Most commands are in lower case, but there are switches (usually with a dash in front of them) which are both upper and lower case, so you need to pay attention to them.

Open your Terminal and su to root. Type cd so you are working from root's Home. You can issue the command to install this SRPM from here, as long as you declare on the commandline the exact location of that RPM file (called the "full path"):

rpm -ivh /home/username/Downloads/freetype- [hit TAB]

In this case, we use the "i" switch for a straight install, and the "vh" allows you to watch it work. You can ignore the warnings about who owns the files. When it's done, if you type ls you should see a folder named rpmbuild. This is where all SRPMs will be installed so we can work on them. There are several sub-folders underneath. We are primarily interested in the SPEC folder, so type:

cd rpmbuild/SPEC

If you ls here you'll find a single file, freetype.spec. This is the building configuration file. The Freetype library is the run-time reference for the way fonts are rendered on your screen. We are going to change it by adding two features not enabled by default, called "bytecode hinting" and "subpixel rendering." If you take a quick look at this SPEC file:

less freetype.spec

you'll see some interesting instructions at the top. That "less" command is equivalent to the Windows file viewer command "more" -- less is more. The second line of the file tells you how to add those features. You see we can add a couple of "switches" on the commandline of the build process to make it happen. But it's not a simple swipe of the mouse because there is some extra verbiage and punctuation. So you can hit "q" to close this viewer and I'll give it to you below.

The basic command is rpmbuild, with a switch (-bb) telling it to build the software and create the RPM packages. We'll stick in the additional switches from inside the SPEC file and finish with telling RPMbuild what it's working on:

rpmbuild -bb --with bytecode_interpreter --with subpixel_rendering freetype.spec

Hit ENTER and it should take off and build it, displaying the details on the screen in your Terminal. When it's finished, the prompt will come back and we have to go find those packages and install them. If you take a moment to look in your Terminal window, you'll see up just a few lines where it says "Wrote /root/rpmbuild/RPM/i686/freetype...." Each of those packages comes from the same SRPM. That's the common pattern, and it also tells you where to find the packages. The source is not just the library, but some other stuff, which includes the development libraries. We need the base package and the "devel" package. Now, let's go there:

cd ../RPMS/i686

That double dot is simply shorthand for "the directory above this one." We go up one layer, then down two into the place where RPMbuild drops the finished packages, in this case the i686 folder(x86_64 for 64-bit). We need to install them both at the same time. And because we already have a couple of RPMs by the same names installed right now, but crippled versions we want to replace, we'll need to tell RPM to ignore that. Keep in mind, as you type this rather long command, you only have to type enough to distinguish between files and hit the TAB key for each file. What you see below were the ones I built for this tutorial:

rpm -Uvh --force freetype-2.3.11-6.el6.2.i686.rpm freetype-devel-2.3.11-6.el6.2.i686.rpm

That's the "rpm" command, with the "U" upgrade switch, and as before, the "vh" switches so you can see what's happening. Then we add the "force" switch because it won't do it otherwise. Don't abuse that option! You seldom have any need for it, but it's there and it can really mess things up and make your system quit running if you don't know what you are doing. The command is completed by listing all the packages, each separated by a space. Hit ENTER.

In order to see the effects of this altered font rendering package, we have to restart the display server. That means log out, then log back in, because logging out typically restarts the display server. It should make at least some noticeable difference in how fonts are rendered, mostly by tightening up and sharpening the characters so they aren't so fat, fuzzy and dark.

Welcome to RPM Land. More extensive instructions can be found starting here.

Ed Hurst is Associate Editor of Open for Business.

banh trung thu yen sao

Đây là dòng bánh trung thu cao cấp duy nhất trong nước. Bánh trung thu cao cấp Yến Sào Khánh Hòa sử dụng các nguồn nguyên liệu hoàn toàn là các món cao cấp như : yến sào, hải sâm, vi cá, trứng muối, mứt gừng, mứt bí… Đây hoàn toàn là nguồn nguyên liệu cao cấp và được chế biến với công thức riêng được nghiên cứu tỉ lệ kỹ lưởng để tạo ra một chiếc bánh thung thu thơm ngon, vừa ăn và không bị ngấy do ăn nhiều. Bánh đặc trưng với vị đậm đà nhờ phần gia vị đã được ủ và thấm đều kỹ càng, đây là một trong những đặc trưng mà các hiệu bánh trung thu khác không có được.

Posted by banh trung thu yen sao - Jul 5, 2017 | 7:08

Re: Red Hat for the Clueless: RPM

Với các thành phần đặc biệt quý giá từ thiên nhiên như yến sào, vi cá, hải sâm; Bánh Trung thu cao cấp Yến sào Sanest Moon Cake banh trung thu yen sao khanh hoa là sự kết hợp hài hòa giữa nguồn nguyên liệu ngoại nhập và nguyên liệu truyền thống, giữa công nghệ hiện đại và bí quyết kỹ thuật cổ truyền. Bánh Trung thu cao cấp Yến sào Sanest Moon Cake banh trung thu yen sao được sản xuất trên dây chuyền công nghệ khép kín hiện đại nhất, được nhập khẩu từ Đài Loan, theo hệ thống quản lý chất lượng quốc tế ISO 9001:2008 và HACCP. Chi cục An toàn vệ sinh thực phẩm - Sở Y tế Khánh Hòa đã xác nhận công bố hợp quy sản phẩm Bánh Trung thu cao cấp yến sào của Công ty Yến sào Khánh Hòa.

Posted by Thanh - Aug 17, 2017 | 7:32

Re: Red Hat for the Clueless: RPM

Life on the road, everyone in the run, always catch some people, but also always by some people beyond. Enjoy the scenery along the way, arrived at the distant end; looking for a most suitable for their own speed, Moin disease and overwhelmed, Mo due to slow and empty life; happy life, go their own way, look at their own, beyond others Be proud of being beyond others. In despair, look back how much love around, think about the meaning of existence. Across the clouds that side will see a blue sky, where to realize their dreams.On perseverance The success or failure of the cause of life, in addition to depending on a variety of objective conditions, but also by an important factor in the constraints - that is to see a person has no perseverance perseverance. The so-called perseverance, refers to the people to treat the cause of the tenacity and endurance. If a person in the process of entrepreneurship has a strong perseverance, with the spirit of perseverance, then he was engaged in the cause of the final success. On the contrary, otherwise not. Life is unthinkable. We can think of, in a person's life journey, can not be a matter of course, from time to time. Often encounter some ditch Kankan, the business will be engaged in such and that obstruction. With tough perseverance, difficulties and natural, can break through the obstacles, If a person lacks perseverance, everything is hard to come back, halfway, then the so-called cause for him, it can only be looked away.With tough perseverance successful fame, ancient to have, now also have.Confucius and the stars on the moon, the meal wind Shulu, travel around the country, handed down three thousand disciples, created the seventy-two sage, had to say Air Jordan 3 Kids Nike Free Run Shoes that he was in ancient China's education has made an indelible achievement. Kuangheng family is poor, food and clothing, however, he was chiseled Cheap Nike Shoes Sale and steal light, with their own desire for knowledge, with their own strong will, the final achievements of a generation of scholars.Jing loyalty to the country's Yue Fei, juvenile home due to flooding, living in the country, people fence, and his mother had each other, clothing and food often no ups and downs. However, with his kind of perseverance perseverance, the final civil and military, become a generation of famous.

Posted by solo - Aug 25, 2017 | 6:04

Re: Red Hat for the Clueless: RPM

On RHEL, you have the choice of going out and finding that code from the sources and figuring out how to utilize the basic form contents. I do it constantly. Be that as it may, it's a ton more straightforward pursuing down all the additional heaps of code you require in the event that it comes pre-bundled.

Posted by Buy Assignment - Aug 29, 2017 | 7:49

Please enter your comment entry below. Press 'Preview' to see how it will look.

Sign In to Your Account
User Name:
:mrgreen: :neutral: :twisted: :arrow: :shock: :smile: :???: :cool: :evil: :grin: :idea: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad: :!: :?:
Home About Connect: Twitter Facebook RSS
© 2001-2012 Universal Networks, All Rights Reserved. Some content rights may be held by Universal Networks' providers and used under license. Powered by ServerForest and SAFARI. Learn about our privacy policy here.