View | Details | Raw Unified | Return to bug 20013
Collapse All | Expand All

(-)a/hasher/hsh (-1 / +6 lines)
Lines 73-78 Options: Link Here
73
                                    overriding --repo option for binary packages;
73
                                    overriding --repo option for binary packages;
74
  --repo-src=DIR                    source packages destination directory,
74
  --repo-src=DIR                    source packages destination directory,
75
                                    overriding --repo option for source packages;
75
                                    overriding --repo option for source packages;
76
  --component=NAME                  repository component;
76
  --save-fakeroot                   save fakeroot state;
77
  --save-fakeroot                   save fakeroot state;
77
  --target=ARCH                     target architecture;
78
  --target=ARCH                     target architecture;
78
  --wait-lock                       wait for workdir and hasher-priv locks;
79
  --wait-lock                       wait for workdir and hasher-priv locks;
Lines 91-97 EOF Link Here
91
	exit
92
	exit
92
}
93
}
93
94
94
TEMP=`getopt -n $PROG -o $getopt_common_opts -l apt-config:,apt-prefix:,build-args:,cache-dir:,cleanup-only,contents-index-all:,contents-index-bin:,eager-cleanup,excludedocs,hasher-priv-dir:,initroot-only,install-langs:,lazy-cleanup,mountpoints:,no-cache,no-contents-indices,no-repackage-source,no-sisyphus-check::,no-sisyphus-check-in::,no-sisyphus-check-out::,no-stuff,nprocs:,number:,packager:,pkg-build-list:,pkg-init-list:,query-repackage,query-req-prog:,rebuild-prog:,repackage-source,repo:,repo-bin:,repo-src:,save-fakeroot,target:,wait-lock,no-wait-lock,without-stuff,with-stuff,with-qemu:,$getopt_common_longopts -- "$@"` ||
95
TEMP=`getopt -n $PROG -o $getopt_common_opts -l apt-config:,apt-prefix:,build-args:,cache-dir:,cleanup-only,contents-index-all:,contents-index-bin:,eager-cleanup,excludedocs,hasher-priv-dir:,initroot-only,install-langs:,lazy-cleanup,mountpoints:,no-cache,no-contents-indices,no-repackage-source,no-sisyphus-check::,no-sisyphus-check-in::,no-sisyphus-check-out::,no-stuff,nprocs:,number:,packager:,pkg-build-list:,pkg-init-list:,query-repackage,query-req-prog:,rebuild-prog:,repackage-source,component:,repo:,repo-bin:,repo-src:,save-fakeroot,target:,wait-lock,no-wait-lock,without-stuff,with-stuff,with-qemu:,$getopt_common_longopts -- "$@"` ||
95
	show_usage
96
	show_usage
96
eval set -- "$TEMP"
97
eval set -- "$TEMP"
97
98
Lines 174-179 while :; do Link Here
174
			prog_rebuild="$(opt_check_read "$1" "$2")"
175
			prog_rebuild="$(opt_check_read "$1" "$2")"
175
			shift
176
			shift
176
			;;
177
			;;
178
		--component) shift; component="$1"
179
			;;
177
		--repo) shift; repo="$1"
180
		--repo) shift; repo="$1"
178
			;;
181
			;;
179
		--repo-bin) shift; repo_bin="$1"
182
		--repo-bin) shift; repo_bin="$1"
Lines 309-314 handle_package() Link Here
309
	rm -rf aptbox
312
	rm -rf aptbox
310
	mkaptbox --no-lock "$workdir" \
313
	mkaptbox --no-lock "$workdir" \
311
		${target:+--target="$target"} \
314
		${target:+--target="$target"} \
315
        ${component:+--component="$component"} \
312
		${repo:+--repo="$repo"} \
316
		${repo:+--repo="$repo"} \
313
		${repo_bin:+--repo-bin="$repo_bin"} \
317
		${repo_bin:+--repo-bin="$repo_bin"} \
