diff options
-rwxr-xr-x | packages/brpm | 11 | ||||
-rw-r--r-- | packages/redhat/cloud-init.spec | 27 | ||||
-rwxr-xr-x | tools/make-tarball | 3 |
3 files changed, 11 insertions, 30 deletions
diff --git a/packages/brpm b/packages/brpm index afd7016f..99288ce9 100755 --- a/packages/brpm +++ b/packages/brpm @@ -142,15 +142,10 @@ def generate_spec_contents(args, tmpl_fn): changelog_lines.append(line) subs['changelog'] = "\n".join(changelog_lines) - if args.boot == 'initd': - subs['init_d'] = True - subs['init_d_local'] = False - elif args.boot == 'initd-local': - subs['init_d'] = True - subs['init_d_local'] = True + if args.boot == 'sysvinit': + subs['sysvinit'] = True else: - subs['init_d'] = False - subs['init_d_local'] = False + subs['sysvinit'] = False if args.boot == 'systemd': subs['systemd'] = True diff --git a/packages/redhat/cloud-init.spec b/packages/redhat/cloud-init.spec index d0f83a4b..a9da7c5e 100644 --- a/packages/redhat/cloud-init.spec +++ b/packages/redhat/cloud-init.spec @@ -34,7 +34,7 @@ Requires: shadow-utils Requires: {{r}} {{endfor}} -{{if init_d}} +{{if sysvinit}} Requires(post): chkconfig Requires(postun): initscripts Requires(preun): chkconfig @@ -86,34 +86,22 @@ then fi {{endif}} -{{if init_d_local}} +{{if sysvinit}} /sbin/chkconfig --add %{_initrddir}/cloud-init-local -{{elif init_d}} /sbin/chkconfig --add %{_initrddir}/cloud-init -{{endif}} -{{if init_d}} /sbin/chkconfig --add %{_initrddir}/cloud-config /sbin/chkconfig --add %{_initrddir}/cloud-final {{endif}} %preun -{{if init_d_local}} -if [ $1 -eq 0 ] -then - /sbin/service cloud-init-local stop >/dev/null 2>&1 - /sbin/chkconfig --del cloud-init-local -fi -{{elif init_d}} +{{if sysvinit}} if [ $1 -eq 0 ] then /sbin/service cloud-init stop >/dev/null 2>&1 /sbin/chkconfig --del cloud-init -fi -{{endif}} -{{if init_d}} -if [ $1 -eq 0 ] -then + /sbin/service cloud-init-local stop >/dev/null 2>&1 + /sbin/chkconfig --del cloud-init-local /sbin/service cloud-config stop >/dev/null 2>&1 /sbin/chkconfig --del cloud-config /sbin/service cloud-final stop >/dev/null 2>&1 @@ -139,13 +127,10 @@ fi %files -{{if init_d}} +{{if sysvinit}} %attr(0755, root, root) %{_initddir}/cloud-config %attr(0755, root, root) %{_initddir}/cloud-final -{{endif}} -{{if init_d_local}} %attr(0755, root, root) %{_initddir}/cloud-init-local -{{elif init_d}} %attr(0755, root, root) %{_initddir}/cloud-init {{endif}} diff --git a/tools/make-tarball b/tools/make-tarball index 7fdeb7df..09742dc7 100755 --- a/tools/make-tarball +++ b/tools/make-tarball @@ -23,12 +23,13 @@ if [ ! -z "$1" ]; then else REVNO=$(bzr revno $ROOT_DIR) VERSION=$($ROOT_DIR/tools/read-version) - ARCHIVE_FN="$PWD/cloud-init-$REVNO-$VERSION.tar.gz" + ARCHIVE_FN="$PWD/cloud-init-$VERSION-$REVNO.tar.gz" fi FILES=$(cd $ROOT_DIR && bzr ls --versioned --recursive) echo "$FILES" | tar czf $ARCHIVE_FN \ -C "$ROOT_DIR" \ + --transform "s,^,cloud-init-$VERSION-$REVNO/," \ --no-recursion --files-from - echo "$ARCHIVE_FN" |