Visions of Africa’s future, from African filmmakers

As a child growing up in Nigeria, books sparked my earliest imagination, but films, films transported me to magical places with flying cars, to infinite space with whole universes of worlds to discover. And my journey of discovery has led to many places and possibilities, all linked with ideas and imagination.

A decade and a half ago, I moved from working in law and technology in New York to financing, producing and distributing films in Nairobi, Lagos and Johannesburg. I’ve been privileged to see firsthand how in Africa, film powerfully explores the marvelous and the mundane, how it conveys infinite possibilities and fundamental truths. Afrofuturist films like “Pumzi,” Wanuri Kahiu’s superb sci-fi flick, paint brilliant pictures of Africa’s future, while Rungano Nyoni’s “I Am Not A Witch” and Akin Omotoso’s “Vaya” show us and catalogue our present. These filmmakers offer nuanced snapshots of Africa’s imagined and lived reality, in contrast to some of the images of Africa that come from outside, and the perspectives that accompany all of these images, whether sympathetic or dismissive, shape or distort how people see Africa.

And the truth is, many people think Africa is screwed up. Images play a big part of the reason why. Many tropes about Africa persist from pictures, pictures of famine in Ethiopia 30 years ago, pictures of the Biafran war half a century ago. But on a continent where the average age is 17, these tragic events seem almost prehistoric. Their images are far removed from how people in Africa’s many countries see themselves and their neighbors. For them, these images do not represent their reality.

So what is Africa’s reality, or rather, which of Africa’s many realities do we choose to focus on? Do we accept Emmanuel Macron’s imagination of Africa in 2017 as a place in which all women have seven or eight children? Or do we instead rely on the UN’s account that only one of Africa’s 54 countries has a fertility rate as high as seven? Do we focus on the fact that infant mortality and life expectancy in Africa today is roughly comparable to the US a hundred years ago, or do we focus on progress, the fact that Africa has cut infant mortality in half in the last four decades and has raised life expectancy by 10 years since the year 2000? These dueling perspectives are all accurate. Well, aside from Macron’s. He’s just wrong.

(Laughter)

But one version makes it easy to dismiss Africa as hopeless, while the other fuels hope that a billion people can continue to make progress towards prosperity. The fact that Africans do not have the luxury of turning their gaze elsewhere, the fact that we must make progress or live with the consequence of failure, are the reason we must continue to tell our own stories and show our own images, with honesty and primarily to an African audience, because the image that matters most is the image of Africa in African imaginations.

Now, honesty requires that we acknowledge that Africa is behind the rest of the world and needs to move swiftly to catch up. But thinking of a way forward, I’d like us to engage in a thought exercise. What if we could go back a hundred years, say to the US in 1917, but we could take with us all the modern ideas, innovations, inventions that we have today? What could we achieve with this knowledge? How richly could we improve quality of life and living conditions for people? How widely could we spread prosperity? Imagine if a hundred years ago, the education system had all the knowledge we have today, including how best to teach. And doctors and scientists knew all we do about public health measures, surgery techniques, DNA sequencing, cancer research and treatment? If we had access then to modern semiconductors, computers, mobile devices, the internet? Just imagine. If we did, we could take a quantum leap forward, couldn’t we. Well, Africa can take a leap of that magnitude today. There’s enough untapped innovation to move Africa a century forward in living conditions if the will and commitment is there.

This is not just a possibility; it’s an imperative for Africa’s future, a future that will see Africa’s population double to two and a half billion people in just three decades, a future that will see Africa have the world’s largest workforce, just as the idea of work itself is being radically reconsidered.

Now taking the leap forward isn’t that far-fetched. There are tons of examples that demonstrate the potential for change in Africa. Just 20 years ago, Nigeria had fewer than half a million working phone lines. Today it has a hundred million mobile phone subscriptions, and this mobile miracle is mirrored in every African country. There are over three quarters of a billion mobile phones in use in Africa today, and this has spurred justified excitement about leapfrogging, about bringing the sharing economy, artificial intelligence, autonomous machines to Africa. And this is all promising, but we need to think about sequencing. Forget putting the cart before the horse. You can’t put the self-driving car before the roads.

(Applause)

There’s a whole infrastructural and logical layer to innovation that we take for granted, but we have to triage for Africa, because some of the biggest infrastructure gaps are for things that are so basic that Westerners rarely have to think about them.

So let’s explore this. Imagine your internet access went off for a day, and when it came back, it only stayed on for three hours at a time, with random 15-hour outages? How would your life change? Now replace internet access with electricity. Think of your fridges, your TVs, your microwaves, just sitting idly for days. Now extend this nightmare to government offices, to businesses, to schools, to hospitals. This, or worse, is the type of access that hundreds of millions of Africans have to electricity, and to water, and to healthcare, and to sanitation, and to education. We must fix this. We must fix this because ensuring widespread and affordable access to decent infrastructure and services isn’t just low-hanging fruit: it’s fundamental to achieving the hundred-year leap. And when we fix it, we might find some unexpected benefits.

One unexpected benefit of the mobile miracle was that it led to what is perhaps the greatest cultural resurgence that Africa has seen in a generation: the rebirth of African popular music. For musicians like P-Square, Bongo Maffin and Wizkid, mobile phones paved the path to local dominance and global stardom. And the impact isn’t limited just to music. It extends to film, too. Beautiful, engaging films like these stills of “Pumzi,” “Vaya,” and “I Am Not A Witch” show. For while its external image might be dated, Africa continues to evolve, as does African film. Now, every now and again, the rest of the world catches on, perhaps with Djo Munga’s hard-hitting “Viva Riva!” with Newton Aduaka’s intense “Ezra,” or with Abderrahmane Sissako’s poetic “Timbuktu.” With mobile, Africans are discovering more and more of these films, and what that means is that it really matters less in Kinshasa or Cotonou what Cannes thinks of African film, or if those opinions are informed or fair.

Who really cares what the “New York Times” thinks? What matters is that Africans are validating African art and ideas, both critically and commercially, that they are watching what they want, and that African filmmakers are connecting with their core audiences. And this is important. It’s important because film can illuminate and inspire. Film can bring visions of the future to us here in the present. Films can serve as a conveyor belt for hope. And film can change perspectives faster than we can build roads.

In just over a decade, Nigeria’s film industry, Africa’s largest, has taken the country’s words and languages into the vocabulary and imaginations of millions in many other African countries. It has torn down borders, perhaps in the most effective way since the Berlin Conference sowed linguistic and geographic division across Africa. Film does speak a universal language, and boy, Nigerian film speaks it loudly.

Making Africa’s hundred-year leap will require that Africans summon the creativity to generate ideas and find the openness to accept and adapt ideas from anywhere else in the world to solve our pervasive problems. With focus on investment, films can help drive that change in Africa’s people, a change that is necessary to make the hundred-year leap, a change that will help create a prosperous Africa, an Africa that is dramatically better than it is today.

Thank you.

Asante sana.

(Applause)

##########################################################################################

1 spark

2 transport

3 marvelous

4 mundane

5 convey

6 fundamental

7 superb

8 sci-fi

9 witch

10 catalogue

11 nuanced

12 accompany

13 sympathetic

14 dismissive

15 distort

16 screw

17 trope

18 santitation

19 famine

20 Ethiopia

21 Nigeria

22 continent

23 prehistoric

24 fertility

25 infant

26 mortality

27 dueling

28 prosperity

29 semiconductor

30 quantumu

31 magnitude

32 untapped

33 imperative

34 radical

35 spur

36 triage

37 low

38 resurgence

39 pave

40 stardom

41 hard-hitting

42 poetic

43 illuminate

44 conveyor

45 tear

46 sowed

47 summon

48 pervasive

49 prosperous

50 dramatically

Posted in TED 演讲 | Visions of Africa’s future, from African filmmakers已关闭评论

Who are you, really? The puzzle of personality

What an intriguing group of individuals you are … to a psychologist.

(Laughter)

I’ve had the opportunity over the last couple of days of listening in on some of your conversations and watching you interact with each other. And I think it’s fair to say, already, that there are 47 people in this audience, at this moment, displaying psychological symptoms I would like to discuss today.

(Laughter)

And I thought you might like to know who you are.

(Laughter)

But instead of pointing at you, which would be gratuitous and intrusive, I thought I would tell you a few facts and stories, in which you may catch a glimpse of yourself.

I’m in the field of research known as personality psychology, which is part of a larger personality science which spans the full spectrum, from neurons to narratives. And what we try to do, in our own way, is to make sense of how each of us — each of you — is, in certain respects, like all other people, like some other people and like no other person.

Now, already you may be saying of yourself, “I’m not intriguing. I am the 46th most boring person in the Western Hemisphere.” Or you may say of yourself, “I am intriguing, even if I am regarded by most people as a great, thundering twit.”

(Laughter)

But it is your self-diagnosed boringness and your inherent “twitiness” that makes me, as a psychologist, really fascinated by you. So let me explain why this is so.

One of the most influential approaches in personality science is known as trait psychology, and it aligns you along five dimensions which are normally distributed, and that describe universally held aspects of difference between people. They spell out the acronym OCEAN. So, “O” stands for “open to experience,” versus those who are more closed. “C” stands for “conscientiousness,” in contrast to those with a more lackadaisical approach to life. “E” — “extroversion,” in contrast to more introverted people. “A” — “agreeable individuals,” in contrast to those decidedly not agreeable. And “N” — “neurotic individuals,” in contrast to those who are more stable.

All of these dimensions have implications for our well-being, for how our life goes. And so we know that, for example, openness and conscientiousness are very good predictors of life success, but the open people achieve that success through being audacious and, occasionally, odd. The conscientious people achieve it through sticking to deadlines, to persevering, as well as having some passion. Extroversion and agreeableness are both conducive to working well with people. Extroverts, for example, I find intriguing. With my classes, I sometimes give them a basic fact that might be revealing with respect to their personality: I tell them that it is virtually impossible for adults to lick the outside of their own elbow.

(Laughter)

Did you know that? Already, some of you have tried to lick the outside of your own elbow. But extroverts amongst you are probably those who have not only tried, but they have successfully licked the elbow of the person sitting next to them.

(Laughter)

Those are the extroverts.

Let me deal in a bit more detail with extroversion, because it’s consequential and it’s intriguing, and it helps us understand what I call our three natures. First, our biogenic nature — our neurophysiology. Second, our sociogenic or second nature, which has to do with the cultural and social aspects of our lives. And third, what makes you individually you — idiosyncratic — what I call your “idiogenic” nature.

Let me explain. One of the things that characterizes extroverts is they need stimulation. And that stimulation can be achieved by finding things that are exciting: loud noises, parties and social events here at TED — you see the extroverts forming a magnetic core. They all gather together. And I’ve seen you. The introverts are more likely to spend time in the quiet spaces up on the second floor, where they are able to reduce stimulation — and may be misconstrued as being antisocial, but you’re not necessarily antisocial. It may be that you simply realize that you do better when you have a chance to lower that level of stimulation.

Sometimes it’s an internal stimulant, from your body. Caffeine, for example, works much better with extroverts than it does introverts. When extroverts come into the office at nine o’clock in the morning and say, “I really need a cup of coffee,” they’re not kidding — they really do. Introverts do not do as well, particularly if the tasks they’re engaged in — and they’ve had some coffee — if those tasks are speeded, and if they’re quantitative, introverts may give the appearance of not being particularly quantitative. But it’s a misconstrual.

So here are the consequences that are really quite intriguing: we’re not always what seem to be, and that takes me to my next point. I should say, before getting to this, something about sexual intercourse, although I may not have time. And so, if you would like me to — yes, you would? OK.

(Laughter)

There are studies done on the frequency with which individuals engage in the conjugal act, as broken down by male, female; introvert, extrovert. So I ask you: How many times per minute — oh, I’m sorry, that was a rat study —

(Laughter)

How many times per month do introverted men engage in the act? 3.0. Extroverted men? More or less? Yes, more. 5.5 — almost twice as much. Introverted women: 3.1. Extroverted women? Frankly, speaking as an introverted male, which I will explain later — they are heroic. 7.5. They not only handle all the male extroverts, they pick up a few introverts as well.

(Laughter)

(Applause)

We communicate differently, extroverts and introverts. Extroverts, when they interact, want to have lots of social encounter punctuated by closeness. They’d like to stand close for comfortable communication. They like to have a lot of eye contact, or mutual gaze. We found in some research that they use more diminutive terms when they meet somebody. So when an extrovert meets a Charles, it rapidly becomes “Charlie,” and then “Chuck,” and then “Chuckles Baby.”