314
		${repo_src:+--repo-src="$repo_src"} \
318
		${repo_src:+--repo-src="$repo_src"} \
Lines 360-365 handle_package() Link Here
360
	[ -n "$f" ] || return 0
364
	[ -n "$f" ] || return 0
361
	hsh-rebuild --no-lock "$workdir" \
365
	hsh-rebuild --no-lock "$workdir" \
362
		${target:+--target="$target"} \
366
		${target:+--target="$target"} \
367
        ${component:+--component="$component"} \
363
		${repo:+--repo="$repo"} \
368
		${repo:+--repo="$repo"} \
364
		${repo_bin:+--repo-bin="$repo_bin"} \
369
		${repo_bin:+--repo-bin="$repo_bin"} \
365
		${repo_src:+--repo-src="$repo_src"} \
370
		${repo_src:+--repo-src="$repo_src"} \
(-)a/hasher/hsh-rebuild (-3 / +6 lines)
Lines 50-55 Options: Link Here
50
                                    overriding --repo option for binary packages;
50
                                    overriding --repo option for binary packages;
51
  --repo-src=DIR                    source packages destination directory,
51
  --repo-src=DIR                    source packages destination directory,
52
                                    overriding --repo option for source packages;
52
                                    overriding --repo option for source packages;
53
  --component=NAME                  repository component;
53
  --source-only                     do not build, stop after installing source package;
54
  --source-only                     do not build, stop after installing source package;
54
  --target=ARCH                     target architecture;
55
  --target=ARCH                     target architecture;
55
  --wait-lock                       wait for workdir and hasher-priv locks;
56
  --wait-lock                       wait for workdir and hasher-priv locks;
Lines 67-73 EOF Link Here
67
	exit
68
	exit
68
}
69
}
69
70
70
TEMP=`getopt -n $PROG -o $getopt_common_opts -l args:,excludedocs,hasher-priv-dir:,install-only,mountpoints:,nodeps,no-lock,no-sisyphus-check::,no-sisyphus-check-in::,no-sisyphus-check-out::,no-stuff,number:,query-repackage,query-req-prog:,rebuild-prog:,repo:,repo-bin:,repo-src:,save-fakeroot,source-only,target:,wait-lock,no-wait-lock,without-stuff,with-stuff,$getopt_common_longopts -- "$@"` ||
71
TEMP=`getopt -n $PROG -o $getopt_common_opts -l args:,excludedocs,hasher-priv-dir:,install-only,mountpoints:,nodeps,no-lock,no-sisyphus-check::,no-sisyphus-check-in::,no-sisyphus-check-out::,no-stuff,number:,query-repackage,query-req-prog:,rebuild-prog:,component:,repo:,repo-bin:,repo-src:,save-fakeroot,source-only,target:,wait-lock,no-wait-lock,without-stuff,with-stuff,$getopt_common_longopts -- "$@"` ||
71
	show_usage
72
	show_usage
72
eval set -- "$TEMP"
73
eval set -- "$TEMP"
73
74
Lines 115-120 while :; do Link Here
115
			prog_rebuild="$(opt_check_read "$1" "$2")"
116
			prog_rebuild="$(opt_check_read "$1" "$2")"
116
			shift
117
			shift
117
			;;
118
			;;
119
		--component) shift; component="$1"
120
			;;
118
		--repo) shift; repo="$1"
121
		--repo) shift; repo="$1"
119
			;;
122
			;;
120
		--repo-bin) shift; repo_bin="$1"
123
		--repo-bin) shift; repo_bin="$1"
