This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Modified version of http://www.cmcrossroads.com/article/self-documenting-makefiles | |
all: | |
@printf -- "$(HELPTGT)\n$(ETCTGT)\n" | column -t -s : | |
HELPTGT := --- Primary Targets --- | |
helptgt = $1$(eval $(if $(filter-out $(.DEFAULT_GOAL),$(MAKECMDGOALS)),,HELPTGT+=\n$(subst %,<name>,$1): - $2)) | |
ETCTGT := --- Extra Targets --- | |
etctgt = $1$(eval $(if $(filter-out $(.DEFAULT_GOAL),$(MAKECMDGOALS)),,ETCTGT+=\n$1: - $2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Attempting to kickstart CentOS 6 works correctly. Attempting to include post-DVD updates during kickstart causes lots of scriptlet failures. Can someone tell me why this happens? | |
Specifically, I know why the failures happen (look at the order of package installation between the two outputs). I also know why rpm doesn't get the transaction order right (the scriplets are missing appropriate requires entries). What I don't understand is why pulling in update packages triggers this issue or why a regular install seems to always work. | |
I believe there are couple of bugs involved here: | |
- the sudo package does not contain a Requires(post): /bin/chmod | |
- the anaconda transaction order solver doesn't take scriplet requires ordering considerations into account beyond one dependency level (so the Requires(pre): /usr/sbin/useradd requirement is fulfilled by the time openssh is installed but anaconda doesn't extend that to ensuring that regular Requires: entries for shadow-utils are ordered correctly) | |
- that for some r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git --version | |
git version 1.8.2.1 | |
$ git lol | |
* f09682e (HEAD, tag: second-tag, master) add c | |
* 86db014 add b | |
* b8c7c3e (tag: initial-tag) initial | |
$ git describe 86db014 | |
initial-tag-1-g86db014 | |
$ git describe --abbrev=0 86db014 | |
initial-tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LUA_VERSION := $(or $(LUA_VERSION), $(shell \ | |
(pkg-config --exists lua5.2 && echo 5.2) \ | |
|| (pkg-config --exists lua5.1 && echo 5.1) \ | |
|| (pkg-config --exists lua && echo 5.0))) | |
LUA_VERSION2 := $(or $(LUA_VERSION2), $(shell \ | |
for ver in 5.2 5.1 ""; do\ | |
pkg-config --exists lua$$ver && echo "lua$$ver" && exit;\ | |
done)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find highest known lua version. | |
# | |
# It uses pkg-config to do this, but will fail if you have liblua, but | |
# not the corresponding interpreter/compiler. Let's say you have liblua5.2 | |
# but want to build with liblua5.1 (for which you have the lib, interpreter | |
# and compiler), you can override by setting LUA_SUFFIX=5.1 when invoking | |
# make. | |
# | |
# If successful, sets the following variables: | |
# * LUA_SUFFIX (unless already set) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Construct LUA_{,C}PATH strings from input modules. | |
# $1 - list of modules | |
# $2 - suffix of valid module names | |
luapath = $(subst $e ,;,$(filter $(addprefix %.,$2),$(join $(foreach m,$1,$(dir $m)),$(foreach m,$1,?$(suffix $m))))) | |
# Create -l arguments from the input modules. | |
# $1 - list of modules | |
luamodules = $(addprefix -l,$(filter-out ?,$(basename $(notdir $1)))) | |
# Create a dummy loaded package for the given names. | |
# 'lua_dummymod_$modname' variables will be included as the contents of the | |
# dummy tables created. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> help .\test.ps1 | |
test.ps1 [-FirstParam] <Object> [-SecondParam] <Object> [<CommonParameters>] | |
PS> .\test.ps1 -fi<tab> | |
# Nothing happens at all. | |
PS> .\test.ps1 | |
.\test.ps1 : The script 'test.ps1' cannot be run because the following snap-ins that are specified by the "#requires" | |
statements of the script are missing: VMware.VimAutomation.Core. | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN { | |
RS="\n?~\n" | |
FS="\n" | |
} | |
# Special case the diff header/chunk header lines. | |
/^diff --git/ { | |
next | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SR_PREFIX ?= SR | |
# Manual automake silent rule stuff | |
$(SR_PREFIX)_DEFAULT_VERBOSITY = 0 | |
$(SR_PREFIX)_SILENT_VERBOSITY = -1 | |
V ?= $($(SR_PREFIX)_DEFAULT_VERBOSITY) | |
SILENT := $(and $(filter $($(SR_PREFIX)_SILENT_VERBOSITY),$(V)),silent) | |
DEFAULT := $(and $(filter $($(SR_PREFIX)_DEFAULT_VERBOSITY),$(V)),default) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, os, rpm | |
def readRpmHeader(ts, filename): | |
""" Read an rpm header. """ | |
fd = os.open(filename, os.O_RDONLY) | |
h = None | |
try: | |
h = ts.hdrFromFdno(fd) | |
finally: | |
os.close(fd) |
OlderNewer