(Laughter)

Whereas for introverts, it remains “Charles,” until he’s given a pass to be more intimate by the person he’s talking to. We speak differently. Extroverts prefer black-and-white, concrete, simple language. Introverts prefer — and I must again tell you that I am as extreme an introvert as you could possibly imagine — we speak differently. We prefer contextually complex, contingent, weasel-word sentences —

(Laughter)

More or less.

(Laughter)

As it were.

(Laughter)

Not to put too fine a point upon it — like that.

When we talk, we sometimes talk past each other. I had a consulting contract I shared with a colleague who’s as different from me as two people can possibly be. First, his name is Tom. Mine isn’t.

(Laughter)

Secondly, he’s six foot five. I have a tendency not to be.

(Laughter)

And thirdly, he’s as extroverted a person as you could find. I am seriously introverted. I overload so much, I can’t even have a cup of coffee after three in the afternoon and expect to sleep in the evening.

We had seconded to this project a fellow called Michael. And Michael almost brought the project to a crashing halt. So the person who seconded him asked Tom and me, “What do you make of Michael?” Well, I’ll tell you what Tom said in a minute. He spoke in classic “extrovert-ese.” And here is how extroverted ears heard what I said, which is actually pretty accurate. I said, “Well Michael does have a tendency at times of behaving in a way that some of us might see as perhaps more assertive than is normally called for.”

(Laughter)

Tom rolled his eyes and he said, “Brian, that’s what I said: he’s an asshole!”

(Laughter)

(Applause)

Now, as an introvert, I might gently allude to certain “assholic” qualities in this man’s behavior, but I’m not going to lunge for the a-word.

(Laughter)

But the extrovert says, “If he walks like one, if he talks like one, I call him one.” And we go past each other.

Now is this something that we should be heedful of? Of course. It’s important that we know this. Is that all we are? Are we just a bunch of traits? No, we’re not. Remember, you’re like some other people and like no other person. How about that idiosyncratic you? As Elizabeth or as George, you may share your extroversion or your neuroticism. But are there some distinctively Elizabethan features of your behavior, or Georgian of yours, that make us understand you better than just a bunch of traits? That make us love you? Not just because you’re a certain type of person.

I’m uncomfortable putting people in pigeonholes. I don’t even think pigeons belong in pigeonholes. So what is it that makes us different? It’s the doings that we have in our life — the personal projects. You have a personal project right now, but nobody may know it here. It relates to your kid — you’ve been back three times to the hospital, and they still don’t know what’s wrong. Or it could be your mom. And you’d been acting out of character. These are free traits. You’re very agreeable, but you act disagreeably in order to break down those barriers of administrative torpor in the hospital, to get something for your mom or your child.

What are these free traits? They’re where we enact a script in order to advance a core project in our lives. And they are what matters. Don’t ask people what type you are; ask them, “What are your core projects in your life?” And we enact those free traits. I’m an introvert, but I have a core project, which is to profess. I’m a professor. And I adore my students, and I adore my field. And I can’t wait to tell them about what’s new, what’s exciting, what I can’t wait to tell them about. And so I act in an extroverted way, because at eight in the morning, the students need a little bit of humor, a little bit of engagement to keep them going in arduous days of study.

But we need to be very careful when we act protractedly out of character. Sometimes we may find that we don’t take care of ourselves. I find, for example, after a period of pseudo-extroverted behavior, I need to repair somewhere on my own. As Susan Cain said in her “Quiet” book, in a chapter that featured the strange Canadian professor who was teaching at the time at Harvard, I sometimes go to the men’s room to escape the slings and arrows of outrageous extroverts.

(Laughter)

I remember one particular day when I was retired to a cubicle, trying to avoid overstimulation. And a real extrovert came in beside me — not right in my cubicle, but in the next cubicle over — and I could hear various evacuatory noises, which we hate — even our own, that’s why we flush during as well as after.

(Laughter)

And then I heard this gravelly voice saying, “Hey, is that Dr. Little?”

(Laughter)

If anything is guaranteed to constipate an introvert for six months, it’s talking on the john.

(Laughter)

That’s where I’m going now. Don’t follow me.

Thank you.

(Applause)

Posted in TED 演讲 | 1 Comment

字幕校准脚本

1 先在编辑器把时间补充上,内容写上特殊字符,如 OOO
2 然后下载字幕文件如 srt, 拷贝到 linux 下,存成 v.txt
3 运行 ad.py 会把 OOO 杭内容过滤掉,后面的内容依次往上提。
代码如下:

#!/usr/bin/env python

if name == 'main':
f=open("v.txt", "r")
plist=[]
mlist=[]
tlist=[]
while True:
ptr1 = f.readline()
tm1 = f.readline()
msg1 = f.readline()
blank = f.readline()
ptr = ptr1.strip('\n')
if not ptr:
break
tm = tm1.strip('\n')
msg = msg1.strip('\n')
plist.append(ptr)
mlist.append(msg)
tlist.append(tm)
diff=0
for i in range(0, len(mlist)):
if(i+diff >= len(mlist)):
break
print "%s\n%s" % (plist[i], tlist[i])
while(mlist[i+diff] == "ooo"):
diff = diff + 1
print "%s\n" % mlist[i+diff]

        #print "%s\n%s\n%s\n" % (ptr, tm, msg)

Posted in DEVOPS | 1 Comment

rpm 宏定义文档

路径为:
/usr/lib/rpm/macros

内容为:
#/*! \page config_macros Default configuration: /usr/lib/rpm/macros

\verbatim

#

This is a global RPM configuration file. All changes made here will

be lost when the rpm package is upgraded. Any per-system configuration

should be added to /etc/rpm/macros, while per-user configuration should

be added to ~/.rpmmacros.

#
#==============================================================================

Macro naming conventions (preliminary):

#
# Macros that begin with an underscore are “local” in the sense that
# they (if used) will not be exported in rpm headers. Some macros
# that don’t start with an underscore (but look like they should)
# are compatible with macros generated by rpm-2.5.x and will be made
# more consistent in a future release.
#

#==============================================================================

—- A macro that expands to nothing.

#
%nil %{!?nil}

#==============================================================================

—- filesystem macros.

#
%_usr /usr
%_usrsrc %{_usr}/src
%_var /var

#==============================================================================

—- Generally useful path macros.

#
%__7zip /usr/bin/7za
%__awk gawk
%__bzip2 /usr/bin/bzip2
%__cat /usr/bin/cat
%__chgrp /usr/bin/chgrp
%__chmod /usr/bin/chmod
%__chown /usr/bin/chown
%__cp /usr/bin/cp
%__cpio /usr/bin/cpio
%__file /usr/bin/file
%__gpg %{_bindir}/gpg2
%__grep /usr/bin/grep
%__gzip /usr/bin/gzip
%__id /usr/bin/id
%__id_u %{__id} -u
%__install /usr/bin/install
%__ln_s ln -s
%__lrzip /usr/bin/lrzip
%__lzip /usr/bin/lzip

Deprecated, use %__xz instead.

%__lzma %__xz –format=lzma
%__xz /usr/bin/xz
%__make /usr/bin/make
%__mkdir /usr/bin/mkdir
%__mkdir_p /usr/bin/mkdir -p
%__mv /usr/bin/mv
%__patch /usr/bin/patch
%__perl /usr/bin/perl
%__python /usr/bin/python
%__restorecon /sbin/restorecon
%__rm /usr/bin/rm
%__rsh /usr/bin/rsh
%__sed /usr/bin/sed
%__semodule /usr/bin/semodule
%__ssh /usr/bin/ssh
%__tar /usr/bin/tar
%__unzip /usr/bin/unzip
%__git /usr/bin/git
%__hg /usr/bin/hg
%__bzr /usr/bin/bzr
%__quilt /usr/bin/quilt

#==============================================================================

—- Build system path macros.

#
%__ar ar
%__as as
%__cc gcc
%__cpp gcc -E
%__cxx g++
%__ld /usr/bin/ld
%__nm /usr/bin/nm
%__objcopy /usr/bin/objcopy
%__objdump /usr/bin/objdump
%__ranlib ranlib
%__remsh %{__rsh}
%__strip /usr/bin/strip

XXX avoid failures if tools are not installed when rpm is built.

%__libtoolize libtoolize
%__aclocal aclocal
%__autoheader autoheader
%__automake automake
%__autoconf autoconf

#==============================================================================

Conditional build stuff.

Check if symbol is defined.

Example usage: %if %{defined with_foo} && %{undefined with_bar} …

%defined() %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
%undefined() %{expand:%%{?%{1}:0}%%{!?%{1}:1}}

Shorthand for %{defined with_…}

%with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}

Handle conditional builds. %bcond_with is for case when feature is

default off and needs to be activated with –with … command line

switch. %bcond_without is for the dual case.

#

%bcond_with foo defines symbol with_foo if –with foo was specified on

command line.

%bcond_without foo defines symbol with_foo if –without foo was not

specified on command line.

#

For example (spec file):

#

(at the beginning)

%bcond_with extra_fonts

%bcond_without static

(and later)

%if %{with extra_fonts}

%else

%endif

%if ! %{with static}

%endif

%ifdef %{with static}

%endif

%{?with_static: … }

%{!?with_static: … }

%{?with_extra_fonts: … }

%{!?with_extra_fonts: … }

#

The bottom line: never use without_foo, _with_foo nor _without_foo, only

with_foo. This way changing default set of bconds for given spec is just

a matter of changing single line in it and syntax is more readable.

%bcond_with() %{expand:%%{?with%{1}:%%global with_%{1} 1}}
%bcond_without() %{expand:%%{!?without%{1}:%%global with_%{1} 1}}
#
#==============================================================================

—- Required rpmrc macros.

# Macros that used to be initialized as a side effect of rpmrc parsing.
# These are the default values that can be overridden by other
# (e.g. per-platform, per-system, per-packager, per-package) macros.
#
# The directory where rpm’s configuration and scripts live
%_rpmconfigdir %{getconfdir}

# The directory where sources/patches will be unpacked and built.
%_builddir %{_topdir}/BUILD

# The interpreter used for build scriptlets.
%_buildshell /bin/sh

# The path to the bzip2 executable (legacy, use %{__bzip2} instead).
%_bzip2bin %{__bzip2}

# The location of the rpm database file(s).
%_dbpath %{_var}/lib/rpm

# The location of the rpm database file(s) after “rpm –rebuilddb”.
%_dbpath_rebuild %{_dbpath}

%_keyringpath %{_dbpath}/pubkeys/

#
# Path to script that creates debug symbols in a /usr/lib/debug
# shadow tree.
#
# A spec file can %%define _find_debuginfo_opts to pass options to
# the script. See the script for details.
#
%__debug_install_post \
%{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:–strict-build-id} %{?_include_minidebuginfo:-m} %{?_find_debuginfo_dwz_opts} %{?_find_debuginfo_opts} “%{_builddir}/%{?buildsubdir}”\
%{nil}

# Template for debug information sub-package.
%debug_package \
%ifnarch noarch\
%global __debug_package 1\
%package debuginfo\
Summary: Debug information for package %{name}\
Group: Development/Debug\
AutoReqProv: 0\
%description debuginfo\
This package provides debug information for package %{name}.\
Debug information is useful when developing applications that use this\
package or when debugging this package.\
%files debuginfo -f debugfiles.list\
%defattr(-,root,root)\
%endif\
%{nil}

%_defaultdocdir %{_datadir}/doc
%_defaultlicensedir %{_datadir}/licenses

# The path to the gzip executable (legacy, use %{__gzip} instead).
%_gzipbin %{__gzip}

# The Unix time of the latest kept changelog entry in binary packages.
# Any older entry is not packaged in binary packages.
%_changelog_trimtime 0

# The directory where newly built binary packages will be written.
%_rpmdir %{_topdir}/RPMS

# A template used to generate the output binary package file name
# (legacy).
%_rpmfilename %{_build_name_fmt}

# The directory where sources/patches from a source package will be
# installed. This is also where sources/patches are found when building.
%_sourcedir %{_topdir}/SOURCES

# The directory where the spec file from a source package will be
# installed.
%_specdir %{_topdir}/SPECS

# The directory where newly built source packages will be written.
%_srcrpmdir %{_topdir}/SRPMS

# The directory where buildroots will be created.
%_buildrootdir %{_topdir}/BUILDROOT

# Build root path, where %install installs the package during build.
%buildroot %{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}

# Directory where temporaray files can be created.
%_tmppath %{_var}/tmp

# Path to top of build area.
%_topdir %{getenv:HOME}/rpmbuild