Lines 252-259 case `find chroot/.out/ -mindepth 1 -maxdepth 1 -type f -name \*.src.rpm |LC_ALL Link Here
252
esac
255
esac
253
256
254
make_repo
257
make_repo
255
repo_bin="${repo_bin:-${repo:-$def_repo}/"${target:-$def_target}"/RPMS.hasher/}"
258
repo_bin="${repo_bin:-${repo:-$def_repo}/"${target:-$def_target}"/RPMS.${component:-$def_component}/}"
256
repo_src="${repo_src:-${repo:-$def_repo}/SRPMS.hasher/}"
259
repo_src="${repo_src:-${repo:-$def_repo}/SRPMS.${component:-$def_component}/}"
257
260
258
find chroot/$subdir/ -mindepth 1 -maxdepth 1 -type f -name \*.src.rpm -print0 |
261
find chroot/$subdir/ -mindepth 1 -maxdepth 1 -type f -name \*.src.rpm -print0 |
259
	xargs -r0 mv -f $verbose --target-directory="$repo_src" -- >&2
262
	xargs -r0 mv -f $verbose --target-directory="$repo_src" -- >&2
(-)a/hasher/hsh-sh-functions.in (-2 / +7 lines)
Lines 161-166 Helpify query_repackage Link Here
161
noinstall_pattern_list='dev[-_][0-9]* dev[-_]minimal[-_][0-9]*'
161
noinstall_pattern_list='dev[-_][0-9]* dev[-_]minimal[-_][0-9]*'
162
Helpify pkg_noinstall_pattern_list noinstall_pattern_list
162
Helpify pkg_noinstall_pattern_list noinstall_pattern_list
163
163
164
# repository component name
165
def_component=hasher
166
component=
167
Helpify component def_component
168
164
# repo directory.
169
# repo directory.
165
def_repo=repo
170
def_repo=repo
166
repo=
171
repo=
Lines 395-408 make_repo() Link Here
395
	if [ -n "$repo_src" -o -n "$repo_bin" ]; then
400
	if [ -n "$repo_src" -o -n "$repo_bin" ]; then
396
		mkdir -p $verbose -- ${repo_src:+"$repo_src"} ${repo_bin:+"$repo_bin"} >&2
401
		mkdir -p $verbose -- ${repo_src:+"$repo_src"} ${repo_bin:+"$repo_bin"} >&2
397
	fi
402
	fi
398
	mkdir -p $verbose -- ${repo:-$def_repo}/{{SRPMS,${target:-$def_target}/RPMS}.hasher,${target:-$def_target}/base} >&2
403
	mkdir -p $verbose -- ${repo:-$def_repo}/{{SRPMS,${target:-$def_target}/RPMS}.${component:-$def_component},${target:-$def_target}/base} >&2
399
}
404
}
400
405
401
# assumed: cwd == workdir, defined aptbox
406
# assumed: cwd == workdir, defined aptbox
402
update_repo()
407
update_repo()
403
{
408
{
404
	[ -z "$no_stuff" ] || return 0
409
	[ -z "$no_stuff" ] || return 0
405
	"$aptbox/genbasedir" --topdir=${repo:-$def_repo} --no-oldhashfile --bz2only --mapi --bloat ${target:-$def_target} hasher &&
410
	"$aptbox/genbasedir" --topdir=${repo:-$def_repo} --no-oldhashfile --bz2only --mapi --bloat ${target:-$def_target} ${component:-$def_component} &&
406
		verbose 'updated hasher repository indices.' ||
411
		verbose 'updated hasher repository indices.' ||
407
		fatal 'failed to update hasher repository indices.'
412
		fatal 'failed to update hasher repository indices.'
408
}
413
}
(-)a/hasher/mkaptbox (-4 / +8 lines)
Lines 42-47 Options: Link Here
42
                            overriding --repo option for binary packages;
42
                            overriding --repo option for binary packages;
43
  --repo-src=DIR            source packages destination directory,
43
  --repo-src=DIR            source packages destination directory,
44
                            overriding --repo option for source packages;
44
                            overriding --repo option for source packages;
45
  --component=NAME          repository component;
45
  --target=ARCH             target architecture of the work repository;
46
  --target=ARCH             target architecture of the work repository;
46
  -u, --update              run "apt-get update" after creation;
47
  -u, --update              run "apt-get update" after creation;
47
  --wait-lock               wait for workdir lock;
48
  --wait-lock               wait for workdir lock;
Lines 59-65 EOF Link Here
59
	exit
60
	exit
60
}
61
}
61
62
62
TEMP=`getopt -n $PROG -o f,u,$getopt_common_opts -l apt-config:,apt-prefix:,force,no-lock,no-stuff,no-update,repo:,repo-bin:,repo-src:,target:,update,wait-lock,no-wait-lock,without-stuff,with-stuff,$getopt_common_longopts -- "$@"` ||
63
TEMP=`getopt -n $PROG -o f,u,$getopt_common_opts -l apt-config:,apt-prefix:,force,no-lock,no-stuff,no-update,component:,repo:,repo-bin:,repo-src:,target:,update,wait-lock,no-wait-lock,without-stuff,with-stuff,$getopt_common_longopts -- "$@"` ||
63
	show_usage
64
	show_usage
64
eval set -- "$TEMP"
65
eval set -- "$TEMP"
65
66
Lines 81-86 while :; do Link Here
81
			;;
82
			;;
82
		--no-update) update=
83
		--no-update) update=
83
			;;
84
			;;
85
		--component) shift; component="$1"
86
			;;
84
		--repo) shift; repo="$1"
87
		--repo) shift; repo="$1"
85
			;;
88
			;;
86
		--repo-bin) shift; repo_bin="$1"
89
		--repo-bin) shift; repo_bin="$1"
Lines 132-137 lock_workdir Link Here
132
[ -n "$repo" ] || repo="$def_repo"
135
[ -n "$repo" ] || repo="$def_repo"
133
repo="$(readlink -ef -- "$repo")"
136
repo="$(readlink -ef -- "$repo")"
134
137
138
[ -n "$component" ] || component="$def_component"
139
135
# does aptbox exist yet?
140
# does aptbox exist yet?
136
if [ -e aptbox -o -L aptbox ]; then
141
if [ -e aptbox -o -L aptbox ]; then
137
	[ -n "$force" ] || fatal "remove $aptbox first."
142
	[ -n "$force" ] || fatal "remove $aptbox first."
Lines 246-252 done Link Here
246
251
247
cat >regenbasedir <<__EOF__
252
cat >regenbasedir <<__EOF__
248
#!/bin/sh -ef
253
#!/bin/sh -ef
249
"$aptbox/genbasedir" --topdir="$repo" --no-oldhashfile --bz2only --mapi --bloat ${target:-$def_target} hasher "\$@"
254
"$aptbox/genbasedir" --topdir="$repo" --no-oldhashfile --bz2only --mapi --bloat ${target:-$def_target} $component "\$@"
250
"$aptbox/apt-get" ${quiet:+-qq} update
255
"$aptbox/apt-get" ${quiet:+-qq} update
251
__EOF__
256
__EOF__
252
verbose "created regenbasedir"
257
verbose "created regenbasedir"
Lines 291-297 verbose "Created APT configuration file \`$apt_config_file'." Link Here
291
# create a new sources.list file.
296
# create a new sources.list file.
292
target_config="./etc/apt/sources.list"
297
target_config="./etc/apt/sources.list"
293
cat >"$target_config" <<__EOF__
298
cat >"$target_config" <<__EOF__
294
${no_stuff:+#}rpm file:$repo ${target:-$def_target} hasher
299
${no_stuff:+#}rpm file:$repo ${target:-$def_target} $component
295
$(LC_ALL=C grep '^[^#]' "$sl_value")
300
$(LC_ALL=C grep '^[^#]' "$sl_value")
296
__EOF__
301
__EOF__
297
verbose "Created APT source list file \`$target_config'."
302
verbose "Created APT source list file \`$target_config'."
298
- 

Return to bug 20013