From ae816ccbadf37f0d351230255712a79b057d4dca Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Tue, 10 Jul 2018 14:30:38 +0200 Subject: [PATCH] gh-96: Arch Linux support packaging WIP --- generate.sh | 13 +++++++++---- targets.sh | 15 +++++++++++++-- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/generate.sh b/generate.sh index 13f6e53..5f0fb4b 100755 --- a/generate.sh +++ b/generate.sh @@ -64,17 +64,20 @@ To get support check the OpenNebula web page: DESCRIPTION=${DESCRIPTION:-$DESC} URL=${URL:-http://opennebula.org} RELEASE_FULL="${RELEASE}${RELSUFFIX}" +EXT="${EXT:-${TYPE}}" if [ "${TYPE}" = 'deb' ]; then - FILENAME="${NAME}_${VERSION}-${RELEASE_FULL}.${TYPE}" + FILENAME="${NAME}_${VERSION}-${RELEASE_FULL}.${EXT}" elif [ "${TYPE}" = 'apk' ]; then RELEASE_FULL="r${RELEASE_FULL}" - FILENAME="${NAME}-${VERSION}-${RELEASE_FULL}.${TYPE}" + FILENAME="${NAME}-${VERSION}-${RELEASE_FULL}.${EXT}" +elif [ "${TARGET}" = 'arch' ]; then + FILENAME="${NAME}-${VERSION}-${RELEASE_FULL}-any.${EXT}" elif [ "${TYPE}" = 'iso' ]; then LABEL="${NAME}-${VERSION}" - FILENAME="${NAME}-${VERSION}-${RELEASE_FULL}.${TYPE}" + FILENAME="${NAME}-${VERSION}-${RELEASE_FULL}.${EXT}" else - FILENAME="${NAME}-${VERSION}-${RELEASE_FULL}.noarch.${TYPE}" + FILENAME="${NAME}-${VERSION}-${RELEASE_FULL}.noarch.${EXT}" fi ### @@ -175,6 +178,8 @@ else ${CONFLICTS:+ --conflicts ${CONFLICTS// / --conflicts }} \ ${PROVIDES:+ --provides ${PROVIDES// / --provides }} \ --deb-no-default-config-files \ + --pacman-user 0 \ + --pacman-group 0 \ ${CONFIG_FILES} \ --package "${OUT}" fi diff --git a/targets.sh b/targets.sh index c70f8e9..6416f16 100644 --- a/targets.sh +++ b/targets.sh @@ -158,8 +158,19 @@ case "${TARGET}" in 'arch') NAME=${NAME:-one-context} - TYPE=${TYPE:-dir} - TAGS=${TAGS:-arch one} + RELSUFFIX=${RELSUFFIX:-} + TYPE=${TYPE:-pacman} + EXT=${EXT:-pkg.tar.xz} + TAGS=${TAGS:-arch systemd one} + # mkinitcpio-growrootfs ruby-json + DEPENDS=${DEPENDS:-filesystem util-linux bash curl bind-tools ruby sudo shadow open-vm-tools qemu-guest-agent} + PROVIDES=${PROVIDES:-} + REPLACES=${REPLACES:-cloud-init} + CONFLICTS=${CONFLICTS:-${REPLACES} one-context-ec2} + POSTIN=${POSTINST:-pkg/postinstall} + PREUN=${PREUN:-pkg/preuninstall} + POSTUN=${POSTUN:-pkg/postuninstall} + POSTUP=${POSTUP:-pkg/postupgrade} echo 'ArchLinux target is currently not maintained' exit 1 ;;