# The path to the unzip executable (legacy, use %{__unzip} instead).
%_unzipbin %{__unzip}

#==============================================================================

—- Optional rpmrc macros.

# Macros that are initialized as a side effect of rpmrc and/or spec
# file parsing.
#
# The sub-directory (relative to %{_builddir}) where sources are compiled.
# This macro is set after processing %setup, either explicitly from the
# value given to -n or the default name-version.
#
#%buildsubdir

# Configurable distribution information, same as Distribution: tag in a
# specfile.
#
#%distribution

# Configurable distribution URL, same as DistURL: tag in a specfile.
# The URL will be used to supply reliable information to tools like
# rpmfind.
#

Note: You should not configure with disturl (or build packages with

the DistURL: tag) unless you are willing to supply content in a

yet-to-be-determined format at the URL specified.

#
#%disturl

# Configurable bug URL, same as BugURL: tag in a specfile.
# The URL will be used to supply reliable information to where
# to file bugs.
#
#%bugurl

# Boolean (i.e. 1 == “yes”, 0 == “no”) that controls whether files
# marked as %doc should be installed.
#%_excludedocs

# The port and machine name of a FTP proxy host running TIS firewall.
#
#%_ftpport
#%_ftpproxy

# The signature to use and the location of configuration files for
# signing packages with GNU gpg.
#
#%_gpg_name
#%_gpg_path

# The port and machine name of an HTTP proxy host.
#
#%_httpport
#%_httpproxy

# The PATH put into the environment before running %pre/%post et al.
#
%_install_script_path /sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin

# A colon separated list of desired locales to be installed;
# “all” means install all locale specific files.
#
%_install_langs all

# The value of CLASSPATH in build scriptlets (iff configured).
#
#%_javaclasspath all

# Import packaging conventions from jpackage.org (prefixed with _
# to avoid name collisions).
#
%_javadir %{_datadir}/java
%_javadocdir %{_datadir}/javadoc

# A colon separated list of paths where files should not be installed.
# Usually, these are network file system mount points.
#
#%_netsharedpath

# (experimental)
# The type of pattern match used on rpmdb iterator selectors:
# “default” simple glob-like regex, periods will be escaped,
# splats will have period prepended, full “^…$” match
# required. Also, file path tags will use glob(7).
# “strcmp” compare strings
# “regex” regex(7) patterns using regcomp(3)/regexec(3)
# “glob” glob(7) patterns using fnmatch(3)
#
%_query_selector_match default

# Configurable packager information, same as Packager: in a specfile.
#
#%packager

# Compression type and level for source/binary package payloads.
# “w9.gzdio” gzip level 9 (default).
# “w9.bzdio” bzip2 level 9.
# “w7.xzdio” xz level 7, xz’s default.
# “w7.lzdio” lzma-alone level 7, lzma’s default
#
#%_source_payload w9.gzdio
#%_binary_payload w9.gzdio

# Algorithm to use for generating file checksum digests on build.
# If not specified or 0, MD5 is used.
# WARNING: non-MD5 is backwards incompatible, don’t enable lightly!
# The supported algorithms may depend on NSS version, as of NSS
# 3.11.99.5 the following are supported:
# 1 MD5 (default)
# 2 SHA1
# 8 SHA256
# 9 SHA384
# 10 SHA512
#
#%_source_filedigest_algorithm 1
#%_binary_filedigest_algorithm 1

# Configurable vendor information, same as Vendor: in a specfile.
#
#%vendor

# Default fuzz level for %patch in spec file.
%_default_patch_fuzz 0

# Default patch flags
#%_default_patch_flags -s

#==============================================================================

—- Build configuration macros.

#

Script gets packaged file list on input and buildroot as first parameter.

Returns list of unpackaged files, i.e. files in $RPM_BUILD_ROOT not packaged.

#

Note: Disable (by commenting out) for legacy compatibility.

%__check_files %{_rpmconfigdir}/check-files %{buildroot}

#

Should unpackaged files in a build root terminate a build?

#

Note: The default value should be 0 for legacy compatibility.

%_unpackaged_files_terminate_build 1

#

Should missing %doc files in the build directory terminate a build?

#

Note: The default value should be 0 for legacy compatibility.

%_missing_doc_files_terminate_build 1

#

Should binaries in noarch packages terminate a build?

%_binaries_in_noarch_packages_terminate_build 1

#

Should rpm try to download missing sources at build-time?

Enabling this is dangerous as long as rpm has no means to validate

the integrity of the download with a digest or signature.

%_disable_source_fetch 1

#

Program to call for each successfully built and written binary package.

The package name is passed to the program as a command-line argument.

#
#%_build_pkgcheck %{_bindir}/rpmlint

#

Program to call for the whole binary package set after build.

The package set is passed to the program via command-line arguments.

#
#%_build_pkgcheck_set %{_bindir}/rpmlint

#

Program to call for successfully built and written SRPM.

The package name is passed to the program as a command-line argument.

#
#%_build_pkgcheck_srpm %{_bindir}/rpmlint

#

Should the build of packages fail if package checker (if defined) returns

non-zero exit status?

#
#%_nonzero_exit_pkgcheck_terminate_build 1

#

Should an ELF file processed by find-debuginfo.sh having no build ID

terminate a build? This is left undefined to disable it and defined to

enable.

#
#%_missing_build_ids_terminate_build 1

#

Include minimal debug information in build binaries.

Requires _enable_debug_packages.

#
#%_include_minidebuginfo 1

#

Use internal dependency generator rather than external helpers?

%_use_internal_dependency_generator 1

#

Filter GLIBC_PRIVATE Provides: and Requires:

%_filter_GLIBC_PRIVATE 0

Directories whose contents should be considered as documentation.

%__docdir_path %{_datadir}/doc:%{_datadir}/man:%{_datadir}/info:%{_datadir}/gtk-doc/html:%{?_docdir}:%{?_mandir}:%{?_infodir}:%{?_javadocdir}:/usr/doc:/usr/man:/usr/info:/usr/X11R6/man

#

Path to scripts to autogenerate package dependencies,

#

Note: Used iff _use_internal_dependency_generator is zero.

#%__find_provides %{_rpmconfigdir}/rpmdeps –provides
#%__find_requires %{_rpmconfigdir}/rpmdeps –requires
%__find_provides %{_rpmconfigdir}/find-provides
%__find_requires %{_rpmconfigdir}/find-requires
#%__find_conflicts ???
#%__find_obsoletes ???

Path to file attribute classifications for automatic dependency

extraction, used when _use_internal_dependency_generator

is used (on by default). Files can have any number of attributes

attached to them, and dependencies are separately extracted for

each attribute.

To define a new file attribute called “myattr”, add a file named

“myattr” to this directory, defining the requires and/or provides

finder script(s) + magic and/or path pattern regex(es).

provides finder and

%__myattr_requires path + args to requires finder script for

%__myattr_provides path + args to provides finder script for

%__myattr_magic libmagic classification match regex

%__myattr_path path based classification match regex

%__myattr_flags flags to control behavior (just “exeonly” for now)

%__myattr_exclude_magic exclude by magic regex

%__myattr_exclude_path exclude by path regex

#
%_fileattrsdir %{_rpmconfigdir}/fileattrs

#==============================================================================

—- Database configuration macros.

# Macros used to configure Berkley db parameters.
#

rpmdb macro configuration values are a colon (or white space) separated

list of tokens, with an optional ‘!’ negation to explicitly disable bit

values, or a “=value” if a parameter. A per-tag value is used (e.g.

%_dbi_config_Packages) if defined, otherwise a per-rpmdb default

(e.g. %_dbi_config).

#

Here’s a short list of the tokens, with a guess of whether the option is

useful:

# (nothing) currently used in rpm, known to work.
# “+++” under development, will be supported in rpm eventually.
# “???” I have no clue, you’re mostly on your own.
#

If you do find yourself inclined to fiddle, here’s what I see (shrug):

1) Only the value of mp_size has any serious impact on overall performance,

and you will need ~256Kb to handle a typical machine install.

2) Only the Packages hash, because of the size of the values (i.e. headers),

will ever need tuning. Diddle the pagesize if you’re interested, although

I believe that you will find pagesize=512 “best”.

3) Adding nofsync increases speed, but risks total data loss. Fiddle shared

and/or mp_size instead.

#

token works? Berkeley db flag or value

#==================================================
#———————- DBENV tunable values:

mmapsize=16Mb DBENV->set_mp_mmapsize

cachesize=1Mb DBENV->set_cachesize, DB->set_cachesize

#———————- DB->open bits:

nommap ??? DB_NOMMAP

#———————– rpmdb specific configuration:

lockdbfd (always on for Packages) Use fcntl(2) locking ?

nofsync Disable fsync(2) call performed after db3 writes?

#

Misc BDB tuning options

%__dbi_other mp_mmapsize=128Mb mp_size=1Mb

%_dbi_config %{?__dbi_other}

“Packages” should have shared/exclusive fcntl(2) lock using “lockdbfd”.

%_dbi_config_Packages %{?_dbi_config} lockdbfd

#==============================================================================

—- GPG/PGP/PGP5 signature macros.

# Macro(s) to hold the arguments passed to GPG/PGP for package
# signing and verification.
#
%__gpg_check_password_cmd %{__gpg} \
gpg –batch –no-verbose –passphrase-fd 3 -u “%{_gpg_name}” -so –

%__gpg_sign_cmd %{__gpg} \
gpg –batch –no-verbose –no-armor –passphrase-fd 3 \
%{?_gpg_digest_algo:–digest-algo %{_gpg_digest_algo}} \
–no-secmem-warning \
-u “%{_gpg_name}” -sbo %{__signature_filename} %{__plaintext_filename}

XXX rpm >= 4.1 verifies signatures internally

#%__gpg_verify_cmd %{__gpg} \
# gpg –batch –no-verbose –verify –no-secmem-warning \
# %{__signature_filename} %{__plaintext_filename}
#

XXX rpm-4.1 verifies prelinked libraries using a prelink undo helper.

# Normally this macro is defined in /etc/rpm/macros.prelink, installed
# with the prelink package. If the macro is undefined, then prelinked
# shared libraries contents are MD5 digest verified (as usual), rather
# than MD5 verifying the output of the prelink undo helper.
#
# Note: The 2nd token is used as argv[0] and “library” is a
# placeholder that will be deleted and replaced with the appropriate
# library file path.
#%__prelink_undo_cmd /usr/sbin/prelink prelink -y library

Horowitz Key Protocol server configuration

#
%_hkp_keyserver http://pgp.mit.edu
%_hkp_keyserver_query %{_hkp_keyserver}:11371/pks/lookup?op=get&search=0x

#==============================================================================

—- Transaction macros.

# Macro(s) used to parameterize transactions.
#
# The output binary package file name template used when building
# binary packages.
#

XXX Note: escaped %% for use in headerSprintf()

%_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

# Verify digest/signature flags for various rpm modes:
# 0x30300 (_RPMVSF_NODIGESTS) –nohdrchk if set, don’t check digest(s)
# 0xc0c00 (_RPMVSF_NOSIGNATURES) –nosignature if set, don’t check signature(s)
# 0xf0000 (_RPMVSF_NOPAYLOAD) –nolegacy if set, check header+payload (if possible)
# 0x00f00 (_RPMVSF_NOHEADER) –nohdrchk if set, don’t check rpmdb headers
#
# For example, the value 0xf0c00 (=0xf0000+0xc0c00) disables legacy
# digest/signature checking, disables signature checking, but attempts
# digest checking, also when retrieving headers from the database.
#
# You also can do:
# >>> hex(rpm._RPMVSF_NOSIGNATURES)
# ‘0xc0c00’
# or:
# >>> hex(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NOPAYLOAD)
# ‘0xf0c00’
# at the python prompt for example, after “import rpm”.
#
# The checking overhead is ~11ms per header for digests/signatures;
# each header from the database is checked only when first encountered
# for each database open.
#
# Note: the %_vsflags_erase applies to –upgrade/–freshen modes as
# well as –erase.
#
%__vsflags 0xf0000
%_vsflags_build %{__vsflags}
%_vsflags_erase %{__vsflags}
%_vsflags_install %{__vsflags}
%_vsflags_query %{__vsflags}
%_vsflags_rebuilddb 0xc0c00
%_vsflags_verify %{__vsflags}

#

Default output format string for rpm -qa

#

XXX Note: escaped %% for use in headerFormat()

%_query_all_fmt %%{nvra}

#

Default path to the file used for transaction fcntl lock.

%_rpmlock_path %{_dbpath}/.rpm.lock

#

ISA dependency marker, none for noarch and name-bitness for others

%_isa %{?__isa:(%{__isa})}%{!?__isa:%{nil}}

#

Define per-arch and per-os defaults. Normally overridden by per-target macros.

%__arch_install_post %{nil}
%__os_install_post %{___build_post}

Macro to fix broken permissions in sources

%_fixperms %{__chmod} -Rf a+rX,u+w,g-w,o-w

#==============================================================================

—- Scriptlet template templates.

# Global defaults used for building scriptlet templates.
#

%___build_shell %{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}
%___build_args -e
%___build_cmd %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}
%___build_pre \
RPM_SOURCE_DIR=\”%{u2p:%{_sourcedir}}\”\
RPM_BUILD_DIR=\”%{u2p:%{_builddir}}\”\
RPM_OPT_FLAGS=\”%{optflags}\”\
RPM_LD_FLAGS=\”%{?__global_ldflags}\”\
RPM_ARCH=\”%{_arch}\”\
RPM_OS=\”%{_os}\”\
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS\
RPM_DOC_DIR=\”%{_docdir}\”\
export RPM_DOC_DIR\
RPM_PACKAGE_NAME=\”%{name}\”\
RPM_PACKAGE_VERSION=\”%{version}\”\
RPM_PACKAGE_RELEASE=\”%{release}\”\
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\
LANG=C\
export LANG\
unset CDPATH DISPLAY ||:\
%{?buildroot:RPM_BUILD_ROOT=\”%{u2p:%{buildroot}}\”\
export RPM_BUILD_ROOT}\
%{?_javaclasspath:CLASSPATH=\”%{_javaclasspath}\”\
export CLASSPATH}\
PKG_CONFIG_PATH=\”${PKG_CONFIG_PATH}:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig\”\
export PKG_CONFIG_PATH\
\
%{verbose:set -x}%{!verbose:exec > /dev/null}\
umask 022\
cd \”%{u2p:%{_builddir}}\”\

#%___build_body %{nil}
%___build_post exit 0

%___build_template #!%{___build_shell}\
%{___build_pre}\
%{nil}

#%{___build_body}\
#%{___build_post}\
#%{nil}

#==============================================================================

—- Scriptlet templates.

# Macro(s) that expand to a command and script that is executed.
# CAVEAT: All macro expansions must fit in a BUFSIZ (8192 byte) buffer.
#
%__spec_prep_shell %{___build_shell}
%__spec_prep_args %{___build_args}
%__spec_prep_cmd %{___build_cmd}
%__spec_prep_pre %{___build_pre}
%__spec_prep_body %{___build_body}
%__spec_prep_post %{___build_post}
%__spec_prep_template #!%{__spec_prep_shell}\
%{__spec_prep_pre}\
%{nil}

#%{__spec_prep_body}\
#%{__spec_prep_post}\
#%{nil}

%__spec_build_shell %{___build_shell}
%__spec_build_args %{___build_args}
%__spec_build_cmd %{___build_cmd}
%__spec_build_pre %{___build_pre}
%__spec_build_body %{___build_body}
%__spec_build_post %{___build_post}
%__spec_build_template #!%{__spec_build_shell}\
%{__spec_build_pre}\
%{nil}

#%{__spec_build_body}\
#%{__spec_build_post}\
#%{nil}

%__spec_install_shell %{___build_shell}
%__spec_install_args %{___build_args}
%__spec_install_cmd %{___build_cmd}
%__spec_install_pre %{___build_pre}
%__spec_install_body %{___build_body}
%__spec_install_post\
%{?__debug_package:%{__debug_install_post}}\
%{__arch_install_post}\
%{__os_install_post}\
%{nil}
%__spec_install_template #!%{__spec_install_shell}\
%{__spec_install_pre}\
%{nil}

#%{__spec_install_body}\
#%{__spec_install_post}\
#%{nil}

%__spec_check_shell %{___build_shell}
%__spec_check_args %{___build_args}
%__spec_check_cmd %{___build_cmd}
%__spec_check_pre %{___build_pre}
%__spec_check_body %{___build_body}
%__spec_check_post %{___build_post}
%__spec_check_template #!%{__spec_check_shell}\
%{__spec_check_pre}\
%{nil}

#%{__spec_check_body}\
#%{__spec_check_post}\
#%{nil}

#%__spec_autodep_shell %{___build_shell}
#%__spec_autodep_args %{___build_args}
#%__spec_autodep_cmd %{___build_cmd}
#%__spec_autodep_pre %{___build_pre}
#%__spec_autodep_body %{___build_body}
#%__spec_autodep_post %{___build_post}
#%__spec_autodep_template #!%{__spec_autodep_shell}\
#%{__spec_autodep_pre}\
#%{nil}

#%{__spec_autodep_body}\
#%{__spec_autodep_post}\
#%{nil}

%__spec_clean_shell %{___build_shell}
%__spec_clean_args %{___build_args}
%__spec_clean_cmd %{___build_cmd}
%__spec_clean_pre %{___build_pre}
%__spec_clean_body %{___build_body}
%__spec_clean_post %{___build_post}
%__spec_clean_template #!%{__spec_clean_shell}\
%{__spec_clean_pre}\
%{nil}

#%{__spec_clean_body}\
#%{__spec_clean_post}\
#%{nil}

%__spec_rmbuild_shell %{___build_shell}
%__spec_rmbuild_args %{___build_args}
%__spec_rmbuild_cmd %{___build_cmd}
%__spec_rmbuild_pre %{___build_pre}
%__spec_rmbuild_body %{___build_body}
%__spec_rmbuild_post %{___build_post}
%__spec_rmbuild_template #!%{__spec_rmbuild_shell}\
%{__spec_rmbuild_pre}\
%{nil}

#%{__spec_rmbuild_body}\
#%{__spec_rmbuild_post}\
#%{nil}

XXX We don’t expand pre/post install scriptlets (yet).

#%__spec_pre_pre %{nil}
#%__spec_pre_post %{nil}
#%__spec_post_pre %{nil}
#%__spec_post_post %{nil}
#%__spec_preun_pre %{nil}
#%__spec_preun_post %{nil}
#%__spec_postun_pre %{nil}
#%__spec_postun_post %{nil}
#%__spec_triggerpostun_pre %{nil}
#%__spec_triggerpostun_post %{nil}
#%__spec_triggerun_pre %{nil}
#%__spec_triggerun_post %{nil}
#%__spec_triggerin_pre %{nil}
#%__spec_triggerin_post %{nil}

#==============================================================================

—- configure macros.

# Macro(s) slavishly copied from autoconf’s config.status.
#
%_prefix /usr
%_exec_prefix %{_prefix}
%_bindir %{_exec_prefix}/bin
%_sbindir %{_exec_prefix}/sbin
%_libexecdir %{_exec_prefix}/libexec
%_datadir %{_prefix}/share
%_sysconfdir /etc
%_sharedstatedir %{_prefix}/com
%_localstatedir %{_prefix}/var
%_lib lib
%_libdir %{_exec_prefix}/%{_lib}
%_includedir %{_prefix}/include
%_infodir %{_datadir}/info
%_mandir %{_datadir}/man

#==============================================================================

—- config.guess platform macros.

# Macro(s) similar to the tokens used by configure.
#
%_build %{_host}
%_build_alias %{_host_alias}
%_build_cpu %{_host_cpu}
%_build_vendor %{_host_vendor}
%_build_os %{_host_os}
%_host x86_64-redhat-linux-gnu
%_host_alias x86_64-redhat-linux-gnu%{nil}
%_host_cpu x86_64
%_host_vendor redhat
%_host_os linux
%_target %{_host}
%_target_alias %{_host_alias}
%_target_cpu %{_host_cpu}
%_target_vendor %{_host_vendor}
%_target_os %{_host_os}

#==============================================================================

—- specfile macros.

# Macro(s) here can be used reliably for reproducible builds.
# (Note: Above is the goal, below are the macros under development)
#

The configure macro runs autoconf configure script with platform specific

directory structure (–prefix, –libdir etc) and compiler flags

such as CFLAGS.

#

The configure macro should be invoked as %configure (rather than %{configure})

because the rest of the arguments will be expanded using %*.

#
%_configure ./configure
%configure \
CFLAGS=”${CFLAGS:-%optflags}” ; export CFLAGS ; \
CXXFLAGS=”${CXXFLAGS:-%optflags}” ; export CXXFLAGS ; \
FFLAGS=”${FFLAGS:-%optflags}” ; export FFLAGS ; \
%{_configure} –host=%{_host} –build=%{_build} \\
–program-prefix=%{?_program_prefix} \\
–disable-dependency-tracking \\
–prefix=%{_prefix} \\
–exec-prefix=%{_exec_prefix} \\
–bindir=%{_bindir} \\
–sbindir=%{_sbindir} \\
–sysconfdir=%{_sysconfdir} \\
–datadir=%{_datadir} \\
–includedir=%{_includedir} \\
–libdir=%{_libdir} \\
–libexecdir=%{_libexecdir} \\
–localstatedir=%{_localstatedir} \\
–sharedstatedir=%{_sharedstatedir} \\
–mandir=%{_mandir} \\
–infodir=%{_infodir}

#——————————————————————————

The “make” analogue, hiding the _smp_mflags magic from specs

%make_build %{__make} %{?_smp_mflags}

#——————————————————————————

The make install analogue of %configure for modern autotools:

%make_install %{__make} install DESTDIR=%{?buildroot}

#——————————————————————————

Former make install analogue, kept for compatibility and for old/broken

packages that don’t support DESTDIR properly.

%makeinstall \
%{__make} \\
prefix=%{?buildroot:%{buildroot}}%{_prefix} \\
exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\
bindir=%{?buildroot:%{buildroot}}%{_bindir} \\
sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\
sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\
datadir=%{?buildroot:%{buildroot}}%{_datadir} \\
includedir=%{?buildroot:%{buildroot}}%{_includedir} \\
libdir=%{?buildroot:%{buildroot}}%{_libdir} \\
libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\
localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\
sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\
mandir=%{?buildroot:%{buildroot}}%{_mandir} \\
infodir=%{?buildroot:%{buildroot}}%{_infodir} \\
install

#——————————————————————————

The GNUconfigure macro does the following:

update config.guess and config.sub.

regenerate all autoconf/automake files

optionally change to a directory (make the directory if requested).

run configure with correct prefix, platform, and CFLAGS.

optionally restore current directory.

#

Based on autogen.sh from GNOME and original GNUconfigure

#
%GNUconfigure(MCs:) \
CFLAGS=”${CFLAGS:-%optflags}” ; export CFLAGS; \
LDFLAGS=”${LDFLAGS:-%{-s:-s}}” ; export LDFLAGS; \
%{-C:_mydir=”`pwd`”; %{-M: %{__mkdir} -p %{-C*};} cd %{-C*}} \
dirs=”`find ${_mydir} -name configure.in -print`”; export dirs; \
for coin in `echo ${dirs}` \
do \
dr=`dirname ${coin}`; \
if test -f ${dr}/NO-AUTO-GEN; then \

\
else \
macrodirs=sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < ${coin}; \
( cd ${dr}; \
aclocalinclude=”${ACLOCAL_FLAGS}”; \
for k in ${macrodirs}; do \
if test -d ${k}; then \
aclocalinclude=”${aclocalinclude} -I ${k}”; \
##else \
## echo “Warning: No such directory `${k}’. Ignored.” \
fi \
done \
if grep “^AM_GNU_GETTEXT” configure.in >/dev/null; then \
if grep “sed.*POTFILES” configure.in >/dev/null; then \
: do nothing — we still have an old unmodified configure.in \
else \
test -r ${dr}/aclocal.m4 || touch ${dr}/aclocal.m4; \
echo “no” | gettextize –force –copy; \
test -r ${dr}/aclocal.m4 && %{__chmod} u+w ${dr}/aclocal.m4; \
fi \
fi \
if grep “^AM_PROG_LIBTOOL” configure.in >/dev/null; then \
%{__libtoolize} –force –copy; \
fi \
aclocal ${aclocalinclude}; \
if grep “^AM_CONFIG_HEADER” configure.in >/dev/null; then \
%{__autoheader}; \
fi \
echo “Running automake –gnu ${am_opt} …”; \
%{__automake} –add-missing –gnu ${am_opt}; \
%{__autoconf}; \
); \
fi \
done \
%{-C:${_mydir}}%{!-C:.}/configure –prefix=%{_prefix} –exec-prefix=%{_exec_prefix} –bindir=%{_bindir} –sbindir=%{_sbindir} –sysconfdir=%{_sysconfdir} –datadir=%{_datadir} –includedir=%{_includedir} –libdir=%{_libdir} –libexecdir=%{_libexecdir} –localstatedir=%{_localstatedir} –sharedstatedir=%{_sharedstatedir} –mandir=%{_mandir} –infodir=%{_infodir} %* ; \
%{-C:cd ${_mydir}; unset _mydir}

%patches %{lua: for i, p in ipairs(patches) do print(p..” “) end}
%sources %{lua: for i, s in ipairs(sources) do print(s..” “) end}

#——————————————————————————

Useful perl macros (from Artur Frysiak wiget@t17.ds.pwr.wroc.pl)

#

For example, these can be used as (from ImageMagick.spec from PLD site)

# […]
# BuildPrereq: perl
# […]
# %package perl
# Summary: libraries and modules for access to ImageMagick from perl
# Group: Development/Languages/Perl
# Requires: %{name} = %{version}
# %requires_eq perl
# […]
# %install
# rm -fr $RPM_BUILD_ROOT
# install -d $RPM_BUILD_ROOT/%{perl_sitearch}
# […]
# %files perl
# %defattr(644,root,root,755)
# %{perl_sitearch}/Image
# %dir %{perl_sitearch}/auto/Image
#
%requires_eq() %(LC_ALL=”C” echo ‘%*’ | xargs -r rpm -q –qf ‘Requires: %%{name} = %%{epoch}:%%{version}\n’ | sed -e ‘s/ (none):/ /’ -e ‘s/ 0:/ /’ | grep -v “is not”)
%perl_sitearch %(eval “%{__perl} -V:installsitearch“; echo $installsitearch)
%perl_sitelib %(eval “%{__perl} -V:installsitelib“; echo $installsitelib)
%perl_vendorarch %(eval “%{__perl} -V:installvendorarch“; echo $installvendorarch)
%perl_vendorlib %(eval “%{__perl} -V:installvendorlib“; echo $installvendorlib)
%perl_archlib %(eval “%{__perl} -V:installarchlib“; echo $installarchlib)
%perl_privlib %(eval “%{__perl} -V:installprivlib“; echo $installprivlib)

#——————————————————————————

Useful python macros for determining python version and paths

#
%python_sitelib %(%{__python} -c “from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())”)
%python_sitearch %(%{__python} -c “from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))”)
%python_version %(%{__python} -c “import sys; sys.stdout.write(sys.version[:3])”)

#——————————————————————————

arch macro for all Intel i?86 compatibile processors

(Note: This macro (and it’s analogues) will probably be obsoleted when

rpm can use regular expressions against target platforms in macro

conditionals.

#
%ix86 i386 i486 i586 i686 pentium3 pentium4 athlon geode

#——————————————————————————

arch macro for all supported ARM processors

%arm armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l armv7l armv7hl armv7hnl

#——————————————————————————

arch macro for all supported Sparc processors

%sparc sparc sparcv8 sparcv9 sparcv9v sparc64 sparc64v

#——————————————————————————

arch macro for all supported Alpha processors

%alpha alpha alphaev56 alphaev6 alphaev67

#——————————————————————————

arch macro for all supported PowerPC 64 processors

%power64 ppc64 ppc64p7 ppc64le

#————————————————————————

Use in %install to generate locale specific file lists. For example,

#

%install

%find_lang %{name}

%files -f %{name}.lang

#
%find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot}

Commands + opts to use for retrieving remote files

Proxy opts can be set through –httpproxy/–httpport popt aliases,

for any special local needs use %__urlhelper_localopts in system-wide

or per-user macro configuration.

%__urlhelpercmd /usr/bin/curl
%__urlhelperopts –silent –show-error –fail –globoff –location -o
%__urlhelper_proxyopts %{?_httpproxy:–proxy %{_httpproxy}%{?_httpport::%{_httpport}}}%{!?_httpproxy:%{nil}}
%_urlhelper %{__urlhelpercmd} %{?__urlhelper_localopts} %{?__urlhelper_proxyopts} %{__urlhelperopts}

#——————————————————————————

Collection specific macros

%__plugindir %{_libdir}/rpm-plugins

%__collection_font %{__plugindir}/exec.so /usr/bin/fc-cache

%__collection_java %{__plugindir}/exec.so /usr/bin/rebuild-gcj-db

%__collection_sepolicy %{__plugindir}/sepolicy.so

%__collection_sepolicy_flags 1

Transaction plugin macros

%__transaction_systemd_inhibit %{__plugindir}/systemd_inhibit.so

#——————————————————————————

Macros for further automated spec %setup and patch application

default to plain patch

%__scm patch

meh, figure something saner

%__scm_username rpm-build
%__scm_usermail
%__scm_author %{__scm_username} %{__scm_usermail}

Plain patch (-m is unused)

%__scm_setup_patch(q) %{nil}
%__scm_apply_patch(qp:m:)\
%{__patch} %{-p:-p%{-p*}} %{-q:-s}

Mercurial (aka hg)

%__scm_setup_hg(q)\
%{__hg} init %{-q} .\
%{__hg} add %{-q} .\
%{__hg} commit %{-q} –user “%{__scm_author}” -m “%{name}-%{version} base”

%__scm_apply_hg(qp:m:)\
%{__hg} import – %{-p:-p%{-p}} %{-q} -m %{-m} –user “%{__scm_author}”

Git

%__scm_setup_git(q)\
%{__git} init %{-q}\
%{__git} config user.name “%{__scm_username}”\
%{__git} config user.email “%{__scm_usermail}”\
%{__git} add .\
%{__git} commit %{-q} -a\\
–author “%{__scm_author}” -m “%{name}-%{version} base”

%__scm_apply_git(qp:m:)\
%{__git} apply –index %{-p:-p%{-p}} -\
%{__git} commit %{-q} -m %{-m
} –author “%{__scm_author}”

Git, using “git am” (-m is unused)

%__scm_setup_git_am(q)\
%{expand:%__scm_setup_git %{-q}}

%__scm_apply_git_am(qp:m:)\
%{__git} am %{-q} %{-p:-p%{-p*}}

Quilt

%__scm_setup_quilt(q) %{nil}
%__scm_apply_quilt(qp:m:)\
%{__quilt} import %{-p:-p%{-p*}} %{1} && %{__quilt} push

Bzr

%__scm_setup_bzr(q)\
%{__bzr} init %{-q}\
%{__bzr} whoami –branch “%{__scm_author}”\
%{__bzr} add .\
%{__bzr} commit %{-q} -m “%{name}-%{version} base”

bzr doesn’t seem to have its own command to apply patches?

%__scm_apply_bzr(qp:m:)\
%{__patch} %{-p:-p%{-p}} %{-q:-s}\
%{__bzr} commit %{-q} -m %{-m
}

Single patch application

%apply_patch(qp:m:)\
%{uncompress:%{1}} | %{expand:%__scm_apply_%{__scm} %{-q} %{-p:-p%{-p}} %{-m:-m%{-m}}}

Automatically apply all patches

%autopatch(vp:)\
%{lua:\
local options = rpm.expand(“%{!-v:-q} %{-p:-p%{-p*}} “)\
for i, p in ipairs(patches) do\
print(rpm.expand(“%apply_patch -m %{basename:”..p..”} “..options..p..”\n”))\
end}

One macro to (optionally) do it all.

-S Sets the used patch application style, eg ‘-S git’ enables

usage of git repository and per-patch commits.

-N Disable automatic patch application

-p Use -p for patch application

%autosetup(a:b:cDn:TvNS:p:)\
%setup %{-a} %{-b} %{-c} %{-D} %{-n} %{-T} %{!-v:-q}\
%{-S:%global __scm %{-S}}\
%{-S:%{expand:%__scm_setup_%{-S
} %{!-v:-q}}}\
%{!-N:%autopatch %{-v} %{-p:-p%{-p*}}}

\endverbatim

#*/

Posted in DEVOPS | rpm 宏定义文档已关闭评论

How to let go of being a “good” person — and become a better person

So a friend of mine was riding in a taxi to the airport the other day, and on the way, she was chatting with the taxi driver, and he said to her, with total sincerity, “I can tell you are a really good person.” And when she told me this story later, she said she couldn’t believe how good it made her feel, that it meant a lot to her. Now that may seem like a strong reaction from my friend to the words of a total stranger, but she’s not alone.

I’m a social scientist. I study the psychology of good people, and research in my field says many of us care deeply about feeling like a good person and being seen as a good person. Now, your definition of “good person” and your definition of “good person” and maybe the taxi driver’s definition of “good person” — we may not all have the same definition, but within whatever our definition is, that moral identity is important to many of us.

Now, if somebody challenges it, like they question us for a joke we tell, or maybe we say our workforce is homogenous, or a slippery business expense, we go into red-zone defensiveness a lot of the time. I mean, sometimes we call out all the ways in which we help people from marginalized groups, or we donate to charity, or the hours we volunteer to nonprofits. We work to protect that good person identity. It’s important to many of us.

But what if I told you this? What if I told you that our attachment to being good people is getting in the way of us being better people? What if I told you that our definition of “good person” is so narrow, it’s scientifically impossible to meet? And what if I told you the path to being better people just begins with letting go of being a good person?

Now, let me tell you a little bit about the research about how the human mind works to explain. The brain relies on shortcuts to do a lot of its work. That means a lot of the time, your mental processes are taking place outside of your awareness, like in low-battery, low-power mode in the back of your mind. That’s, in fact, the premise of bounded rationality. Bounded rationality is the Nobel Prize-winning idea that the human mind has limited storage resources, limited processing power, and as a result, it relies on shortcuts to do a lot of its work. So for example, some scientists estimate that in any given moment … Better, better click, right? There we go.

(Laughter)

At any given moment, 11 million pieces of information are coming into your mind. Eleven million. And only 40 of them are being processed consciously. So 11 million, 40.

I mean, has this ever happened to you? Have you ever had a really busy day at work, and you drive home, and when you get in the door, you realize you don’t even remember the drive home, like whether you had green lights or red lights. You don’t even remember. You were on autopilot. Or have you ever opened the fridge, looked for the butter, swore there is no butter, and then realized the butter was right in front of you the whole time? These are the kinds of “whoops” moments that make us giggle, and this is what happens in a brain that can handle 11 million pieces of information coming in with only 40 being processed consciously. That’s the bounded part of bounded rationality.

This work on bounded rationality is what’s inspired work I’ve done with my collaborators Max Bazerman and Mahzarin Banaji, on what we call bounded ethicality. So it’s the same premise as bounded rationality, that we have a human mind that is bounded in some sort of way and relying on shortcuts, and that those shortcuts can sometimes lead us astray. With bounded rationality, perhaps it affects the cereal we buy in the grocery store, or the product we launch in the boardroom. With bounded ethicality, the human mind, the same human mind, is making decisions, and here, it’s about who to hire next, or what joke to tell or that slippery business decision.

So let me give you an example of bounded ethicality at work. Unconscious bias is one place where we see the effects of bounded ethicality. So unconscious bias refers to associations we have in our mind, the shortcuts your brain is using to organize information, very likely outside of your awareness, not necessarily lining up with your conscious beliefs. Researchers Nosek, Banaji and Greenwald have looked at data from millions of people, and what they’ve found is, for example, most white Americans can more quickly and easily associate white people and good things than black people and good things, and most men and women can more quickly and easily associate men and science than women and science. And these associations don’t necessarily line up with what people consciously think. They may have very egalitarian views, in fact. So sometimes, that 11 million and that 40 just don’t line up.

And here’s another example: conflicts of interest. So we tend to underestimate how much a small gift — imagine a ballpoint pen or dinner — how much that small gift can affect our decision making. We don’t realize that our mind is unconsciously lining up evidence to support the point of view of the gift-giver, no matter how hard we’re consciously trying to be objective and professional. We also see bounded ethicality — despite our attachment to being good people, we still make mistakes, and we make mistakes that sometimes hurt other people, that sometimes promote injustice, despite our best attempts, and we explain away our mistakes rather than learning from them. Like, for example, when I got an email from a female student in my class saying that a reading I had assigned, a reading I had been assigning for years, was sexist. Or when I confused two students in my class of the same race — look nothing alike — when I confused them for each other more than once, in front of everybody.

These kinds of mistakes send us, send me, into red-zone defensiveness. They leave us fighting for that good person identity. But the latest work that I’ve been doing on bounded ethicality with Mary Kern says that we’re not only prone to mistakes — that tendency towards mistakes depends on how close we are to that red zone. So most of the time, nobody’s challenging our good person identity, and so we’re not thinking too much about the ethical implications of our decisions, and our model shows that we’re then spiraling towards less and less ethical behavior most of the time.

On the other hand, somebody might challenge our identity, or, upon reflection, we may be challenging it ourselves. So the ethical implications of our decisions become really salient, and in those cases, we spiral towards more and more good person behavior, or, to be more precise, towards more and more behavior that makes us feel like a good person, which isn’t always the same, of course. The idea with bounded ethicality is that we are perhaps overestimating the importance our inner compass is playing in our ethical decisions. We perhaps are overestimating how much our self-interest is driving our decisions, and perhaps we don’t realize how much our self-view as a good person is affecting our behavior, that in fact, we’re working so hard to protect that good person identity, to keep out of that red zone, that we’re not actually giving ourselves space to learn from our mistakes and actually be better people.

It’s perhaps because we expect it to be easy. We have this definition of good person that’s either-or. Either you are a good person or you’re not. Either you have integrity or you don’t. Either you are a racist or a sexist or a homophobe or you’re not. And in this either-or definition, there’s no room to grow. And by the way, this is not what we do in most parts of our lives. Life, if you needed to learn accounting, you would take an accounting class, or if you become a parent, we pick up a book and we read about it. We talk to experts, we learn from our mistakes, we update our knowledge, we just keep getting better. But when it comes to being a good person, we think it’s something we’re just supposed to know, we’re just supposed to do, without the benefit of effort or growth.

So what I’ve been thinking about is what if we were to just forget about being good people, just let it go, and instead, set a higher standard, a higher standard of being a good-ish person? A good-ish person absolutely still makes mistakes. As a good-ish person, I’m making them all the time. But as a good-ish person, I’m trying to learn from them, own them. I expect them and I go after them. I understand there are costs to these mistakes. When it comes to issues like ethics and bias and diversity and inclusion, there are real costs to real people, and I accept that. As a good-ish person, in fact, I become better at noticing my own mistakes. I don’t wait for people to point them out. I practice finding them, and as a result … Sure, sometimes it can be embarrassing, it can be uncomfortable. We put ourselves in a vulnerable place, sometimes. But through all that vulnerability, just like in everything else we’ve tried to ever get better at, we see progress. We see growth. We allow ourselves to get better.

Why wouldn’t we give ourselves that? In every other part of our lives, we give ourselves room to grow — except in this one, where it matters most.

Thank you.

Posted in TED 演讲 | How to let go of being a “good” person — and become a better person已关闭评论

查理·芒格:分享12个顶级思维模型

查理·芒格分享了 12 种顶级思维模型:

1
1.

做决策

1、沃伦·巴菲特的双目标清单系统(Two-List System)

Mike Flint 做了巴菲特的私人飞行员十年之久,还曾为美国四任总统开过飞机,但他在事业上依然有更多追求。

有一次,他和巴菲特在探讨他的职业生涯目标时,巴菲特让他去做这么一件事。

首先,巴菲特让 Flint 写下他职业生涯最重要的 25 个目标来。于是 Flint 花了一些时间把这些目标写了下来。然后,巴菲特让他审视一下这个清单,然后圈出他认为最重要的 5 个。Flint 也照做了。

Flint 现在有了 2 个清单:一个是他认为自己职业生涯最重要的 5 个目标;另一个是另外 20 个他也觉得比较重要的目标。

巴菲特问 Flint:“你现在知道该怎么做了么?”

Flint 回答道:“知道了。我现在会马上开始着手实现这 5 个目标。至于另外 20 个,并没有那么紧急,所以可以放在闲暇的时间去做,然后慢慢把它们实现。”

巴菲特听完后说到:“不,Flint,你搞错了。那些你并没有圈出来的目标,不是你应该在闲暇时间慢慢完成的事。而是你应该尽全力避免去做的事,你应该像躲避瘟疫一样躲避它们,不去花任何的时间和注意力在它们上面。”

这让我想到了三件事:

(1)有目标是非常重要的。

当有了具体的目标,你才能反复地推演实现这个目标的方法和路径,才能在每天早上睁眼之后明白自己应该围绕什么东西优化和努力。我听过的另外的一个很好的表述方法是:将开放式的问题变成封闭式的问题。而“什么都能做”或者“所有方向都可以是方向”是最可怕的,对于个人或是企业都是如此。

(2)专注很有力量。

在一个人的认知资源有限的情况下,一段时间如果有太多目标,那么很可能哪个都无法完成。尽管“专注”和“聚焦”的概念已经被现代人提及的太多,但真正能做到准确地辨识自己的欲念,去除自己不真正需要的东西的人,还是少数的。

(3)比起“有所为”,“有所而不为”可能更关键。

这可能和芒格说的“Invert, always invert” 有相通之处。没有被选中的那 20 个目标,其实也是你感兴趣的或者有意义的,所以就很容易找到各种合理的理由去在那些目标上花时间。但它们才是默默消耗掉时间,转移你的注意力,又不能真正产出成果的事情,这种目标比看起来明显就很愚蠢的东西更加危险。

2、 10 → 10 →10 原则

我们大多数人做决策时都会存在一个问题:不考虑这个决策可能带来的长远影响。这时,你可以根据 10 → 10 → 10 原则来考虑所做的决策可能带来的长远影响。这个原则就是:

这个决策在 10 分钟后,会产生什么影响?
这个决策在 10 个月后,会产生什么影响?
这个决策在 10 年后,会产生什么影响?

在做决策时如果能践行 10 → 10 → 10 原则,这将有助于你在决策时免受感性因素的影响,迫使你考虑到这个决策可能会带来的长远影响,从而做出更加明智的决策。

3、 正确与非共识

全球殿堂级对冲基金 Bridgewater Associates 的创始人、当世名列前端的金融超级巨头 Ray Dalio 认为:每个人每天都会做很多决策,而这些决策都会产生一定的影响。从本质上说,你的生活质量取决于你做的所有这些决策的质量。要想在市场上获得成功,你必须成为一个独立思考者,因为共识通常都是错误的。你必须要有与众不同的观点和视角。要想在股市或创业中获得成功,你就不能与共识为伍,而是要做出正确的决策。要想获得指数级的增长成果,你必须要做到既不要循规蹈矩,还要做出正确的决策。这说起来容易做起来难,因为大多数时候你的决策都是错误的。然而,一旦你做出了正确的决策,那么市场给你的回报将是呈幂律分布的,即少数的正确决策将带来巨大回报。

4、「3」的法则

我从麦肯锡的一位导师那里学到了一个建议:「3」 的法则。

即当你试图说服一个比较资深的人去做某件事的时候,一定要给出 3 个原因。不是两个,也不是 4 个,要正正好好给出 3 个原因。
2

战略

5、 有竞争力的护城河

在古代,城堡通常都被护城河环绕着,护城河起到保护城堡的作用。护城河越宽,城堡就能得到越安全地保护,因为这样敌人就很难攻破城堡;如果护城河太窄,便起不到太大的保护作用,因为敌人很容易就能穿越护城河攻破城堡。

在巴菲特看来,城堡就好比公司,而护城河就好比这家公司拥有的竞争优势。他希望自己手下的经理们都能不断地加宽城堡周围的护城河。

你会发现,Facebook 在自己周围几乎构建起了图中所示的所有这些护城河:高转换成本、网络效应和有效规模等。在考虑竞争优势和策略的时候,一定要考虑你未来将构建起什么样的护城河,这一点很重要。因为它能让你的公司抵御住任何竞争者的入侵,从而获得长久性的胜利。

6、 网络效应和临界规模

网络效应是指,当一个产品的用户数越多,该产品对用户的价值就越大,这反过来又能吸引更多用户使用该产品。同时,该产品的价值跟用户数的增长成二次方关系,即著名的“梅特卡夫定律 Metcalfe’s law”:产品的价值等于用户数量的平方。

没有什么业务的规模化扩张速度能比软件业务还快,也没有什么能比网络效应能更高效地为公司业务构建起安全的护城河。网络效应已经成为了任何策略的一个筹码。通常情况下,公司用户数一旦达到临界规模,触发网络效应,公司就能通过规模经济赢得巨大的成本优势。由于网络效应显著,先发创新者可能会实现赢家通吃。这是所有创业者梦寐以求的事。

7.博弈论

经济学家 Greg Mankiw 认为:

“博弈论研究的是人们在战略情景下的行为方式。这里的‘战略’是指,对弈双方在平等的对局中各自利用对方的策略变换自己的对抗策略,从而达到取胜的目的。战略思维不仅在跳棋、象棋和棋牌上至关重要,在许多商业决策中也是至关重要的。”

用一句话简单概括博弈论:选择一种能够让你的竞争对手的最大优势最小化的策略。

3领导力

8.金字塔原理

根据金字塔原理:要将思想组织成金字塔结构。

金字塔原理中的三个核心思想是:

(1)先从答案开始。

(2)分组总结你的支撑论点。

(3)有逻辑地对你的支撑论点进行排序。

在思考沟通的时候,我都会参考金字塔原理。先把答案快速摆出来,而不是慢慢揭示答案,这样有助于更快地得出结论,让每个人都能保持一致,从而进行坦诚的交流。

9. 直接责任人(DRI)

苹果公司发明了这样一个管理概念:直接责任人(Directly Responsible Individual,简称 DRI)。DRI 遍布于公司各个层级。在苹果,谁负责什么,永远不会搞混。DRI 的名字经常出现在会议进程表上,每个人都知道谁是直接负责人。如此公开透明的责任制,使得每一个员工没有互相推诿和偷懒的机会。一旦项目出现问题,很容易找到出现问题的环节予以纠正,并追究相关责任。而且,一个项目只能有一个 DRI,如果超过一个 DRI,那就等于没有直接责任人。DRI 能够有效加速决策流程,也可以减少很多不必要的会议。

10.团队中的团队

团队中的团队,是一种将不同的团队及团队成员聚集在一起、从而形成一个无缝的组织网络的运营模式。在团队中的团队,决策权被授予每一个团队的负责人,而不是集中在一个组织最高层的领导人手里。这时,最高层领导的角色就发生了转变,从负责一个组织中的所有决策,转变为为每一个团队提供所需的信息和背景,让他们都与一个共同的目标相联系并拥有最好的信息来帮他们做决策。

11 、彻底坦诚

Kim Scott 的整个职业生涯都围绕一个目标:营造一个员工热爱、团队协作良好的工作环境和氛围。后来长期在 Google 担任团队顾问的过程中,她了解了 Google 公司领导营造一个员工能从工作中感受到快乐的方法,那种快乐的氛围是那么浓厚,甚至一眼就能看到。而在担任苹果大学资深教员的过程中,Scott 了解了苹果是不同作风,但是初衷一样:“营造一个人们能发挥自己所有潜能,并享受工作的环境。”现在作为 Twitter、Shyp、Rolltape 和 Qualtrics 的资深顾问,Scott 将自己多年的经历心得凝练成了简单的几个字:彻底坦诚。所有公司创始人都可以利用它,来帮助员工喜欢上自己的工作,并发挥出自己最大的潜能将工作做好。

12.倾听、决策、交流

当你是以管理者、CEO 或任何级别领导的身份做决策的时候,那么倾听、决策、交流的顺序就非常重要。最好按照这个顺利去做:首先倾听,然后决策,最后交流,而且不能让它们之间间隔太长时间。这是 Twitter 的前 CEO Dick Costolo 提出的一个沟通模型。关键是要始终先倾听,不要乱了顺序,而且尽量缩短每一步之间的时间差

Posted in 思考与灵感 | 查理·芒格:分享12个顶级思维模型已关闭评论

rpm 宏定义

http://cholla.mmto.org/computers/linux/rpm/dotrpmmacros.html

Custom RPM macros configuration file for building RPM packages

as a non-root user.

#

Author: Mike A. Harris

#

This is a copy of my own personal RPM configuration which I use

on my workstation for building and testing packages for Red Hat Linux.

There are many different possibilities on how to configure RPM, so

feel free to tweak however you desire. Make sure to create any

directories that are referenced prior to using. RPM will automatically

create some of them if missing, but not all of them. Which ones it

auto-creates is only known by the extraterrestrial aliens that have

created RPM.

#

For ANY help with anything related to RPM development, packaging,

or customization, please join the Red Hat RPM mailing list by sending

an email message to: rpm-list-request@redhat.com with the word

"subscribe" in the Subject: line.

#

Any suggestions/comments/ for improvements to this setup appreciated.

%_signature gpg
%_gpg_name T. E. Pickering

%_topdir defines the top directory to be used for RPM building purposes

By defaultROOT of the buildsystem

%_topdir %(echo $HOME)/rpmbuild

%_sourcedir is where the source code tarballs, patches, etc. will be

placed after you do an "rpm -ivh somepackage.1.0-1.src.rpm"

#%_sourcedir %{_topdir}/SOURCES/cpan
%_sourcedir %{_topdir}/SOURCES/%{name}-%{version}

%_specdir is where the specfile gets placed when installing a src.rpm. I

prefer the specfile to be in the same directory as the source tarballs, etc.

%_specdir %{_sourcedir}

%_tmppath is where temporary scripts are placed during the RPM build

process as well as the %_buildroot where %install normally dumps files

prior to packaging up the final binary RPM's.

%_tmppath %{_topdir}/tmp

%_builddir is where source code tarballs are decompressed, and patches then

applied when building an RPM package

%_builddir %{_topdir}/BUILD

%_buildroot is where files get placed during the %install section of spec

file processing prior to final packaging into rpms. This is oddly named

and probably should have been called "%_installroot" back when it was

initially added to RPM. Alas, it was not. ;o)

%_buildroot %{_tmppath}/%{name}-%{version}-root

%_rpmdir is where binary RPM packages are put after being built.

%_rpmdir %{_topdir}/RPMS

%_srcrpmdir is where src.rpm packages are put after being built.

%_srcrpmdir %{_topdir}/SRPMS

%_rpmfilename defines the naming convention of the produced RPM packages,

and should not be modified. It is listed here because I am overriding

RPM's default behaviour of dropping binary RPM's each in their own

separate subdirectories. I hate that. Grrr.

%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

Customized tags for local builds

%packager is the info that will appear in the "Packager:" field in the

RPM header on built packages. By default I have it read your username

and hostname. This should be customized appropriately.

%packager Joe Blow

%packager T. E. Pickering
%distribution The MMTO RPM Shack

GNU GPG config below

#%_signature gpg
#%_gpg_name Joe Blow
#%_gpg_path %(echo $HOME)/.gnupg

The following will try to create any missing directories required above

(Not implemented yet)

Posted in 系统管理 | rpm 宏定义已关闭评论

Is war between China and the US inevitable?

So, let me thank you for the opportunity to talk about the biggest international story of your professional lifetime, which is also the most important international challenge the world will face for as far as the eye can see.

首先,感谢大家给予我此次机会来分享这样一个, 在诸位职业生涯中遇到的最大的国际故事,同时也是我们目前能够预见到的最重要的国际化挑战。

00:17
The story, of course, is the rise of China. Never before have so many people risen so far so fast, on so many different dimensions. The challenge is the impact of China’s rise — the discombobulation this will cause the Unites States and the international order, of which the US has been the principal architect and guardian. The past 100 years have been what historians now call an “American Century.” Americans have become accustomed to their place at the top of every pecking order. So the very idea of another country that could be as big and strong as the US — or bigger — strikes many Americans as an assault on who they are.

我们故事毫无疑问是关于中国的崛起。在此之前,从未有过如此多的人群,在如此广泛的维度,如此快的崛起。这个挑战就是中国崛起的影响,以及中国崛起对美国和国际秩序引起的改变,而这些国际秩序,美国一直都是其监护人和掌舵者。历史学家称呼过去100年为“美利坚的世纪”,美国人已经习惯于他们在任何一个领域处于领先位置,所以,如果有另外一个国家成长为和美国一样大,一样强壮甚至比美国更大时,这种想法就会刺激或刺痛到很多美国人。

01:06
For perspective on what we’re now seeing in this rivalry, it’s useful to locate it on the larger map of history. The past 500 years have seen 16 cases in which a rising power threatened to displace a ruling power. Twelve of those ended in war. So just in November, we’ll all pause to mark the 100th anniversary of the final day of a war that became so encompassing, that it required historians to create an entirely new category: world war. So, on the 11th hour of the 11th day of the 11th month in 1918, the guns of World War I fell silent, but 20 million individuals lay dead.
对于当前的竞争,很有必要将其置于历史长河中来看待,这样的方法大有裨益。在过去的500年中,出现过16次新兴力量威胁旧的统治力量的情况,其中12次以战争结束。历史学家们对世界战争创建了一个新的活动,那就是在11月份我们都会停来下纪念某一个战争最后一天的100周年,所以,在1918年,11月第11天的第11个小时,第一次世界大战的枪声停止了,但是2000万人却死于该战争。

02:00
I know that this is a sophisticated audience, so you know about the rise of China. I’m going to focus, therefore, on the impact of China’s rise, on the US, on the international order and on the prospects for war and peace. But having taught at Harvard over many years, I’ve learned that from time to time, it’s useful to take a short pause, just to make sure we’re all on the same page. The way I do this is, I call a time-out, I give students a pop quiz — ungraded, of course. So, let’s try this. Time-out, pop quiz.
我知道我们在座有经验丰富的听众,所以,你们知道中国的崛起。因此,我将要重点讲述中国的崛起,对于美国,对于世界秩序,对于未来战争或者和平的预期影响。在哈佛大学教书多年,我知道,在开始话题之前,我得确保我们首先要能形成共识,在同一个起点。这个我方法我称之为稍息,同场以此方式来进行突击测试。虽然有点卑略,但是还是让我们开始吧,突击测试开始。

02:34
Question: forty years ago, 1978, China sets out on its march to the market. At that point, what percentage of China’s one billion citizens were struggling to survive on less than two dollars a day? Take a guess — 25 percent? Fifty? Seventy-five? Ninety. What do you think? Ninety. Nine out of every 10 on less than two dollars a day. Twenty eighteen, 40 years later. What about the numbers? What’s your bet? Take a look. Fewer than one in 100 today. And China’s president has promised that within the next three years, those last tens of millions will have been raised up above that threshold. So it’s a miracle, actually, in our lifetime. Hard to believe. But brute facts are even harder to ignore. A nation that didn’t even appear on any of the international league tables 25 years ago has soared, to rival — and in some areas, surpass — the United States.

问题是:四十年前的1978年,中国开始进入市场经济,在那个时候,大家可以猜下,中国的十亿人口中有多少百分比的人处于每天不到2美元收入的水位,为生存挣扎着? 可以猜下,25%?50%?75%?90%,你会想到什么,是的,百分之九十,十个人中有九个人的日收入不超过2美元。但是到了2018年,40年后,这个数字是什么样昵?您的赌注是什么?大家可以看到,到今天,这个数字是不到1%。并且中国的主席承诺,在未来的3年,这些剩余的贫困人口将能够生活并且度过瓶颈。所以,事实上这在我们的人生中见闻中可以说一个奇迹。很难相信,但是越残忍的事实,越难被忽略。一个在25年前还未坐上国际联盟谈判桌的民族已经开始快速上升,开始与美国竞争,甚至在某些方面已经超越了美国。

03:54
Thus, the challenge that will shape our world: a seemingly unstoppable rising China accelerating towards an apparently immovable ruling US, on course for what could be the grandest collision in history. To help us get our minds around this challenge, I’m going to introduce you to a great thinker, I’m going to present a big idea, and I’m going to pose a most consequential question. The great thinker is Thucydides. Now, I know his name is a mouthful, and some people have trouble pronouncing it. So, let’s do it, one, two, three, together: Thucydides. One more time: Thucydides.

因此,这个挑战将会塑造我们的世界:一个表面上停不下来崛起的中国,加速的靠近一个很明显不可动摇的美国,这个挑战将可能引起世界上最庄重的冲突。为了让大家能够理解这个挑战,我将会给大家介绍一个伟大的思想家,我将要表达一个伟大的想法,同时我也将间接推出一些相应的问题。这个伟大的思想家是 Thucydides,现在我知道他的名字不好念,而且有些人有拼读问题,所以让我们一起来,一二三,一起来: Thucydides,再来一次 Thucydides

04:39
So who was Thucydides? He was the father and founder of history. He wrote the first-ever history book. It’s titled “The History of the Peloponnesian War,” about the war in Greece, 2500 years ago. So if nothing else today, you can tweet your friends, “I met a great thinker. And I can even pronounce his name: Thucydides.” So, about this war that destroyed classical Greece, Thucydides wrote famously: “It was the rise of Athens and the fear that this instilled in Sparta that made the war inevitable.” So the rise of one and the reaction of the other create a toxic cocktail of pride, arrogance, paranoia, that drug them both to war.
谁是 Thycydides 呢? 他是历史学之父和创立者。他编写了第一本历史书,书名是《伯罗奔尼撒战争史》,是一本关于2500年前希腊战争的书籍。所以,如果你今天没什么事情,可以发推特给你的朋友告诉他:我遇到一个伟大的思想家,并且我可以读出来他的名字:Thucydides. 书中提到的这次战争摧毁了古希腊,正如其中的知名章节说到的:雅典的崛起和斯巴达带来的源源不断的威胁让这场战争不可避免。所以,正是一个国家的崛起和另外一个国家对此的反应,一起调制了这杯有毒的自大,骄傲而又带有妄想的毒鸡尾酒,从而把两个国家都带向了战争。

05:38
Which brings me to the big idea: Thucydides’s Trap. “Thucydides’s Trap” is a term I coined several years ago, to make vivid Thucydides’s insight. Thucydides’s Trap is the dangerous dynamic that occurs when a rising power threatens to displace a ruling power, like Athens — or Germany 100 years ago, or China today — and their impact on Sparta, or Great Britain 100 years ago, or the US today. As Henry Kissinger has said, once you get this idea, this concept of Thucydides’s Trap in your head, it will provide a lens for helping you look through the news and noise of the day to understand what’s actually going on.
是什么让我有了这个伟大的主意呢:是 Thucydides 的陷阱-这个名词是我几年前为了清晰表达 Thucydides 的观点而发明的。确切来说: Thucydides 陷阱是一种危险态势,这种态势发生在一个新兴势力将要替换一个统治势力时,比如雅典或者100年前的德国,或者今天的中国。这些新兴力量影响了斯巴达,100年前的大英帝国或者今天的美国。正如亨利·基辛格所述:一旦你在头脑中有了 Thucydides陷阱这个概念,它将会给你提供一个望远镜,让你透过今日的新闻和声音来洞察和理解什么将要发生。

06:28
So, to the most consequential question about our world today: Are we going to follow in the footsteps of history? Or can we, through a combination of imagination and common sense and courage find a way to manage this rivalry without a war nobody wants, and everybody knows would be catastrophic ? Give me five minutes to unpack this, and later this afternoon, when the next news story pops up for you about China doing this, or the US reacting like that, you will be able to have a better understanding of what’s going on and even to explain it to your friends.

所以,回到世界上今天最可能发生的问题上来:我们将会重蹈历史的覆辙吗?或者,我们可以通过想象力,共同认知和勇气来管理好这个无人期待,所有人都明白会很惨痛的战争吗?请给我5分钟来阐述这点。然后在今天下午,当关于中国做了什么,美国如何反应的新的新闻报告出来时,你将会对于未来将要发生什么有一个更好地理解,甚至解释给你的朋友听。

07:15
So as we saw with this flipping the pyramid of poverty, China has actually soared. It’s meteoric. Former Czech president, Vaclav Havel, I think, put it best. He said, “All this has happened so fast, we haven’t yet had time to be astonished.”
所以,正如我们看到的那个贫困金字塔所示,中国实际上已经崛起了。中国的崛起是如此之快,正如前杰克主席 Vaclav Havel 所说的(我想这是最好的表述):所有一切发生的如此之快,以至于我们甚至没有时间去感到震惊。

07:32
(Laughter)

07:34
To remind myself how astonished I should be, I occasionally look out the window in my office in Cambridge at this bridge, which goes across the Charles River, between the Kennedy School and Harvard Business School. In 2012, the State of Massachusetts said they were going to renovate this bridge, and it would take two years. In 2014, they said it wasn’t finished. In 2015, they said it would take one more year. In 2016, they said it’s not finished, we’re not going to tell you when it’s going to be finished. Finally, last year, it was finished — three times over budget.
为了提醒我自己我应该表示如何的震惊,我时不时的从我剑桥的办公室透过窗户向外观看这座桥,它跨国查尔斯河,在肯尼迪学院和哈佛商学院之间。在2012年马萨诸塞州政府说他们他将要用两年时间来维修这座桥,在2014年他们说该工程还未结束,在2015年他们说该工程还需要1年时间,在 2016年他们说还未结束,并且也不会告知什么时候会结束。终于在去年,这个工程结束了,耗费了3倍多的预算。

08:10
Now, compare this to a similar bridge that I drove across last month in Beijing. It’s called the Sanyuan Bridge. In 2015, the Chinese decided they wanted to renovate that bridge. It actually has twice as many lanes of traffic. How long did it take for them to complete the project? Twenty fifteen, what do you bet? Take a guess — OK, three — Take a look.
然后,让我们来对比一个相似的桥,这个桥在中国,我上个月刚刚开车经过,他的名字叫 三元桥,在 2015年,中国政府决定重修三元桥,车道翻倍。他们花了多久完成这个工程?201年,大家猜测一下,看一下答案。

08:40
(Laughter)

08:48
The answer is 43 hours.
答案是 43 个小时。

08:50
(Audience: Wow!)
听众: 哇哦

08:56
(Laughter)

09:04
Graham Allison: Now, of course, that couldn’t happen in New York.
毫无疑问,这在纽约不可能发生。

09:07
(Laughter)

09:09
Behind this speed in execution is a purpose-driven leader and a government that works. The most ambitious and most competent leader on the international stage today is Chinese President Xi Jinping. And he’s made no secret about what he wants. As he said when he became president six years ago, his goal is to make China great again —
在这个速度之后,是目标驱动型的领导和政府在起作用。在当今国际化舞台上,中国主席习-近-平是最具有上进心和才干的领导。而且他并没有保密任何他想要做的事情,在6年前他就任中国主席之时,就设定了目标 – 让中国再次伟大复兴。

09:34
(Laughter)

09:36
a banner he raised long before Donald Trump picked up a version of this. To that end, Xi Jinping has announced specific targets for specific dates: 2025, 2035, 2049.
特朗普同样树立了一个类似的梦想,在习近平之后很久。朝着这个梦想,习近平声明了三个时间点的三个阶段目标: 2025 年, 2035 年和 2049年。

09:54
By 2025, China means to be the dominant power in the major market in 10 leading technologies, including driverless cars, robots, artificial intelligence, quantum computing. By 2035, China means to be the innovation leader across all the advanced technologies. And by 2049, which is the 100th anniversary of the founding of the People’s Republic, China means to be unambiguously number one, including, [says] Xi Jinping, an army that he calls “Fight and Win.” So these are audacious goals, but as you can see, China is already well on its way to these objectives. And we should remember how fast our world is changing. Thirty years ago, the World Wide Web had not yet even been invented. Who will feel the impact of this rise of China most directly? Obviously, the current number one. As China gets bigger and stronger and richer, technologically more advanced, it will inevitably bump up against American positions and prerogatives.

在 2025年前,中国目标是在10个领先技术方面处于主导力量,包括:无人驾驶,机器人,人工智能和量子计算。到 2035年前,中国目标是在高科技领域,处于改革领袖位置。然后在 2049年前,也就是中国建国100周年之时,中国要毫无争议的成为世界第一,习近平所说,一个敢打且必胜的军队。这是一些无畏或者鲁莽的目标,但是正如我们所看到的,中国已经很好的处在迈向这些目标的路上了。我们应该铭记这世界变化的是如何之快。三十年前,互联网还未被发明。谁最新直接的感受到中国的崛起带来的影响?很显然,就是当前的第一名。当中国变的越来越大,越来越强大,越来越富有,技术上更加领先时,毫无以为会影响到美国的位置和特权。

11:11
Now, for red-blooded Americans — and especially for red-necked Americans like me; I’m from North Carolina — there’s something wrong with this picture. The USA means number one, that’s who we are. But again, to repeat: brute facts are hard to ignore. Four years ago, Senator John McCain asked me to testify about this to his Senate Armed Services Committee. And I made for them a chart that you can see, that said, compare the US and China to kids on opposite ends of a seesaw on a playground, each represented by the size of their economy. As late as 2004, China was just half our size. By 2014, its GDP was equal to ours. And on the current trajectory, by 2024, it will be half again larger. The consequences of this tectonic change will be felt everywhere.

对于精力充沛的美国人,特别是像我这样红脖子的美国人来说,我来自北卡罗莱那州 – 这幅图片中有些错误。对于美国人来说,美国意味着第一名,这就是我们。但是,再一次我要重述:残酷的实事往往不可忽略。 四年前,约翰·麦肯恩议员邀请我把这些内容证明给他的参议院军事委会人员看,我给他们作了一幅你们现在看到的图片,图片告诉我们:美国和中国就像坐在跷跷板两端的孩童,每一方代表了各自的经济体量。早在2004年,中国的经济体只是我们的一半,到了2014年,经济体量等同于美国,按照现在的轨迹,到2014年他会增大一半,这种改变带来的影响在任何地方都将能感受到。

12:15
For example, in the current trade conflict, China is already the number one trading partner of all the major Asian countries. Which brings us back to our Greek historian. Harvard’s “Thucydides’s Trap Case File” has reviewed the last 500 years of history and found 16 cases in which a rising power threatened to displace a ruling power. Twelve of these ended in war. And the tragedy of this is that in very few of these did either of the protagonists want a war; few of these wars were initiated by either the rising power or the ruling power.
例如,在当前的贸易摩擦中,中国已然成为了亚洲国家贸易合作伙伴的第一位。这个事实把我们带回到了希腊的历史中。哈佛大学的“修昔底德陷阱案件档案”浏览了过去500年中的16个关于崛起力量威胁统治力量的案例,其中12个以战争结束。悲剧的是,很少有双方愿意以一场战争来收场,其中很少的一部分战争是由崛起方或者统治方发起的。

12:59
So how does this work? What happens is, a third party’s provocation forces one or the other to react, and that sets in motion a spiral, which drags the two somewhere they don’t want to go. If that seems crazy, it is. But it’s life. Remember World War I. The provocation in that case was the assassination of a second-level figure, Archduke Franz Ferdinand, which then led the Austro-Hungarian emperor to issue an ultimatum to Serbia, they dragged in the various allies, within two months, all of Europe was at war.
所以,这些战争怎么发生的呢?发生的事情是:第三方挑拨势力激起了其中的一方开始做出响应。这个挑拨转动了战争的陀螺,从而把双发拉入了都不愿介入的境地,看起来很疯狂是吧,是的,这就是生活。记得一战吧。导火索是二号人物费迪南的遇刺事件,该事件引起了奥匈帝国国王队塞尔维亚发起的最后通牒,他们拉入了同盟国,在两个月内,整个欧洲陷入了战争中。

13:42
So imagine if Thucydides were watching planet Earth today. What would he say? Could he find a more appropriate leading man for the ruling power than Donald J Trump?
所以,想象下,如果修昔底德斯今天正注视着地球,他会说什么?他会寻找比特朗普更合适的统治力量一方的领导人吗?

13:55
(Laughter)
大笑

13:56
Or a more apt lead for the rising power than Xi Jinping? And he would scratch his head and certainly say he couldn’t think of more colorful provocateur than North Korea’s Kim Jong-un. Each seems determined to play his assigned part and is right on script.
或者说一个比习近平更合适的崛起一方领导人吗?修昔底德斯会闹着头皮确切的说他找不到比北朝鲜领导人金正恩更合适和绚丽多彩的挑衅者了。每个人似乎都下定决心要扮演好自己的角色,剧本也写的很好。

14:21
So finally, we conclude again with the most consequential question, the question that will have the gravest consequences for the rest of our lives: Are Americans and Chinese going to let the forces of history drive us to a war that would be catastrophic for both? Or can we summon the imagination and courage to find a way to survive together, to share the leadership in the 21st century, or, as Xi Jinping [said], to create a new form of great power relations?
所以,让我们再次以最重要的问题来总结,这个问题将会对我们的余生形成最大的影响:美国和中国将会让历史的力量把我们驱向对双方都惨痛而残忍的战争吗?或者说我们是否能够召唤我们的想象力和勇气,寻找一条生存之路,来分享21实际的领导权,正如习主席所说的:创造一种新形式的大国关系。

14:56
That’s the issue I’ve been pursuing passionately for the last two years. I’ve had the opportunity to talk and, indeed, to listen to leaders of all the relevant governments — Beijing, Washington, Seoul, Tokyo — and to thought leaders across the spectrum of both the arts and business. I wish I had more to report. The good news is that leaders are increasingly aware of this Thucydidean dynamic and the dangers that it poses. The bad news is that nobody has a feasible plan for escaping history as usual.
这正是我过去两年在热情探寻的问题。我有机会去对话和聆听两个政府的领袖-北京,华盛顿,首尔和东京。- 以及艺术和商业领域的精神领袖。我期望我可以做更多的报告。好消息是,领袖们正在加速意识到修昔底德斯动态以及它带来的危险。坏消息是,像往常一样没有任何一方有一个可行的可以逃脱历史规律的方案。

15:31
So it’s clear to me that we need some ideas outside the box of conventional state graph — indeed, from another page or another space — which is what brings me to TED today and which brings me to a request. This audience includes many of the most creative minds on the planet, who get up in the morning and think not only about how to manage the world we have, but how to create worlds that should be. So I’m hopeful that as this sinks in and as you reflect on it, some of you are going to have some bold ideas, actually some wild ideas, that when we find, will make a difference in this space. And just to remind you if you do, this won’t be the first time.

所以,很清晰的是,我们需要有些脱离传统状态图的类似他山之石的新的想法,这些想法真正发自于从另一方向或者另外一个空间。正是这个问题把我带到TED来,并让我提出关于该问题的这个请求。在坐的当中有这个星球上最具创造力想法的人,你们早晨起床后不仅思考如何管理我们所拥有的世界,并且在考虑如何把世界创造成它应有的样子。所以我满怀希望,随着问题深入,随着你们的思考,你们当中有人会产生一些大胆的想法,甚至一些疯狂的想法,当我们找到时,这些想法会对当前的生存空间起到作用。所以提醒大家,如果你这样做,这将不会是第一次。
16:20
Let me remind you of what happened right after World War II. A remarkable group of Americans and Europeans and others, not just from government, but from the world of culture and business, engaged in a collective surge of imagination. And what they imagined and what they created was a new international order, the order that’s allowed you and me to live our lives, all of our lives, without great power war and with more prosperity than was ever seen before on the planet. So, a remarkable story. Interestingly, every pillar of this project that produced these results, when first proposed, was rejected by the foreign policy establishment as naive or unrealistic.

让我来提醒大家二战结束后发生了什么,一批优秀卓越的美国人,欧洲人和其他地方的人。不止来自政界,还来自文化和商界,投入到了大风大浪的构思中去了。他们所构思和所创造的是一个新的社会秩序。这个秩序允许你和我,允许我们大家都能够生存,并且在这个星球上比以往任何时候都没有大国战争,并且更繁荣。所以这是一个卓越而有趣的故事。这个工程中的每一个支柱都能够产生结果,而在一开始被建议时,经常被外景政策制定公司认为是太幼稚或者不现实。

17:09
My favorite is the Marshall Plan. After World War II, Americans felt exhausted. They had demobilized 10 million troops, they were focused on an urgent domestic agenda. But as people began to appreciate how devastated Europe was and how aggressive Soviet communism was, Americans eventually decided to tax themselves a percent and a half of GDP every year for four years and send that money to Europe to help reconstruct these countries, including Germany and Italy, whose troops had just been killing Americans. Amazing. This also created the United Nations. Amazing. The Universal Declaration of Human Rights. The World Bank. NATO. All of these elements of an order for peace and prosperity. So, in a word, what we need to do is do it again. And I think now we need a surge of imagination, creativity, informed by history, for, as the philosopher Santayana reminded us, in the end, only those who refuse to study history are condemned to repeat it.

我的爱好是马歇尔计划,在二战后,美国人感觉到精力耗尽。他们解散了 1000万的军队。他们聚焦于紧急的国内计划上,在人们开始感叹欧洲是如何破败而苏维埃共产主义是如何进取的时候,美国人最终决定给自己加收一个点的税,并且连续四年拿出每年一半的GDP,来把这些钱送到欧洲帮助他们重建家园。包括德国和意大利,而这些国家的士兵,在刚结束的战争中曾杀死美国人。令人惊讶,这点也创造了美利坚合众国。震惊,普世的人权宣言,世界银行,北大西洋公约组织。所有这些都是为了建立一个和平而繁荣的秩序。所以,简而言之,我们要做的就是再一次做这些事情。所以,我想我们现在需要想象力,创造力,参考历史,正如哲学家萨塔亚娜提醒我们的,最终那些拒绝从历史中学习的人主要定重蹈历史的覆辙。

18:25
Thank you.

谢谢。

Posted in TED 演讲 | 1 Comment